Atmega328pb succesor.

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

Hi,

is the Atmega4809 family the successor of the Atmega48pb/.../328pb family? Finally, it is on Arduino. Or maybe will Atmega48pc/.../328pc be produced in the future?

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

Define "successor". If you just mean "a totally unrelated chip that happens to have been released later" then I guess the answer is yes.

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

Will Atmega4809 take over the Atmega328 market?

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

It depends on what you means as "the Atmega328 market". 

 

The 328 seems to fit a sweet spot of features, size, complexity, clock rate, cost, and more so that it covers a broad range of both professional and hobby applications. 

 

I will probably switch to 480x the next time around for the 50% more flash and multiple serial modules and higher clock rate. But, I am not thrilled by the access structure for peripheral registers and the complexity of the clock system. I don't think of the 480x as a replacement for 328. 

 

Jim

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

Last Edited: Sat. Jun 15, 2019 - 09:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey Jim, 

 

What do you mean by "access structure for peripheral registers?"  Is this regarding PORTB.DIR vs DDRB?

 

Matt

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

ka7ehk wrote:

...I am not thrilled by the access structure for peripheral registers...

 

There's nothing to stop you writing you own 'old-style' header file.

#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

Generally in electronics, companies don't change their basic technology platform until there is about a ten times gain in the performance-vs-price ratio over the currently-used technology.   So everything is slightly (or more than slightly) outdated where you work.

 

The chip that replaces the AVR mega328P (especially in the Arduino UNO and Nano--class devices) will need to have a 64MHz+ system clock, 128K+ Flash program ROM, 16K+ SRAM, double the peripherals, come from the factory with an Arduino/USB-compatable bootloader, be fully supported by the Arduino IDE, and be widely manufactured to sell as a mounted module board for $2-3 each on eBay.

 

The only device/board that even comes close is the "Blue Pill"  Cortex M3.  It meets all the above requirements except for the pre-installed bootloader, which actually is a 'deal-breaker' when it is not present, because these advanced 32-bit microcontrollers are all so insanely difficult to get functional and productive when they arrive in chip tubes from the factory.

 

Presently the ATmega328P is at the sweet spot where it is just big and capable enough to handle nearly all of the tasks designed around it, and still be cheap and easy enough for a wide range of low-volume applications.

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

Brian Fairchild wrote:

ka7ehk wrote:

...I am not thrilled by the access structure for peripheral registers...

 

There's nothing to stop you writing you own 'old-style' header file.

Or the other way round. You can have struct{} based register for traditional tiny/mega if you want ;-) 

 

https://github.com/wrightflyer/a...

 

But what's actually tricky about Xmega/AVR-0/1 is not the block.reg thing but the fact that the operation of the peripherals is so radically different.

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

It seems the ATDF files have much of what is needed, but masks instead of bit numbers.  Try this:

#!/usr/bin/python3

from lxml import etree

def doit(tree):
    # <avr-tools-device-file <variants ...
    variants = tree.find('variants')
    devices = tree.find('devices')
    modules = tree.find('modules')
    pinouts = tree.find('pinouts')
    #
    device = devices[0]
    d_name = device.attrib["name"]
    print("device:", d_name)
    #
    perifs = device.find('peripherals')
    for mod in perifs:
        m_name = mod.attrib["name"]
        for inst in mod:
            i_name = inst.attrib["name"]
            print(" ", i_name)
    #
    for mod in modules:
        m_name = mod.attrib["name"]
        rgrps = mod.xpath("register-group")
        for rgrp in rgrps:
            rg_name = rgrp.attrib["name"]
            print("\n/* === ", rg_name, "=== */")
            regs = rgrp.xpath("register")
            for reg in regs:
                reg_name = reg.attrib["name"]
                reg_offset = reg.attrib["offset"]
                reg_caption = reg.attrib["caption"]
                print("/*", reg_caption, " */")
                print("#define", reg_name, reg_offset)
                flds = reg.xpath("bitfield")
                for fld in flds:
                    f_name = fld.attrib["name"]
                    f_mask = fld.attrib["mask"]
                    f_caption = fld.attrib["caption"]
                    print("/*", f_caption, "*/")
                    print("#define", f_name, f_mask)
        

