Using the new ATMEGA328PB

I read up on this MCU because someone mentioned it in a different thread. So what I know so far is that this IC is pin-compatible with ATMEGA328P-AU but at least 1USD cheaper, which is significant. On my small devices, I can save some money with this MCU.

The signature is different 0x1E9515 instead of the 0x1E950F for 328P. Here is a guide to use the dev board on arduino IDE:

https://spaces.atmel.com/gf/project/avr_xp_mini/frs/?action=FrsReleaseBrowse&frs_package_id=140

The guide didn't mention signature difference. It mentioned setting fuses and installing arduino bootloader, for their dev board Xplained featuring 168PB and 328P. I still find it difficult to understand that if this chip is new, then avrdude may be unable to match it with a signature and refuse to upload, right? They seem to have omitted that all together.

I found out also that the file iom328p.h in hardware\tools\avr\avr\include\avr has the signatures. I wonder if I should hack it to include 328pb.

Any advice on using this chip? The only other thread about this subject is this:

https://forum.arduino.cc/index.php?topic=344016.0

Things seem to have moved forward since that post and some materials have been updated (looks like student intern quality update). Here is their project:

https://spaces.atmel.com/gf/project/avr_xp_mini/

for 328pb -F saves the day for me like it does for so many slightly offbeat avr versions. signature serves no purpose anyway except when burning fuse and then you only need to be a little more careful. fortunately i rarely change fuses after first time so not an issue.

being a fan of soft serial anyway this chip holds little attraction. regular 328 still cheaper on the world market. my favorite m8 1/3 the cost of those so... meh.

I don't see where 328 is cheaper than the 328pb. Care to post a link? and what is m8?

'328PB-AU

'328P-AU - costs more

Not sure what's different between Atmega8 and Atmega88 without digging into their datasheets, both look like smaller memory version of the 328P

liudr:
I don't see where 328 is cheaper than the 328pb. Care to post a link? and what is m8?

heres link to small qty purchased for hobby use a month or so back.

http://www.aliexpress.com/item/10PCS-ATMEGA328P-PU/1198508525.html

price is couple bucks more atm but still around a dollar ea shipped which is impossible for pb. these are new parts with 30 day date code and always test ok. pulls and larger qty available for about half that depending...

digi-boys will probably chime in about stable sources or fakes but personally i dont buy it. what i do buy is thousands a month for clients from sources like alibaba. problems are virtually non-existant. few years ago there were a couple pins missing from some qfp refurbs but never those sold as new. i do use digi-key/mouser sometimes for those who insist so not unfamiliar with those channels.

of course everyone is entitled to buy from whoever they choose whether it be, as mentioned in my other post, from a sense of patriotism or just plain "more money than brains" syndrome. its a free country. at least where i am, so i prefer economy, easy of ordering, and reliable sellers.

btw m8 is short for atmega8. contrary to popular belief the most common avr in use today (and last 20yrs for that matter). my favorite but not for that reason. although it helps in terms of supply and cost.

CrossRoads:
'Not sure what's different between Atmega8 and Atmega88 without digging into their datasheets, both look like smaller memory version of the 328P

m8 and m88 have vaguely similar pinout but under the hood are completely different parts. almost like comparing 8051 with stm32. m8 has "classic" op-codes, io map, and memory map. 88 uses "revolutionary" (atmels term) architecture and quite incompatible in these respects. although, except for boot sec and fuses, 88 is somewhat compatible with m48, m168, and m328.

i prefer the former so that programs can be written with binary that runs on literally dozens of different chips ranging from t13 to m8515 w/o re-compiling. like the one wire port expander code i posted couple days ago here.

Oh that's what you called a world market. I see. Do what suits you best, like you said, just in another way. I prefer reputable sellers when I make small productions for clients whose business livelihoods depend on getting quality parts. Actually I let my clients order the parts themselves. My micro-business depends on not screwing up on supply chain. If something went wrong, I can trace it back to digikey or mouser. I'll make them pay for selling counterfeit stuff if it ever happens. Good luck with your suppliers in the event when the stuff hits the fan. I understand the same argument people use when they decide not to purchase insurance. They must have plenty of money to cover for losses or they just don't plan on things they don't believe will happen.

