Embedded Programming

Week 08

19th-26th March 2014


This week we got to finally program the board that was built two weeks ago. It was rather exciting to see if the previous assignment was actually completed correctly. On the way from the lab I grabbed the two pcb's and made a quick cable to be able to finish the project at home. I completely missed the fact that an FTDI cable is part of the toolchain as well. Luckily in this case it is only used to power the board and I improvised a power supply from a spare usb cable.


MacGyver-style solution worked and I managed to program the board following the tutorial from one of Neil's previous students.. I didn't manage to get the serial echo program to respond though, as I couldn't see the usb serial device on my computer. Reading the C code and makefiles provided for the class was very helpfull and the code made sense.


During a lengthy break in work I had wiped my computer, thus the avr programming toolchain had to be installed from scratch. Homebrew to the rescue! Someone had already packaged it nicely, so all I had to do - was issue these two commands

  • brew tap larsimmisch/homebrew-avr
  • to add the new tap/repository
  • brew install avr-libc
  • to install all that's needed for avr programming.

    15 minutes for the build, and all is set to go.


    After hooking up the board with power from the FTDI cable and FabISP programmer, these 3 commands got the code into the Attiny44 chip:

  • make -f hello.ftdi.44.echo.c.make
  • sudo make -f hello.ftdi.44.echo.c.make program-usbtiny-fuses
  • sudo make -f hello.ftdi.44.echo.c.make program-usbtiny

  • Another great find was this workflow to turn video screencasts into very compact GIFs.

  • ffmpeg -i in.mov -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif

  • The code is Neil's original hello.ftdi.44.echo.c with a modified flash string.

  • C file
  • make file