Skip to content

Programming the Wretched Atmega328-PU

March 7, 2016

I have, a couple of times, purchased Atmega328-PU chips instead of the Atmega328P(I know, what a dope, right?). Anyway, they end up in my chip drawer because they won’t work out-of-the-box with the arduino ide and life is short.  I brought one with me so i could take a day and figure it out – no way it was going to be worth it to save the $3, it was the principle of the thing.

So, to get this to work, I had to

  • Install the pololu add-on for the arduino IDE from https://www.pololu.com/docs/0J17/3
  • verify that the avrdude.conf file in C:\Program Files (x86)\Arduino\hardware\tools\avr\etc had an entry for atmega328 as well as one for atmega328p
  • edit the boards.txt file in C:\Program Files (x86)\Arduino\hardware\arduino\avr to add a section uno328 the same as uno but with atmega328 instead of 328p -see discussion at http://forum.arduino.cc/index.php?topic=58670.0
  • save that onto the desktop then copy it back where it goes because windows
  • select the port that the programmer is on and the new board then “burn bootloader”
  • select the regular serial port and select THE UNO BOARD – NOT MY NEW ONE which will probably never be used again
  • burn the blink sketch

Note that once the bootloader is written onto the chip it reports itself as an atmega328p so you switch back to the uno board definition.

On the way I discovered that I had reversed the cable on my ISP programmer which is why it hasn’t worked for months!  So that was worthwhile but otherwise i would have been better to buy a couple of atmega328p’s and dump the others to save headaches in the future.

Thus endeth the lesson for the day.

16-03-07 status quo

This is the way I’ve been connecting the programmer for years

16-03-07 better

This is clearly preferable

Advertisements

From → Uncategorized

Leave a Comment

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

%d bloggers like this: