ATmega328PB

Go To Last Post
41 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What's the status of this chip?  Announced last november, it's apparently shown up only as the eval board.   That's fairly typical, but in this case:

1) There's no 328PB chip in include/avr/iom*.h, or selectable from Atmel Studio.

2) The datasheet is a mess, mentioning a second UART and TWI interface in several places ("Features", table 6-1 "Port Function Multiplexing", Sec 15.11 "Power reduction register") but not in other places (UART or TWI sections, "register summary.")

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If interested in PB, then you've seen this thread?

https://www.avrfreaks.net/comment...

 

But no new information to address your questions.  Unless the new "getting started with..." app note has some?

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

(Yes, I saw that, dating from before the datasheet was even available, and devolving into talking about the more-available 168PB (which does NOT claim the 2nd uart or twi.)

The getting-started says to select atmega328pb as the processor, but AFAICT that doesn't exist yet.   The Xplained boards have been available for a while now; surely they're being used somehow?  Is the 328pb in the beta 7.0 AS?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:
1) There's no 328PB chip in include/avr/iom*.h, or selectable from Atmel Studio.

Atmel Corporation

Atmel Studio

http://www.atmel.com/tools/atmelstudio.aspx?tab=overview

...

ATmega328PB Part Pack for Atmel Studio 6.2
(37.9 MB, updated July 2015)
This bundle adds support for ATmega328PB device in Atmel Studio 6.2.SP2. Please see attached word file for more details.

...

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is the 328pb in the beta 7.0 AS?

Yep.

 

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ATmega328PB Part Pack for Atmel Studio 6.2

 Ah hah!  I was expecting things like that to show up as updates for the AVR8 Toolchain, rather than a separate thing.

Thanks!

 

