====== AVR Programming quick guide ====== Quick guide useful for first approach or as a reference for commands, pinning, etc... **The matter: upload a compiled code file (.hex) into the avr's flash memory.** Use a Makefile to do all the work. Download it [[talks:avr-microcontrollers#makefile|here]]. In the makefile: * change/add source files; * change your project name; * change part name (for example atmega16); * change programmer type and port. Use ''make'' to compile, ''make hex'' to generate firmware in the format read by the programmer, ''make writeflash'' to program the AVR. I have also added ''make fuse'' that should be adjusted in the Makefile, to write the fuse byte(s). ===== Notes ===== Atmega64 : remove compatibility flag when programming, otherwise lot of registers won't work and the code will crash. i.e. extended fuse bits should be 0xFF ''avrdude -p m64 -P /dev/parport0 -c stk200 -U efuse:r:-:h'' will output 0xfd, so let's do ''avrdude -p m64 -P /dev/parport0 -c stk200 -U efuse:w:0xFF:m''