Step 46: Program the AVR with test code
We have prepared a simple test program to check if all the LEDs work and if they are wired correctly.
You can download the firmware test.hex in this step, or download the source code and compile it yourself.
As in the previous step, we use avrdude for programming:
- avrdude -c usbtiny -p m32 -B 1 -U flash:w:test.hex
-c usbtiny specifies that we are using the USBtinyISP from Ladyada -p m32 specifies that the device is an ATmega32 -B 1 tells avrdude to work at a higher than default speed. -U flash:w:test.hex specifies that we are working on flash memory, in write mode, with the file test.hex.
test.hex14 KB
Remove these ads by
Signing Up











































































































Visit Our Store »
Go Pro Today »




I've successfully set the fuses and flashed my ATMEGA32 with the test.hex code, but when I power on, STATUS2 flashes on and off, then STATUS1 comes on and stays on (or flashes faster than I can see). Does anyone have any idea what this might mean?
Thanks!
Thank you.
it replies with error opening test.hex: no such file or directory
I have downloaded the test.hex file and saved it , is there a specific location I need to save this file to in order for it to be read
e.g. if it is on your Desktop in a folder called 8x8x8 then type:
cd Desktop\8x8x8
then type your command.
If it's somewhere messy, e.g, just create a new folder in C:\ called 8x8x8 and move/copy the test.hex file into it, then type
cd \8x8x8
before typing the avrdude command.
Hope this helps.