if __name__ == '__main__':
    filename = "/tmp/ATmega328P.atdf"
    filename = "/tmp/ATmega4809.atdf"
    f0 = open(filename, "rb")
    tree = etree.parse(f0)
    f0.close()
    doit(tree)

# --- last line ---

 

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

bapiii wrote:
is the Atmega4809 family the successor of the Atmega48pb/.../328pb family? Finally, it is on Arduino.

 

The mega328PB was probably what Atmel intended to be the successor of the mega328P/PA (i.e., the Arduino Uno/Nano MCU).

Note that, differently from what it may seem at first glance, the 328PB is _not_ a silicon revision of the 328P/PA, but a different, albeit very similar, chip: see the appnote https://www.microchip.com/wwwApp...

 

I view the mega4809 more like a somewhat modified 5V version of the xmega.

 

edit: To make it clear, the 48PB/88PB/168PB are silicon revisions of the previous P/PA, but the 328PB isn't. It has more peripherals (so in a way, it's "better").

Last Edited: Sun. Jun 16, 2019 - 04:27 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

El Tangas wrote:
I view the mega4809 more like a somewhat modified 5V version of the xmega.
XMEGA D

 

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

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

How old is the 328PB anyway? Surely it's only 1..2 years since it arrived to improve the 328P (itself around for about a decade) so I guess in 8..10 years there'll probably be a 328PC to replace the 328PB? Possibly a bit too soon to write off the 328PB that's so relatively new?

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

IMO, the Arduino people should have made a 328PB board, which would be a more direct upgrade from the classic uno/nano than a board based on the mega4809.

I think it would be more successful.

 

edit: And it would be easier to clone by the Chinese... ah, right, now I get it...

Last Edited: Sun. Jun 16, 2019 - 04:39 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
How old is the 328PB anyway?
IIRC, sometime in '15

clawson wrote:
Possibly a bit too soon to write off the 328PB that's so relatively new?
Concur as it has an automotive part whereas megaAVR 0-series doesn't; likewise for mega324PB.

 


PB megaAVR announced | AVR Freaks

https://www.microchip.com/wwwproducts/en/ATmega328PB#datasheet-toggle

https://www.microchip.com/wwwproducts/en/ATmega324PB#datasheet-toggle

 

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

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

these advanced 32-bit microcontrollers are all so insanely difficult to get functional and productive when they arrive in chip tubes from the factory.

How so? Do you mean actually getting the hex file burned into the chip, or  simply writing some simple code? 

 

 

And it would be easier to clone by the Chinese... ah, right, now I get it...

Are these Chinese versions not using Atmel (Microchip) chips, or are they substituting something else? 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

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

avrcandies wrote:
Are these Chinese versions not using Atmel (Microchip) chips, or are they substituting something else? 

 

They do use Atmels (mostly, there are some AVR clones too). The problem is the PC interface, the chinese replaced the (relatively) expensive interface chips present in the original designs by the CH340 which is much cheaper.

This only works if you upload code to the clones via a bootloader, but I believe the new Arduinos with the mega4809 use some kind of mEDBG interface and don't have a bootloader.

So this precludes the creation of ultra-cheap clones. Besides, mEDBG is a proprietary infestation in something that was open (yeah, ok, so the protocol is open but the Arduino people didn't bother to write an open source version, even a simple one without debug). 

Last Edited: Sun. Jun 16, 2019 - 06:21 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 so the protocol is open but the Arduino people didn't bother to write an open source version, even a simple one without debug). 

So Arduino is moving away from being open?  That doesn't sound too promising! Hopefully that is not any sort of official position, but instead simply a task needing someone to tackle.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

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

Finally a nice Nano based on Mega4809 at a good price.

 

https://store.arduino.cc/usa/nan...

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

angelu wrote:

Finally a nice Nano based on Mega4809 at a good price.

 

https://store.arduino.cc/usa/nan...

 

Nice, and with as bonus M0+ on-board as well.

#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