I bought an ATmega8 DevBoard thinking the USB port would be a programmer like an Arduino. We need to use the 10 pin header labelled ISP. The USB port is dormant until we put in a program that uses it.
There are lots of good programmer devices. I like the USBtiny because it is reliable. Keying of the 10pin connector prevents wrong connections. The signals are SPI type interface and provide little on-chip debugging.
USBTiny
The programmer device takes the hex file you generate in your computer and copies it into the memory of the development board. There are lots of information on avrdude, programmers and ICSP/ISP pins.
On windows you install drivers from the manufacturer.
Code for ATmega8In Atmega8 Programming on Arduino IDE we setup to generate hex files to upload with the USBtiny.
Linux$ avrdude -p m8 -c usbtiny -U flash:w:countB.hex:i
Open terminal in the folder containing the hex file to upload. Arduino programming would look the same with atmega328p as the -p part parameter.
This screenshot is what we expect from a successful transfer. s.
> avrdude -p m8 -c usbtiny -U flash:w:countB.hex:i
Same command. More info available if you type avrdude -h. The help command lists supported processors and programmers.
During the upload the SCK, MISO and MOSI SPI pins on PORTB toggle.
Comments
Please log in or sign up to comment.