(Hmm.  I guess it's not available via the extension manager at all, and has to be downloaded/installed manually.)

 

After installing, I do get a iom328pb.h in an appropriate place, which contains:

 

#define UCSR1A _SFR_MEM8(0xC8)
 :
#define TWBR1   _SFR_MEM8(0xD8)

And related code defining the second UART and TWI interface, and etc.  So I guess they're real.
(A bit messy.  TWBR0 and TWBR1 used to be bits in the TWBR register (which was stupid, anyway.)   Now they're the bitrate registers for the two TWI peripherals...)  (similarly for the other TWI registers, I guess.)  (This probably means that adding support for the 2nd TWI interface is not going to be very easy; the existing code all assumes a single TWI interface with fixed TWBR/TWSR/etc registers.)

 

Last Edited: Thu. Aug 27, 2015 - 09:03 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:
(This probably means that adding support for the 2nd TWI interface is not going to be very easy; the existing code all assumes a single TWI interface with fixed TWBR/TWSR/etc registers.)
mega328PB is a recent addition to ASF (USART driver).

Atmel Corporation

Atmel Software Framework 3.26 Release Notes
(file size: 66.6 KB, 14 pages, revision 3.26, updated: 08/2015)

http://www.atmel.com/Images/asf-releasenotes-3.26.0.pdf

...

Add MEGA328PB XMINI board support

...

"Dare to be naïve." - Buckminster Fuller

Last Edited: Sun. Aug 30, 2015 - 10:46 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:
What's the status of this chip?  Announced last november, it's apparently shown up only as the eval board.
Though no stock yet the MCU is in Mouser's catalog.

http://www.findchips.com/search/atmega328pb

 

http://www.mouser.com/search/include/aoo_popup.aspx?mouserpartnumber=556-ATMEGA328PB-AU

Edit: Added above URL for the eventual delivery date of the QFP 85C part.

"Dare to be naïve." - Buckminster Fuller

Last Edited: Fri. Sep 4, 2015 - 10:32 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:
TWBR0 and TWBR1 used to be bits in the TWBR register (which was stupid, anyway.)   Now they're the bitrate registers for the two TWI peripherals...)
What I've done in situations like this is to add some macros for older devices (ones with only one TWI controller).  Then, in the code for the TWI interface you can use the same register and bit names whether compiling for the mega328PB or the mega328P.

#if defined(TWCR) && !defined(TWCR0)
  #undef TWBR0
  #undef TWBR1
  #define TWBR0          TWBR
  #define TWSR0          TWSR
    #define TWPS00         TWPS0
    #define TWPS01         TWPS1
  #define TWAR0          TWAR
  #define TWDR0          TWDR
  #define TWCR0          TWCR
    #define TWIE0          TWIE
    #define TWEN0          TWEN
    #define TWWC0          TWWC
    #define TWSTO0         TWSTO
    #define TWSTA0         TWSTA
    #define TWEA0          TWEA
    #define TWINT0         TWINT
  #define TWAMR0         TWAMR
#endif

I've used the same strategy to normalize the USART register names across many devices, some having a single USART and others having multiple USARTs.

 

Also, the register arrangement for the two TWI controllers is uniform so you can use a structure to refer to them (as it is done for xmega devices).

typedef volatile uint8_t Reg8_t;

typedef struct
{
    Reg8_t BitRate;
    Reg8_t Status;
    Reg8_t Addr;
    Reg8_t Data;
    Reg8_t Ctrl;
    Reg8_t AddrMatch;
} TWI_t;

 

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:
What's the status of this chip?
I received TQFP sample chips less than a week after requesting them via the Atmel site.  The package came from Thief River Falls, MN and the packaging/labels looked a lot like what Digi-Key uses.  I suspect that Atmel employs Digi-Key for sample fulfillment (at least in the U.S.).

 

There appears to be some issues with the 3.5.0 toolchain (which supports the mega328PB) so I'm currently using the 3.4.3 toolchain, employing the documented technique for targeting unsupported devices.

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

dkinzer wrote:

I suspect that Atmel employs Digi-Key for sample fulfillment (at least in the U.S.).

 

Most likely... that is how and from where I receive my TI samples also and I am in Australia.

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:

ATmega328PB Part Pack for Atmel Studio 6.2

 Ah hah!  I was expecting things like that to show up as updates for the AVR8 Toolchain, rather than a separate thing.

 

 

We made the toolchain more device independent now - you don't need to wait for a new toolchain to compile code for a new device anymore. You only need the "device pack".

 

Checkout how Atmel Studio drives the compiler and linker for this device (specifically, the -B option).

Regards

Senthil

 

blog | website

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

dkinzer wrote:

 

There appears to be some issues with the 3.5.0 toolchain (which supports the mega328PB) so I'm currently using the 3.4.3 toolchain, employing the documented technique for targeting unsupported devices.

 

Are you talking about the SBI/CBI getting generated for an out of bound IO address issue? We have a fix for that on the way. Is there anything else that I'm not aware of?

Regards

Senthil

 

blog | website

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

saaadhu wrote:
Is there anything else that I'm not aware of?
I don't know what you do and don't know about.  There have been posts on the Arduino Developer list about significant increases in code size:
Quote:
New toolchain makes sketches slightly bigger: from ~2% bigger for Bridge and GSM to ~11% bigger for Blink.

 

See https://groups.google.com/a/ardu...

 

 

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

dkinzer wrote:
I suspect that Atmel employs Digi-Key for sample fulfillment (at least in the U.S.).
Digi-Key has stock for QFP; Mouser has ordered.

http://www.digikey.com/product-detail/en/ATMEGA328PB-AU/ATMEGA328PB-AU-ND/5638812

http://www.mouser.com/search/include/aoo_popup.aspx?mouserpartnumber=556-ATMEGA328PB-AU

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:
Digi-Key has stock for QFP
Just to be clear, Digi-Key has stock on hand in TQFP also.  I ordered some; the should arrive before week's end.  I hope the issues in the Engineering Samples have been fixed.  I'll report after I receive them. Edit: fixed typos.

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

Last Edited: Tue. Nov 17, 2015 - 03:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

dkinzer wrote:
I hope the issues in the Engineering Samples have been fixed.

There is a new [to me] datasheet rev. C/Oct-2015.  Errata is very minimal; certainly not the head-scratchers mentioned here.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
Errata is very minimal; certainly not the head-scratchers mentioned here.
The errata says:
Quote:
Updated the Low Power Crystal Oscillator Operating Modes and associated notes

On further investigation, I see that the Full Swing Crystal Oscillator mode is no longer present in the Device Clocking Options table (now Table 12-1, was Table 13-1).  Reference to the Full Swing Oscillator has also been removed from the discussion of the CFD.  I would assume that means that that didn't get fixed.

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

dkinzer wrote:

theusch wrote:

Errata is very minimal; certainly not the head-scratchers mentioned here.

 

The errata says:

Quote:

Updated the Low Power Crystal Oscillator Operating Modes and associated notes

 

 

You had me confused, 'cause Errata sez:

Then I had the thought that the wording sounded like datasheet rev history, and indeed:

...where some of the datasheet changes indeed pertain to found "idiosyncrasies".  Not an errata if they change the specs, right?  ;)  [lessee--Big Brother's Ministry of Truth has re-written the datasheet in Newspeak.  (apologies to George Orwell)]

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I wonder if it's going to run at 20MHz with an external crystal? The datasheets not at all clear.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:

I wonder if it's going to run at 20MHz with an external crystal? The datasheets not at all clear.

Indeed,  While the part is rated for 20MHz,

So to get to 20MHz one needs external clock.  Or resonator?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:

Brian Fairchild wrote:

I wonder if it's going to run at 20MHz with an external crystal? The datasheets not at all clear.

Indeed,  While the part is rated for 20MHz,...So to get to 20MHz one needs external clock.  Or resonator?

 

I might be doing Atmel a disservice. Even the current part has that table in it with no mention of 20MHz. Although the new PB part has lost the full-swing crystal oscillator which makes this section of the datasheet important...

 

Quote:

This Crystal Oscillator is a low power oscillator, with reduced voltage swing on the XTAL2 output. It gives
the lowest power consumption, but is not capable of driving other clock inputs, and may be more
susceptible to noise in noisy environments.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
Then I had the thought that the wording sounded like datasheet rev history
Sorry for the misleading word choice.

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

FYI, it looks like the newly released ASF 3.28.1, now (finally) supports the ATmega328PB.

 

Now hoping the ATmega168PB will be added soon...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Brian Fairchild wrote:
I wonder if it's going to run at 20MHz with an external crystal?
I received my production parts - date code 1543.  That's between the dates of cases that I reported to Atmel (Full Swing Oscillator not working and O3B/OC4B not working).  If they hadn't already fixed the issues it would have been too late, I suspect.

 

My initial test shows that the low power oscillator is much better behaved.  I tested it with 8MHz, 14.7MHz, 16MHz and 20MHz crystals and it appeared to work fine (on the bench) in each case.  It wouldn't run faster than 12MHz before, same crystals, same load capacitors.

 

Just for the fun of it, I tried the Full Swing Oscillator and it seemed to work fine with 8MHz, 14.7MHz and 16MHz crystals but not the 20MHz crystals.  That is an improvement over the Engineering Samples which I couldn't get to run faster than 12MHz with the Full Swing Oscillator.

 

I also verified that the Output Compare Modulator issue didn't get fixed.  It is supposed to be enabled only if OC3B *and* OC4B are enabled but it appears that it is enabled if either OC3B *or* OC4B are enabled.  As a consequence of this error, you must write a 1 to bit 2 of PORTD in order to get PWM output on PD2 from either Timer3 or Timer4.  I suspect that the same workaround would need to be used any time you want OC3B or OC4B output on PD2.  If you're actually using the Output Compare Modulator you'd write a 0 or a 1 to bit 2 of PORTD depending on whether you want AND or OR modulation.

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Dec 3, 2015 - 09:35 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Some stock at DigiKey:

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

Last Edited: Fri. Jan 29, 2016 - 06:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Maybe Neil Barnes can finally get an Atmel cpu that will run hot enough to go down in the hole.

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:

Maybe Neil Barnes can finally get an Atmel cpu that will run hot enough to go down in the hole.

 

If I remember correctly Bob, Neil doesn't work for that crew any longer.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"you must write a 1 to bit 2 of PORTD in order to get PWM output on PD2 from either Timer3 or Timer4" - that was very helpful. Thank you very much!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

+1 thanks for the workaround, I spent a weekend to find out that setting PD2 high just after setting DDRD register do the trick.... everything works fine now for using FAST PWM on OC3B PD2 pin. thanks!!!

esd

Last Edited: Mon. Oct 17, 2016 - 01:33 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Release Notes — PlatformIO 3.2.0b2 documentation

http://docs.platformio.org/en/latest/history.html

...

3.2.0

...

Development platform Atmel AVR

...

  • Added support for ATmega328PB MCUs
  • Updated Atmel AVR toolchain to GCC 4.9.2

...

via

https://community.platformio.org/t/platformio-cli-3-2-public-beta-1/984

via

https://community.platformio.org/c/announcements

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Microchip Technology Inc

Microchip

Product Change Notification - SYST-01KZPN918

http://www.microchip.com/mymicrochip/NotificationDetails.aspx?pcn=SYST-01KZPN918

Date:

05 Jun 2017

...

Notification subject:

Data Sheet - ATmega328PB - Complete Datasheet

...


http://www.microchip.com/wwwproducts/en/atmega328pb

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Once again:

Reason for Change: To Improve Manufacturability

???

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]