324PB compatible with 324P ?

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

I saw some notes about this in the 328PB manual for it being code compatible with 328P, but I wonder if the same holds true for the 324PB.  I didn't see it in the datasheet but perhaps I didn't search enough.  Can the 324PB be a drop in replacement and use the same code as a 324P ?

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

alank2 wrote:
Can the 324PB be a drop in replacement ...
No

alank2 wrote:
... and use the same code as a 324P ?
Yes

mega4809 is the follow-on to mega324PB.

 


AN_42769 AVR42769: Differences Between ATmega324 and ATmega324PB

via ATmega324PB - 8-bit PIC Microcontrollers

ATMEGA4809 - 8-bit AVR Microcontrollers - Microcontrollers and Processors

 

edit : mega3209 is sampling

ATMEGA3209 - 8-bit Microcontrollers

 

edit2 : https://new.microchipdirect.com/product/search/all/ATmega3209

 

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

Last Edited: Sun. Apr 14, 2019 - 02:57 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think it is similar to 328PB in that sense. I think existing 324 code will work on 324PB. I also thought that it could be a drop in replacement hardware-wise (as long as you don't use things like full swing crystal).

Edit: typo

 

Last Edited: Sun. Apr 14, 2019 - 10:40 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Was there going to be a 644PB, but then the 0-series came along?

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

Who knows. There is no 164PB either (unlike 328PB, which was later followed by 168PB/88PB/48PB). Where the 0-series fit into this - no idea. It's a completely different thing altogether.

 

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

PB is PIN compatible.

 

PB is NOT oscillator compatible (PB has no full-swing oscillator). Have not checked what happens if you use a full-swing oscillator fuse setting on a PB.

 

For the features that are exactly in common between P and PB, register function appears identical and at the same memory addresses. This SHOULD make P code directly executable on PB.

 

PB has different signature than P.

 

PB, of course, has additional features compared to P. So, code written for PB will NOT be backward compatible if any of the new features are accessed.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

ezharkov wrote:
Where the 0-series fit into this - no idea.
A follow-on (USART BRG replaced by FBRG, auto-baud, interrupt controller, event system, CCL, CRC, etc)

mega324PB has an automotive version whereas automotive has yet to arrive for megaAVR 0-series.

ezharkov wrote:
It's a completely different thing altogether.
CPU's the same, memory is unified, I/O is different, power may be reduced.

 


megaAVR 0-series | AVR Freaks

 

edit : strikethru

automotive AVR :

  • mega168PA
  • mega32C1
  • mega64C1
  • XMEGA64D3
  • tinyAVR 1-series (tiny416, tiny417, tiny816, tiny817, tiny1616, tiny1617)

 

edit2 : un-strikethru

  • mega324PB (-ABT, -MBT)

 

edit3 : https://new.microchipdirect.com/product/ATMEGA324PB-AUTOMOTIVE

 

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

Last Edited: Sun. Apr 14, 2019 - 08:23 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"0-series" ... "CPU's the same" - it looks that this is the only thing that is the same. The rest is different. So we basically have (at least) 3 very different series: the original AVR, XMEGA, 0-series.

 

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

ezharkov wrote:
...  (as long as you don't use think like full swing crystal).
The 16MHz crystal on the mega324PB Xplained Pro (3.3V)

mega324PB Xplained Pro 16MHz crystal schematic

Epson Toyocom

TSX-3225 16.0000MF09Z-AC3

16MHz uXtal, 3.2 x 2.5 mm SMD, CL=9pF, 15PPM, ESR=80ohm(Max ...

ATmega324PB Xplained Pro

 

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

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

gchapman wrote:

CPU's the same, memory is unified, I/O is different, power may be reduced.

 

Actually, the differences are deep enough to consider the CPU is _not_ the same. AVR-0/1 uses the same instruction set, yes, but:

  • registers are not memory mapped
  • some instructions have different (usually faster) timings -> this one for sure means the CPU is different. The timings are similar to a xmega CPU.

 

I don't know about the 324 series, but the 328P and 328PB have different pinouts, so they are not really drop-in replacements. You could mount a 32 pin 328PB in place of a 32 pin 328P, but some power traces will be permanently connected to I/O pins, increasing the risk of something going very bad. A program error could cause a short.

 

edit: there is an appnote on 328P/PB differences http://www.microchip.com//wwwApp...

Last Edited: Mon. Apr 15, 2019 - 10:44 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

El Tangas wrote:
The timings are similar to a xmega CPU.
XMEGA DMA affects timing.

https://www.avrfreaks.net/forum/megaavr-0-series?page=3#comment-2597036

 

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

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

alank2,

when in doubt best is to compare the datasheets.

firs and most profound difference is that there are "extra" io pins and thus functionality. 2 power pins have been converted into IO lines and ADC lines have gotten IO functionality.

This means you need different IO configurations for both. not only IO line wise, but also for instance when using the ADC on these channels you most likely need to now disable the internal digital IO block to be able to do a good ADC reading ( have not checked beyond pinout differences)

So although they fit on the same footprint and in general seem to be "compatible"  there are subtle changes/differences that will need effort and thus different code.

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

Did not catch the converted power pins. That makes PB a "migration" from P, but not truly pin compatible. 

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net