Atmega 328P vs Atemga328-U - Page 1
Forum section: electronics / beginners

author: samarth
author_rank: Contributor
timestamp: October 14, 2021, 10:21:43 pm
content: So I bought an atmega328 (those were my exact words to the shop keep), in a DIP package. I had expected it to be the more common (i think?) atmega 328P.Turns out, it was labelled Atmega 326-U.Is there any major difference between the two?Or is it the same difference as atmega328 vs atmega328p?Regards,SR

author: TimFox
author_rank: Super Contributor
timestamp: October 14, 2021, 10:51:20 pm
content: Is "326-U" a typo?

author: golden_labels
author_rank: Super Contributor
timestamp: October 14, 2021, 11:15:52 pm
content: It’s 328 and 328P. Letters after the dash indicate the ordering code. For both of them, not only 328. The ordering code is internal to Atmel/Microchip and its meaning is not documented. While some have been correlated with packaging type, binning or delivery options, other remain a mystery.You are mentioning an U code, which is not listed in datasheets for ATmega<X>8 series, but that’s not the first time such components surface. However, be sure to check if that’s not AU, MU or PU: those are QFP, QFN and PDIP packages.

author: samarth
author_rank: Contributor
timestamp: October 15, 2021, 12:19:27 am
content: Here is a picture of the mcu I bought.I thought it looked like a U?...

author: samarth
author_rank: Contributor
timestamp: October 15, 2021, 12:24:50 am
content: Quote from: golden_labels on October 14, 2021, 11:15:52 pmRef the image I had posted...Also, I am not sure that the body isnotmade of plastic. ItisDIP though.Regards,SR

author: Rick Law
author_rank: Super Contributor
timestamp: October 16, 2021, 01:19:03 am
content: Important to note however, their is one difference you may consider major (I would) ...The TQFP/QFN/MLF package has8 ADC channelswhere as the PDIP packaging (the one you got) has only6 ADC channels.So, with the PDIP, you have ADC0 to ADC5 but missing ADC6, and ADC7. If you use I2C, ADC4 and ADC5 are used for SDA/SCL leaving only 4 ADC to use. That two extra ADC with the non-PDIP ones come in handy.

author: Psi
author_rank: Super Contributor
timestamp: October 16, 2021, 02:51:17 am
content: Quote from: golden_labels on October 14, 2021, 11:15:52 pmBe VERY careful with the letters on the end of AVR mcus, sometimes it matters, other times it doesn't. But it ALWAYS means you need to check.eg, ATMega328 vs ATMega328P vs ATMega328PB(PB does not mean lead/leadfree, it's got different physical hardware support, QTouch, Peripheral Touch Controller etc)AlsoATTiny2313 vs ATtiny2313A vs ATtiny2313VThe A version is a newer iteration and has PCINT on all pins but the non-A only has PCINT on some pins.The V version is a non-A type that can run on lower voltages.So if you designed your hardware for one you could run into real problems if you got the other on the board.But it gets worse, When they came out with the newer 'A' type 2313A they also decided to come out with a 4KB flash version.Since there was no prior 4313 part they called the new one 4313 and not 4313A like you would expect.So you have ATtiny2313 and ATtiny4313 and the 4313 is the newer version with extra PCINT but the 2313 is the old version without it.

author: golden_labels
author_rank: Super Contributor
timestamp: October 16, 2021, 05:49:39 am
content: Note that what Psi refers to are letters that are a part of the device number. They are well documented in the datasheets, even if the datasheets may be not readily available for older parts and noticing the differences may require a lot of careful reading.The meaning behind the ordering codes is unknown and only partial guesses are available based on what can be found in the relevant datasheet sections (at the end).

author: Nusa
author_rank: Super Contributor
timestamp: October 16, 2021, 12:25:51 pm
content: https://forum.arduino.cc/t/atmega328p-u-incompatible/540160/discussion includes this gem from Microchip:Quote

author: tooki
author_rank: Super Contributor
timestamp: October 16, 2021, 02:09:11 pm
content: Quote from: samarth on October 15, 2021, 12:24:50 amThe only alternative to plastic DIP is ceramic DIP (CDIP), which youdefinitelydon’t have. They look different (kinda purple-gray, in layers), they feel different (heavier, colder), and they’re a LOT more expensive. (Very few ceramic DIPs are made any more, mostly for military grade parts.)(I suppose some old optoelectronics parts were DIPs in colored epoxy, but that still falls under “plastic” DIP.)

author: samarth
author_rank: Contributor
timestamp: October 17, 2021, 12:36:54 pm
content: Quote from: Nusa on October 16, 2021, 12:25:51 pmSo that means that what I have is the "P" version of the atmega328?Or is my reading comprehension out of whack due to lack of coffeeSR

author: wraper
author_rank: Unknown
timestamp: October 17, 2021, 12:39:14 pm
content: No, You would have a P letter on it if it was 328P. What you have is Atmega328-PU. 328P in dip package would have part number Atmega328P-PU.

author: wraper
author_rank: Unknown
timestamp: October 17, 2021, 12:45:30 pm
content: Older marking of 328P looked like this:Newer look like this with letter indicating the package type eliminated:

author: samarth
author_rank: Contributor
timestamp: October 17, 2021, 12:52:01 pm
content: Understood, thanks!

author: westfw
author_rank: Super Contributor
timestamp: October 24, 2021, 11:54:29 pm
content: The ATmega328P is the "Picopower" version. It has an option to turn off the Brown-out-detection via the MCU Control Register (BODS and BODSE bits); it MIGHT have lower power consumption in various sleep modes, too.In 10+ years of people getting the wrong chip for their Arduinos, that's been the only actual difference that anyone has been able to detect. :-)The 328 and 328P also have different chip signatures, which you'll need to account for when programming them. For Arduino, you can load up a bootloader that identifies the chip as a 328P even if it's a 328, and it will save you a lot of trouble. But you have to specify that it's a 328 during the burning of the bootloader.

author: rpiloverbd
author_rank: Regular Contributor
timestamp: December 21, 2021, 02:41:32 pm
content: From your photo I can see that your chip is ATmega328. The letter after the dash(-) indicates the package type. Here are some answers regarding this issue.https://arduino.stackexchange.com/questions/66694/atmega328p-u-vs-atmega328-pu