ATmega328 or ATmega328P????

All of the articles I find to try and burn a bootloader are confusing to a noob like me. I bought an ATMEGA328-PU. I'm trying to add the bootloader onto it and all of the support I have located return that the chip is ATMEGA328... However I constantly get a sync issue error. There's obviously a difference between 328 and 328P, why isn't this reflected within anything I have found, and can someone explain what those differences are? I'm trying to learn by doing, this is the only way I understand, yet everywhere I look, no one seems to know how to speak specifically enough to "Nail" the details, ASSUME a noob knows nothing at all... so don't leave out the .01 vs. .1 details... if the chip needs to be a 328P write exactly 328P not 328.

The signature bytes are different, that is the source of the problem. Haven't used a plain 328 myself, but many others have. Search the forum and there should be many threads on it and how to address it.

Edit: This thread looks promising:
http://forum.arduino.cc/index.php?topic=176338.msg1308644#msg1308644

http://www.instructables.com/id/Bootload-an-ATmega328/step6/ATmega328-PU-workaround/
Try this!
/Mikael

I don't know why the IDE can't be updated to support both parts, this certainly comes up enough.
Nick Gammon's bootloader supports both.

Hello kylebarker82,

I shall suggest you to buy another fresh Atmega328P. [do not consider the "-PU" part now, just leave it.]

First try to burn the UNO bootloader on the 328 chip (It will not work! & show some error message regarding device signature)
Then try to burn the same bootloader on the 328P ( It will work )
Now, have a look at this article http://www.instructables.com/id/Burning-the-Bootloader-on-ATMega328-using-Arduino-/
Read the instructions carefully & burn the bootloader on the 328 chip. (It will work now & will show no errors regarding the signature bytes)
google around & analyze the previous article.
All the best!
:slight_smile:

CrossRoads:
I don't know why the IDE can't be updated to support both parts, this certainly comes up enough.

i wish the ide supported -f. checking signature is only really important when burning fuses.

these "safety" features usually cause more problems than they solve. less protecting us from ourselves and more protecting us from designers bright ideas.

I do see your point, but I disagree. Atmel saw fit to make them as separate parts, and as such, you really should be aware of which one you're using. Whether the difference matters to you is another thing, but I don't believe the software should make that call on your behalf.

Thanks very much for the links to the work around... I'll be trying it out. I'm beginning to think google search didn't want me to find this link, I've seen every other link, but nothing for a work around...

It worked, thanks a ton!!!

SirNickity:
I do see your point, but I disagree. Atmel saw fit to make them as separate parts, and as such, you really should be aware of which one you're using. Whether the difference matters to you is another thing, but I don't believe the software should make that call on your behalf.

im not saying this "safety" feature should be removed. just allow override for those who need to make things work.

as ta ive been responsible for setting up avr programming for over 300 students now. 5 semesters over 3 years. the first couple were a living hell what with this partnumber/signature baloney causing nothing but trouble. then once i introduced -f (never for fuse though) it was like a breath of fresh air. im talking 1% of the former hassles.

this is one main reason ive steered them away from the ide and into avrdude batch files. of course these are dressed up as pretty desktop icons so even the win-girls are happy. little do they know.

Sure, but to be fair -- can you imagine how many problems it might cause if "-f" were available as a checkbox in the IDE? Before long, you'd have people using it because otherwise their Uno program wouldn't upload to their ATmega8s. :wink:

Part of learning is failing. If I were teaching a group of microcontroller newbies, I would sit back and watch them try to upload to an ATmega328. When it fails, I would encourage them to find out why. That's a valuable thing to learn, I think. They may choose to use the -f flag to ignore the mismatched signature, and I would accept that. However, I would probably try and work in a practical experiment where they were expected to enable brown-out detection, maybe even give half of them 328s and the other half 328Ps. Let them puzzle over why half the people get different results with the same firmware image. Finally, I would explain how new device signatures are added in avrdude.conf, which solves the mismatched signature problem correctly, while retaining the legitimate failure when avrdude is asked to write to the wrong IC.

I don't mean to sound superior here, nor do I mean to imply this is a better approach than anything you're doing, or that I even have the experience or skill to be an effective teacher. But, I do believe this inconvenience could present an opportunity to provide a useful lesson in practical troubleshooting. :slight_smile:

Part of learning is failing. If I were teaching a group of microcontroller newbies, I would sit back and watch them try to upload to an ATmega328. When it fails, I would encourage them to find out why.

Yes, that's the point.

SirNickity:
Sure, but to be fair -- can you imagine how many problems it might cause if "-f" were available as a checkbox in the IDE? Before long, you'd have people using it because otherwise their Uno program wouldn't upload to their ATmega8s. :wink:

Part of learning is failing. If I were teaching a group of microcontroller newbies, I would sit back and watch them try to upload to an ATmega328.

yes, there is that "no-pain-no-gain" philosophy. and some gurus just enjoy watching noobs dance. if it was part of their job to keep them out of trouble like it was for me the picture might be a little different.

maybe not a checkbox but at least an option even if buried somewhere in the registry or config file. at least not have to go as far as screw with avrdude or recompile the ide. anyway if there was a checkbox im convinced using it would be an improvement over current situation. look at how many come crying now and how many THOUSANDS of man hours are wasted in just this forum alone. considering other sites like freaks, cellar, robots, etc the real count is in the millions.

not just 328/328p but 1284 and a slew of other avr that are 100% compatible except for signature. imo a simple warning that processor is wrong would suffice instead of blocking the whole process. of course it does help keep post counts and "karma" ratings up.

just my own viewpoint and of course everyone has one... like you know whats... lol!

Well, different strokes I guess. :slight_smile: Anyway, speaking of karma, have a point for passing on your knowledge to others.

HEY! ill get you for that! lol!

btw my buddy in atlanta made a point of telling me it was colder there than in anchorage. and somebody on cbs news commented there were two places in usa that day COLDER THAN MARS. we only got down to -2 degF here. anyway have a good year.