Programming an ISP

This week, I worked on programming my stuffed board in order to complete it’s functional design. Using a USB connection for power and a ribbon connection for data transfer, I was able to successfully create a link between the computer and the board. Using the code provided by the FAB Academy, I was able to load the code onto the ISP Board.

Using the information from http://fab.cba.mit.edu/classes/863.16/doc/projects/ftsmin/index.html I was able to follow the instructions to sucessfully upload code onto my ISP and program it properly.

As I was using a Mac, I had to download CrossPack, a development environment specifically made for AVR microcontrollers.

Following this, I then downloaded the firmware source code that would be uploaded to the board. This was provided through a download link on the aforementioned blog post.

Once I had these two bits of software downloaded, I was able to upload the source code onto the board.

I first had to address the makefile to ensure that the code was adapted for my microcontroller. In order to do this, I found the line that says “PROGRAMMER ?= usbtiny” and found that no action was required as my code was already set for my microcontroller (see picture below).

Following this, I then opened the Terminal app and ran ‘make flash’ the idea of this is to remove the information form the target chip in order to replace it with the code we want uploading to the ISP. This didn’t quite run succesfully the first time as I had mistakenly inserted the ribbon connector in upside down. Once I had noticed this, I inverted it and retried the ‘make flash’ command. This successfully uploaded the code to the flash. At this point, I configured the fuses; the idea of this is to allow the ISP to program other boards without the board itself to be re-programmed.

To run this command, I typed ‘make fuses’. After a brief loading screen, the command went through as successful.

Finally, I needed to blow the reset fuse to ensure that no other code can be uploaded to the microprocessor. After checking that the usb was recognised by the Mac (Apple, About This Mac, More Info) I then ran the process ‘make rstdisbl’ The aim of this was to reset the fuses and ensure that no other code could be uploaded in the future.

Once the loading screen successfully ended, I removed the solder bridge from the board to ensure that the wire had been broken, creating a physical barrier to stop any code being loaded into the microprocessor.

Below is a short video showing the code process history. Unfortunately, I had not made photographs as I went along on this occasion.

IMG_4382

Print Friendly, PDF & Email

Leave a Reply