AVR Assembly resources
Note: The general idea behind the assembly language is comparable to programming a microcontroller in C. With both languages, you have to look up the necessary registers in the datasheet of the microcontroller and set the corresponding bits. Just like writing a good old config.
Connection to Programmer
If you installed avrdude according to the above tutorial and use the mentioned FTDI adaptor (Sparkfun), then connect the microcontroller as follows, using the SPI pins.
DTR -> RESET (1)
RXI -> MISO (18)
TXO -> MOSI (17)
5V -> VCC (7 & 20)
CTS -> SCK (19)
GND -> GND (8 & 22)
Double check your connections, especially
Avrdude Troubleshouting (Linux)
To upload a hex file, use the following command:
sudo avrdude -c ftdi -P ft0 -p m328P -U flash:w:file.hex
If it doesen't work, try the following steps:
- correct wiring?
- Reset pin connected with a pull-up?
- ignore errors using
- change the bitrate
- check if your USB adapter board is recognized ->