Home

Week 8 - Embedded Programming

Programming the Atmega328 - AU in Arduino

Neil Gershenfeld's Fabduino design can be used with the Atmega 168 , 328 and 328p micro-controllers. The 168 and 328p micro-controllers can be
programmed on arduino using the standard protocol and Arduino Pro or Pro Mini board files. Using the standard 328 - AU micro-controller however, requires some additional work.

Thanks to Joel and Luciano for their help with resolving this.

Joel Rae - FabFolk
Luciano Betoldi - FabLab Barcelona

Instructions

If using the 328 (non - p), when you select a 328 board type and attempt to burn bootloader, you will get the following message:

avrdude: Expected signature for ATMEGA328P is 1E 95 0F Double check chip, or use -F to override this check.

The config file must be modified to the 328 (non-p) signiature in order for the bootloader to work. It must then be changed back afterwards to be programmed.

  • In order to locate your config file on osx, right click on arduino app >>> show package contents then navigate down to the config file.

    /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf
  • Open the .conf file and locate the entry for the ATMEGA 328p. This was on line 9025 in my version.
    The last entry of the signature (line 9038) must be changed from 0x0F to 0x14
  • Save the conf file and go to burn bootloader using the appropriate 328p board.

    Once bootloader has been burnt, go back to the .conf file and undo the changes back to read 0x0F
  • You can now program your board.

    Another option is to add a new entry to the board.txt file and the .conf file but in trying this it became clear that some modificatins need to be made in the cores folder. Not a straightforward task.