- open arduino SDK and load the ArduinoISP sketch from file->examples
- compile and upload
- The comment section of the ISP sketch describes which pin is which.
- you need to connect the J2 jumper. In my case, I don’t have header, so I just used a piece of wire.
- I found that it wasn’t obvious which pin of the ribbon cable connects to what on the usbasp
- If you’re looking at the ribbon connector, the tab is up and the ribbon goes left. Going from away from you to nearer, the connections are Miso, sclk, reset, unconnected, Mosi. The pin beneath the far pin Miso, is gnd and the pin beneath the close pin is pwr.
- To test, I first read the existing code:
- avrdude -c avrisp -P com3 -p atmega8 -b 19200 -U flash:r:abc2.hex:i
- To write:
- avrdude -c avrisp -P com3 -p atmega8 -b 19200 -U flash:w:usbasp.atmega8.2011-05-28.hex
avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.09s avrdude: Device signature = 0x1e9307
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file “usbasp.atmega8.2011-05-28.hex”
avrdude: input file usbasp.atmega8.2011-05-28.hex auto detected as Intel Hex
avrdude: writing flash (4700 bytes): Writing | ################################################## | 100% 8.32s avrdude: 4700 bytes of flash written
avrdude: verifying flash memory against usbasp.atmega8.2011-05-28.hex:
avrdude: load data flash data from input file usbasp.atmega8.2011-05-28.hex:
avrdude: input file usbasp.atmega8.2011-05-28.hex auto detected as Intel Hex
avrdude: input file usbasp.atmega8.2011-05-28.hex contains 4700 bytes
avrdude: reading on-chip flash data: Reading | ################################################## | 100% 5.78s avrdude: verifying …
avrdude: 4700 bytes of flash verified avrdude: safemode: Fuses OK avrdude done. Thank you.
Updating the firmware of a usbasp