You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
807 B

3 years ago
  1. gotchas:
  2. * wrong atmega328 (need atmega328p-pu, not atmega328-pu) (though this can still be used)
  3. * need fuse bits set separate from programming hex (pickit w/pics on the other hand
  4. handles this all in one)
  5. * need lock bits set
  6. * need 16MHz crystal when programming hex and lock bits (can use one from uno
  7. board)
  8. quick guide:
  9. set proper wiring on avr dragon (see image in pics)
  10. set fuse bits
  11. avrdude -b 19200 -c dragon_isp -p m328p -v -e -U efuse:w:0xFD:m -U hfuse:w:0xDE:m -U lfuse:w:0xFF:m
  12. add crystal, load hex, and program lock fuse
  13. avrdude -b 19200 -c dragon_isp -p m328p -v -e -U flash:w:hexfilename.hex -U lock:w:0x0F:m
  14. hexfilename.hex - the optiboot loader is included in
  15. arduino-1.8.5/hardware/arduino/avr/bootloaders/optiboot_atmega328.hex
  16. for more details, and references, see notes