The most of us here are doing hobby projects and small batches so we don't usually chase the cost all the way down to the cheapest MCU with barely enough memory for the job. The "job" is usually an evolving definition that keeps adding more to existing jobs so expandability is a must. 328p has the widest support in this community, so 328pb will likely be adopted by others when the hurdle to use it becomes just an easy hop from their comfort zone. That's what I'm trying to do, besides trying to use it on my own projects. I hoped that everyone would contribute in this direction. Apparently john1993 is interested in describing his own exploits more than helping with this cause.

maybe you missed the part about how i use both types of channels. i let the client choose though there is an obligation to provide best advice. after all i make no money if they fail for reasons you mentioned or others unrelated.

as far as "describing exploits" i do enjoy that. there are a few. then theres the "you can lead a horse to water...." phenomenon which i also find entertaining.

ymmv. gas price down lately so suv sales are up. maybe economy will tank again like previous administration in which case more move over to my viewpoint.

merry christmas to you too john!

yikes, and it aint even thanksgiving yet. you work for walmart? lol.

another thing worth mentioning is that should "fake" or "unreliable seller" issues actually ever threaten to rear their ugly head, theres the simple fact you can always run back to digi-world. win-win scenario.

btw i have tried the pb on a couple projects that needed slightly more io in one case and extra uart in another. however atm generally avoid moving over for cost and availability problems mentioned in the other threads. its an interesting part and i hope arduino picks up on it as it becomes more mainstream.

If you want test it --> https://github.com/watterott/ATmega328PB-Testing

initially i found this part quite interesting and enjoyed discussing on avrfreaks but unfortunately availability and pricing make it marginally useful compared to regular m328. i suppose there may be some case where extra features fit the odd application but for now other avr parts like m32 or m128 have even more and cost significantly less. too bad.

Hi all,

Did anyone manage to operate the 328PB with an external 16MHz crystal (like you'd operate the 328P in an Arduino)? There seems to be some issue with high-speed crystals, I'm looking for someone who actually tried it. I couldn't get it to run (...and bricked two MCUs in the process, don't know how - it's not my first time playing with MCUs and their clocks :o )

Thanks,

according to atmel app notes, unlike regular m328, full swing crystal fuse settings are not supported. i didnt bother to test this because i only have a few and they are expensive. 16mhz operation works fine with recommended setting.

john1993:
16mhz operation works fine with recommended setting.

Did you use an oscillator? Or are there recommended settings for "regular" crystals? (in other words, what App Note are we talking about? :slight_smile: )

Thanks,

checking the datasheet you will find there is no full swing option anymore. only low power mode now. it is a radical departure from most other avr. also note that 20mhz crystal operation is not supported now either.

i used regular crystal but operation was very flaky. long leads or anything nearby caused it to stop oscillating. cfd kicks in and it drops to 1mhz internal. the clock on regular avrs is very robust and, even though many go on and on about short leads, in reality this is not a problem unless you start talking feet not inches. imo this chip is a piece of crap.

john1993:
i used regular crystal but operation was very flaky. long leads or anything nearby caused it to stop oscillating.

I understand.

john1993:
imo this chip is a piece of crap.

I'm inclined to agree :frowning: I thought it was based on the 328P so what could possibly go wrong... but this stupid issue almost cost me a client's project.

you will find there is no full swing option anymore. only low power mode now. it is a radical departure from most other avr.

The "full swing oscillator" option has been removed from a bunch of the other ATmega chips recently as well; apparently the new process/fab renders it inoperable. This seems to mean that you can no longer operate an ATmega328p with a crystal faster than 16MHz, even though it's supposed to be a 20MHz part.

It's pretty disappointing. As other vendors go to faster and faster chips, Atmel moves backward. :frowning:
Maybe Microchip will fix things?

westfw:
The "full swing oscillator" option has been removed from a bunch of the other ATmega chips recently as well;

:o Oh wow. And for some models, "Power Save mode current consumption increased"...

Screw this, I'm going PIC. I mean, AVRs are so much more fun to work with, but who knows what land mine I'll step on next? This is crazy.

Atmega328P-PU is not on the list.
Nor Atme1284P, nor Atmega2560.

Tis a shame that ATmega328P-AU is listed.