Go Down

Topic: Using the new ATMEGA328PB (Read 19659 times) previous topic - next topic

john1993

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.

igendel

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

imo this chip is a piece of crap.
I'm inclined to agree :( 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.
My Adventures in the Making:
http://www.idogendel.com/en

westfw

Quote
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.
http://media.digikey.com/pdf/PCNs/Atmel/WC154601.pdf

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


igendel

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.
My Adventures in the Making:
http://www.idogendel.com/en

CrossRoads

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

Tis a shame that ATmega328P-AU is listed.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

dmjlambert

When using ATmega328PB and mapping those extra pins, this is probably a good opportunity to map PB7/XTAL2 and use that as a regular I/O pin, and make the standard thing to do use an oscillator instead of a crystal.   It is OK that an oscillator does not cost the same as a clod of dirt like a crystal does, because you're enjoying the extra pins and various other additional features.   

igendel

When using ATmega328PB and mapping those extra pins, this is probably a good opportunity to map PB7/XTAL2 and use that as a regular I/O pin, and make the standard thing to do use an oscillator instead of a crystal. 
Fair enough, but would it kill Atmel to write this down explicitly in the datasheet or the "What's different" document? Or maybe they figured it's Microchip's problem now  :D 

It is OK that an oscillator does not cost the same as a clod of dirt like a crystal does, because you're enjoying the extra pins and various other additional features.
At ~$1 per extra pin, I doubt this is such an awesome deal... what other advantages are there?

Also, any tips for soldering oscillators by hand? Most of the models seems to have only those poor little pads at the bottom...  :(
My Adventures in the Making:
http://www.idogendel.com/en

dmjlambert

what other advantages are there?
I guess the only advantage I can think of is getting to use the ATmega328PB reliably and so john1993 can have his foot-long clock leads.   :-)

I see there are oscillators with pads on the bottom that also wrap part way up the side.  I think that would be my selection for hand soldering.  A little flux and pre-tinned pads and should be fine.  This processor will require the hobbyist to get comfortable with SMD anyway, since a DIP version is not available. 

$1 per pin for that one extra pin, and all those other pins are practically free!  Think of it as a special buy.   

I think a PB Pro Mini version may be interesting just for the extra serial port pins, even if none of the other new pins are brought out to headers.   And the Pro Mini would probably be fine with a regular crystal, because of the short clock leads.   I have not yet bought one of these MCUs to try out.  I might find it crappy like john1993 does, or I might like it. 



igendel

I see there are oscillators with pads on the bottom that also wrap part way up the side.  I think that would be my selection for hand soldering.  A little flux and pre-tinned pads and should be fine.  This processor will require the hobbyist to get comfortable with SMD anyway, since a DIP version is not available. 
I saw a couple of oscillators with short through-hole leads; not the highest-accuracy (lowest +/-ppm) ones though. I can solder regular SMDs, that's not a problem.

$1 per pin for that one extra pin, and all those other pins are practically free!  Think of it as a special buy.   
Heh, we should say then it's only $0.99, much more convincing  :)

I think a PB Pro Mini version may be interesting just for the extra serial port pins, even if none of the other new pins are brought out to headers.   And the Pro Mini would probably be fine with a regular crystal, because of the short clock leads.   I have not yet bought one of these MCUs to try out.  I might find it crappy like john1993 does, or I might like it. 
I got them because of the extra timers. They seem really cool for all sorts of applications... unless you get bit in the b*** by this crystal issue like I did.
My Adventures in the Making:
http://www.idogendel.com/en

john1993

I guess the only advantage I can think of is getting to use the ATmega328PB reliably and so john1993 can have his foot-long clock leads.   :-)
how else can i manage to have mcu in one room and xtl in another room? lol

seriously i use the long lead test as a way to characterize oscillator performance and reliability.  not just mcu either.  some circuits like avr low frequency mode and also low power mode can misbehave with fast rise signals nearby or just bringing your finger close.  stable configurations may tolerate actually holding your finger or screwdriver on the pin.  naturally the latter more desirable.

liuzengqiang

If either of you has access to a digital scope, it would be nice to see the clock signals. Are they nice sine waves or crappy?
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter

john1993

a regular scope probe has significant effect on signals like avr low power clock and in the case of pb tend to stop it dead.  its been a while but using diy active probe i saw a very perfectly formed (albeit low amplitude) sine.  a sure sign of marginal activity.  the strongest clock waveforms are far from sine and closer to square.  rail-to-rail generally as seen for chips that have full swing capability like regular m328.

jaredS_

First post, but i've been following any 328pb info as I (foolishly) used it on a new PCB design of mine. Might as well contribute what i've learned thus far.

I tried out the optiboot bootloader from watterott, it doesnt work in the IDE, but I managed to upload it in avrdude using -Ulock:w:0x3F:m instead.

Then I attempted to upload a sketch using FTDI, no dice. Could be something trivial like reversed TX/RX or something on my end, I need to read the datasheet again.  I ended up uploading a blink.hex using ISP, and it works(blinks an LED!). I used the internal 8Mhz because I didn't have any low power oscillators in my hardware bin..

Timer 3 has a slight issue when I tried to use output compare. It's not OCIE3A like I expected, but just OCIEA. I looked at iom328pb.h and this also applies to TOIE, OCIEB, ICIE, for timer 3. Timer 1 and 2 are normal (eg. OCIE1A).


Sorry if any of this doesn't make sense, i'm kind of new to arduino/electronics in general.


westfw

Quote
Then I attempted to upload a sketch using FTDI, no dice.
FWIW, a standard Optiboot at 57600bps works fine on an Atmel 328PB Xplained Mini eval board.  It doesn't do 115200, because the mEDBG chip apparently doesn't use the U2X mode on its uart.  And putting the bootloader ON to the Xplained mini (through the mEDBG) still seems to require Atmel Studio.



soupmoose

FWIW, a standard Optiboot at 57600bps works fine on an Atmel 328PB Xplained Mini eval board.  It doesn't do 115200, because the mEDBG chip apparently doesn't use the U2X mode on its uart.  And putting the bootloader ON to the Xplained mini (through the mEDBG) still seems to require Atmel Studio.
Not to completely resurrect a dead thread, but I've been attempting to do this exact thing, and have had no success. The bootloader programs fine thru Atmel Studio (7.0), and the board appears in the IDE - but the programmer times out every attempt.

I also burnt different fuse bits and attempted to program through this tutorial, also to no avail. Any advice would be greatly appreciated.

Go Up