burnig bootloader and uploading sketches onto an ATMEL Atmega328P-PU using an Arduino UNO SMD

Now there is a great manual on the Arduino page on how to burn the Arduino bootloader on an Atmega328P-PU:

  • You just upload the ‘ArduinoISP’-sketch which you can find in the examples-section of the Arduino Software onto your Arduino Board (in my case it was an Arduino UNO SMD)
  • connect the Atmega chip as follows:

    breadboardavr

    source: http://www.arduino.cc/en/uploads/Tutorial/BreadboardAVR.png (connections are the same for Atmega328P-PU)

  • Set: Tools -> Board to Arduino Uno (or Arduino Duemilanove w/ ATmega 328 or Nano w/ ATmega 328 for that matter). It does not have to match the Arduino board you are using to program the chip but rather it determines what bootloader will be installed on your Atmega-chip. You just have to select an Arduino with an Atmega328 onboard.)
  • Set: Tools -> Programmer to Arduino as ISP
  • click: Tools -> burn bootloader

For me it worked like a charm.

Now comes the interesting part: In the Arduino manual they tell you to remove the Atmega chip from your Arduino and to wire things differently in order to upload sketches onto your newly bootloaded Atmega-chip.

This is not necessary!! In Fact it isn’t even possible if you have an Arduino UNO like  I do.

Uploading Sketches:

  • leave the connections as shown in the figure above
  • open the sketch that you want to upload onto your Atmega-chip
  • Set: Tools -> Board to Arduino Uno (or Arduino Duemilanove w/ ATmega 328 or Nano w/ ATmega 328 for that matter; has to match the bootloader you installed previously!)
  • Set: Tools -> Programmer to Arduino as ISP
  • click: Sketch -> upload using programmer (This option may not exist in older versions of the Arduino software.)

Again, worked for me like a charm.

If you get error messages that read something like: wrong device id, you may have forgotten to supply the 5V DC to your Atmega chip or your bootloader isn’t installed properly. Try again.

If there is an error message that claims: problems with synchronization, your oscillator might not work. In this case remove the 16MHz oscillator and the two 18-22pF capacitors and install the bootloader for the 8MHz internal timer (as described in the Arduino manual). Then try uploading the sketch again

Advertisements

Leave a comment

Filed under tech distractions

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s