Week 6

Embedded Programming

Overview

The Assignment this week was to take the boards from Weeks 2 and 4 and to program the board do something using the newly added components. As I had yet to fully program either board, I ended up doing all of it from the beginning this week. I successful followed the steps on the programmer and managed to get it successfully functioning and visible to my computer.

Programming

To program the programmer from the earlier week, we had to get around the issues from working with a mac and to make sure the board was physically in working order. Luckily, once I installed home-brew and crosspack everything worked smoothly. To do this the steps were as follows:

Install Homebrew

Install Crosspack

In terminal enter:

brew install avrdude

which avrdude

Navigate to the folder where you put the code, something like: cd /Users/Mattledwidge/Documents/1_MIT/MIT_1.4_How\ to\ Make/fts_firmware_bdm_v1\ 3

Plug in a programmer to your board.

Plug in to power

make

sudo make flash

sudo make fuses

sudo make rstdisbl

Remove the solder jump

New Code

Working directly in C, I borrowed some code and was able to successfully upload it to my board. The code causes the LED on the board to flash continuously when plugged into a power source.

make a folder, copy the files hello.ftdi.44.echo.c and hello.ftdi.44.echo.c.make ( from the website) into it

navigate there in terminal using cd

rename hello.ftdi.44.echo.c.make into just makefile

run make

sudo make program-usbtiny

sudo make program-usbtiny-fuses