Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. The new Atmega328PB

The new Atmega328PB

Scheduled Pinned Locked Moved Hardware
29 Posts 8 Posters 11.7k Views 7 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    ericvdb
    wrote on last edited by ericvdb
    #1

    The high-performance Atmel® ATmega328PB is an 8-bit AVR RISC-based microcontroller (MCU) with picoPower® technology. It combines 32kB ISP Flash memory with read-while-write capabilities, 1kB EEPROM, 2kB SRAM, 27 general purpose I/O lines, 32 general purpose working registers, five flexible timer/counters with compare modes, internal and external interrupts, two USARTs with wake-up on start of transmission, two byte-oriented 2-wire serial interfaces, two SPI serial ports, 8-channel 10-bit A/D converter, programmable watchdog timer with internal oscillator, a unique serial number and six software selectable power saving modes. The device operates between 1.8-5.5 volts.

    The ATmega328PB is the first 8-bit AVR MCU to feature the QTouch® Peripheral Touch Controller (PTC), which acquires signals in order to detect touch on capacitive sensors, and supports both self- and mutual-capacitance sensors. The PTC is supported by the QTouch Composer development tool (QTouch Library project builder and QTouch Analyzer). It provides a faster and less complex capacitive touch implementation in any application.

    The ATmega328PB supports 24 buttons in self-capacitance mode, or up to 144 buttons in mutual-capacitance mode. Mixing and matching mutual-and self-capacitance sensors is possible, and only one pin is required per electrode – no external components are required, delivering savings on the BOM cost compared to competing solutions.
    By executing powerful instructions in a single clock cycle, the device achieves throughputs approaching 1 MIPS per MHz, balancing power consumption and processing speed.

    Nice feature for MySensors is that it has 2 SPI interfaces, so nice for the ethernet gateway ;) and also has a Unique ID

    Application note here

    Thanks to @samuel235 for finding this.

     Flash (Kbytes):				32 Kbytes
     Pin Count:						32
     Max. Operating Freq. (MHz):		20 MHz
     CPU:							8-bit AVR
     # of Touch Channels:			12
     Hardware QTouch Acquisition:	Yes
     Max I/O Pins:					27
     Ext Interrupts:				27
     USB Speed:						No
     USB Interface:					No
     SPI:							2
     TWI (I2C):						2
     UART:							2
     Graphic LCD:					No
     Video Decoder:					No
     Camera Interface:				No
     ADC Channels:					8
     ADC Resolution (bits):			10
     ADC Speed (ksps):				15
     Analog Comparators:			1
     Resistive Touch Screen:		No
     DAC Channels:					0
     DAC Resolution (bits):			0
     Temp. Sensor:					Yes
     Crypto Engine:					No
     SRAM (Kbytes):					2
     EEPROM (Bytes):				1024
     Self Program Memory:			YES
     External Bus Interface:		0
     DRAM Memory:					No
     NAND Interface:				No
     picoPower:						Yes
     Temp. Range (deg C):			-40 to 85
     I/O Supply Class:				1.8 to 5.5
     Operating Voltage (Vcc):		1.8 to 5.5
     FPU:							No
     MPU / MMU:						no / no
     Timers:						5
     Output Compare Channels:		10
     Input Capture Channels:		3
     PWM Channels:					10
     32kHz RTC:						Yes
     Calibrated RC Oscillator:		Yes
     Watchdog:						Yes
     CAN:							0
     LIN:							0
     Ethernet:						0
     Debug Interface:				debugWIRE
     I2S:							No
     RTC:							Counter
    
    S 1 Reply Last reply
    1
    • E ericvdb

      The high-performance Atmel® ATmega328PB is an 8-bit AVR RISC-based microcontroller (MCU) with picoPower® technology. It combines 32kB ISP Flash memory with read-while-write capabilities, 1kB EEPROM, 2kB SRAM, 27 general purpose I/O lines, 32 general purpose working registers, five flexible timer/counters with compare modes, internal and external interrupts, two USARTs with wake-up on start of transmission, two byte-oriented 2-wire serial interfaces, two SPI serial ports, 8-channel 10-bit A/D converter, programmable watchdog timer with internal oscillator, a unique serial number and six software selectable power saving modes. The device operates between 1.8-5.5 volts.

      The ATmega328PB is the first 8-bit AVR MCU to feature the QTouch® Peripheral Touch Controller (PTC), which acquires signals in order to detect touch on capacitive sensors, and supports both self- and mutual-capacitance sensors. The PTC is supported by the QTouch Composer development tool (QTouch Library project builder and QTouch Analyzer). It provides a faster and less complex capacitive touch implementation in any application.

      The ATmega328PB supports 24 buttons in self-capacitance mode, or up to 144 buttons in mutual-capacitance mode. Mixing and matching mutual-and self-capacitance sensors is possible, and only one pin is required per electrode – no external components are required, delivering savings on the BOM cost compared to competing solutions.
      By executing powerful instructions in a single clock cycle, the device achieves throughputs approaching 1 MIPS per MHz, balancing power consumption and processing speed.

      Nice feature for MySensors is that it has 2 SPI interfaces, so nice for the ethernet gateway ;) and also has a Unique ID

      Application note here

      Thanks to @samuel235 for finding this.

       Flash (Kbytes):				32 Kbytes
       Pin Count:						32
       Max. Operating Freq. (MHz):		20 MHz
       CPU:							8-bit AVR
       # of Touch Channels:			12
       Hardware QTouch Acquisition:	Yes
       Max I/O Pins:					27
       Ext Interrupts:				27
       USB Speed:						No
       USB Interface:					No
       SPI:							2
       TWI (I2C):						2
       UART:							2
       Graphic LCD:					No
       Video Decoder:					No
       Camera Interface:				No
       ADC Channels:					8
       ADC Resolution (bits):			10
       ADC Speed (ksps):				15
       Analog Comparators:			1
       Resistive Touch Screen:		No
       DAC Channels:					0
       DAC Resolution (bits):			0
       Temp. Sensor:					Yes
       Crypto Engine:					No
       SRAM (Kbytes):					2
       EEPROM (Bytes):				1024
       Self Program Memory:			YES
       External Bus Interface:		0
       DRAM Memory:					No
       NAND Interface:				No
       picoPower:						Yes
       Temp. Range (deg C):			-40 to 85
       I/O Supply Class:				1.8 to 5.5
       Operating Voltage (Vcc):		1.8 to 5.5
       FPU:							No
       MPU / MMU:						no / no
       Timers:						5
       Output Compare Channels:		10
       Input Capture Channels:		3
       PWM Channels:					10
       32kHz RTC:						Yes
       Calibrated RC Oscillator:		Yes
       Watchdog:						Yes
       CAN:							0
       LIN:							0
       Ethernet:						0
       Debug Interface:				debugWIRE
       I2S:							No
       RTC:							Counter
      
      S Offline
      S Offline
      Samuel235
      Hardware Contributor
      wrote on last edited by Samuel235
      #2

      @ericvdb - This looks like a huge step forward to increase the capabilities of an already fantastic uC.

      Thank you for tagging/linking me into your detailed thread regarding this new uC from Atmel.

      MySensors 2.1.1
      Controller - OpenHAB (Virtual Machine)
      Gateway - Arduino Mega MQTT Gateway W5100

      1 Reply Last reply
      0
      • E Offline
        E Offline
        ericvdb
        wrote on last edited by
        #3

        @samuel235 with pleasure ;)

        1 Reply Last reply
        0
        • tbowmoT Offline
          tbowmoT Offline
          tbowmo
          Admin
          wrote on last edited by
          #4

          It really is a step up the ladder, with more peripherals.

          However, the memory is still only 32Kb flash (minus space for bootloader..). So for advanced nodes (or GW's) it will be too small..

          1 Reply Last reply
          0
          • E Offline
            E Offline
            ericvdb
            wrote on last edited by
            #5

            With the 2 SPI ports, the softSpi library is not needed. Wouldn't that free up some space for a gateway?

            S 1 Reply Last reply
            0
            • E ericvdb

              With the 2 SPI ports, the softSpi library is not needed. Wouldn't that free up some space for a gateway?

              S Offline
              S Offline
              Samuel235
              Hardware Contributor
              wrote on last edited by
              #6

              @ericvdb - Now, that is what you call "Good thinking batman". If you are correct in saying that then yes, surly it would. But how much, is the question.

              MySensors 2.1.1
              Controller - OpenHAB (Virtual Machine)
              Gateway - Arduino Mega MQTT Gateway W5100

              1 Reply Last reply
              0
              • P Offline
                P Offline
                peka
                wrote on last edited by
                #7

                For all of you that need two SPI ports, two SPI ports are already embedded in the "regular" ATMega328p. That is if you don't need the USART. The USART can be configured to operate in MSPIM (Master SPI Mode). By the name of it you can conclude that the device only operates as master. But I guess that is fine for 99% of all MySensors applications?

                Here is an Atmel application note concerning this matter:
                http://www.atmel.com/Images/doc2577.pdf

                S 1 Reply Last reply
                1
                • P peka

                  For all of you that need two SPI ports, two SPI ports are already embedded in the "regular" ATMega328p. That is if you don't need the USART. The USART can be configured to operate in MSPIM (Master SPI Mode). By the name of it you can conclude that the device only operates as master. But I guess that is fine for 99% of all MySensors applications?

                  Here is an Atmel application note concerning this matter:
                  http://www.atmel.com/Images/doc2577.pdf

                  S Offline
                  S Offline
                  Samuel235
                  Hardware Contributor
                  wrote on last edited by
                  #8

                  @peka - Ahhh, interesting. Thank you for providing that link for us.

                  MySensors 2.1.1
                  Controller - OpenHAB (Virtual Machine)
                  Gateway - Arduino Mega MQTT Gateway W5100

                  1 Reply Last reply
                  0
                  • GertSandersG Offline
                    GertSandersG Offline
                    GertSanders
                    Hardware Contributor
                    wrote on last edited by
                    #9

                    I would not be suprised to see that there are more overlaps on the pins. Like using 2 serial ports means only 1 I2C. I ordered samples, should get them coming monday, and then I will start playing with these new thingies :-)

                    1 Reply Last reply
                    0
                    • GertSandersG Offline
                      GertSandersG Offline
                      GertSanders
                      Hardware Contributor
                      wrote on last edited by
                      #10

                      Just a quick update: this mcu has a few pins which were power related on the older atmega328p-au. So i will need to make/find a board layout to expose all pins. I saw something on Hackaday, to be investigated. I received samples from Atmel, they do not have this chip in dip28. Makes sense given that there are more signals to be brought to the outside. The AU and AN package are the only options (so only SMD).

                      1 Reply Last reply
                      0
                      • scalzS Offline
                        scalzS Offline
                        scalz
                        Hardware Contributor
                        wrote on last edited by
                        #11

                        yep one or two vcc I don't remember are signals now. it's cool idea. I won't have lot of time to test it...so I will follow your work ;) I'm note sure if it is already available in arduino ide boards???

                        1 Reply Last reply
                        0
                        • GertSandersG Offline
                          GertSandersG Offline
                          GertSanders
                          Hardware Contributor
                          wrote on last edited by
                          #12

                          @scalz I have not yet seen any Arduino boards, and from what I have read online, the IDE does not yet support this mcu (but you can get it to work with some manual intervention).

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            Samuel235
                            Hardware Contributor
                            wrote on last edited by
                            #13

                            It shouldn't be long before the arduino boards start putting these as an option at least. They should let us have the option between the old and the new 328 uC I would assume.

                            MySensors 2.1.1
                            Controller - OpenHAB (Virtual Machine)
                            Gateway - Arduino Mega MQTT Gateway W5100

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              Samuel235
                              Hardware Contributor
                              wrote on last edited by
                              #14

                              Just to let you guys know, I've been notified that uk.farnell.com has the ATMEL ATmega328PB-au in stock and ready for purchase now.

                              MySensors 2.1.1
                              Controller - OpenHAB (Virtual Machine)
                              Gateway - Arduino Mega MQTT Gateway W5100

                              GertSandersG 1 Reply Last reply
                              0
                              • S Samuel235

                                Just to let you guys know, I've been notified that uk.farnell.com has the ATMEL ATmega328PB-au in stock and ready for purchase now.

                                GertSandersG Offline
                                GertSandersG Offline
                                GertSanders
                                Hardware Contributor
                                wrote on last edited by
                                #15

                                @samuel235
                                ATMEL was so nice to send me 3 samples. My first smd based node will be with this mcu. Hardware wise the changes are minimal.

                                S 1 Reply Last reply
                                1
                                • GertSandersG GertSanders

                                  @samuel235
                                  ATMEL was so nice to send me 3 samples. My first smd based node will be with this mcu. Hardware wise the changes are minimal.

                                  S Offline
                                  S Offline
                                  Samuel235
                                  Hardware Contributor
                                  wrote on last edited by
                                  #16

                                  @GertSanders - I applied for a sample, got denied. :expressionless:

                                  MySensors 2.1.1
                                  Controller - OpenHAB (Virtual Machine)
                                  Gateway - Arduino Mega MQTT Gateway W5100

                                  GertSandersG 1 Reply Last reply
                                  0
                                  • S Samuel235

                                    @GertSanders - I applied for a sample, got denied. :expressionless:

                                    GertSandersG Offline
                                    GertSandersG Offline
                                    GertSanders
                                    Hardware Contributor
                                    wrote on last edited by
                                    #17

                                    @samuel235
                                    I was thinking about the ports to expose. I believe a second SPI is preferrable over a second serial port.
                                    The second I2C port is also multiplexed with other pins. Does not seem like a good choice to add this to external headers if I want to keep external headers to a minimum.
                                    A pro mini layout already exists so I'm looking more at specialised sensor boards with minimal extension and trying to set priorities.
                                    Any thoughts on this ?

                                    S 1 Reply Last reply
                                    0
                                    • GertSandersG GertSanders

                                      @samuel235
                                      I was thinking about the ports to expose. I believe a second SPI is preferrable over a second serial port.
                                      The second I2C port is also multiplexed with other pins. Does not seem like a good choice to add this to external headers if I want to keep external headers to a minimum.
                                      A pro mini layout already exists so I'm looking more at specialised sensor boards with minimal extension and trying to set priorities.
                                      Any thoughts on this ?

                                      S Offline
                                      S Offline
                                      Samuel235
                                      Hardware Contributor
                                      wrote on last edited by
                                      #18

                                      @GertSanders, from my research, I would have to show my interest on I2C simply due to it only requiring 2 connections to the slave/master device. I'm not 100% sure on your thoughts regarding the multiplexing with other pins, from my understanding of I2C, and the standout advantages, you can use multiple connections on the SCL/SDA lines that I2C require.

                                      Could you explain what you mean by the port is multiplexed with other pins please?
                                      Could you also elaborate on why you're thinking to have a second SPI connection instead?

                                      Sorry if i'm being slightly dumb about this, after-all, i have only just this second recieved my 'Hardware Contributor' title :flushed:

                                      MySensors 2.1.1
                                      Controller - OpenHAB (Virtual Machine)
                                      Gateway - Arduino Mega MQTT Gateway W5100

                                      GertSandersG 1 Reply Last reply
                                      0
                                      • S Samuel235

                                        @GertSanders, from my research, I would have to show my interest on I2C simply due to it only requiring 2 connections to the slave/master device. I'm not 100% sure on your thoughts regarding the multiplexing with other pins, from my understanding of I2C, and the standout advantages, you can use multiple connections on the SCL/SDA lines that I2C require.

                                        Could you explain what you mean by the port is multiplexed with other pins please?
                                        Could you also elaborate on why you're thinking to have a second SPI connection instead?

                                        Sorry if i'm being slightly dumb about this, after-all, i have only just this second recieved my 'Hardware Contributor' title :flushed:

                                        GertSandersG Offline
                                        GertSandersG Offline
                                        GertSanders
                                        Hardware Contributor
                                        wrote on last edited by
                                        #19

                                        @Samuel235
                                        What I mean is that the pins for serial port 2 (RXD1 and TXD1 are also SPI ports MISO0 and MOSI0). So if I want to use two SPI ports, the second serial port can not be used.
                                        The second I2C port sits on pins PE0 and PE1, no real issue there, but SDA0 and SCL0 are actually A4 and A5.
                                        At the moment I think I will expose the second I2C port, not the first one (leave those pins to be analog inputs), and route both SPI ports to a seperate 6 pin header.

                                        S 1 Reply Last reply
                                        1
                                        • GertSandersG GertSanders

                                          @Samuel235
                                          What I mean is that the pins for serial port 2 (RXD1 and TXD1 are also SPI ports MISO0 and MOSI0). So if I want to use two SPI ports, the second serial port can not be used.
                                          The second I2C port sits on pins PE0 and PE1, no real issue there, but SDA0 and SCL0 are actually A4 and A5.
                                          At the moment I think I will expose the second I2C port, not the first one (leave those pins to be analog inputs), and route both SPI ports to a seperate 6 pin header.

                                          S Offline
                                          S Offline
                                          Samuel235
                                          Hardware Contributor
                                          wrote on last edited by
                                          #20

                                          @GertSanders, I'm pretty sure there is a software serial port work-around. So if you wanted to have the SPI ports AND the two serial ports, you could use digital pins for serial2 and then enable the software serial port as serial port 2. That way, correct me if i'm wrong, you would end up with 2 serial ports and 2 SPI ports. Again, i'm not 100% certain on this topic though, I'm out of my depths, its given me some information and a lot of interest in learning about the ports even more now though, thank you!

                                          Not sure if this gives you any other possibilities, but this is the NewSoftSerial solution that enables you to have a software serial port. http://arduiniana.org/libraries/newsoftserial/

                                          MySensors 2.1.1
                                          Controller - OpenHAB (Virtual Machine)
                                          Gateway - Arduino Mega MQTT Gateway W5100

                                          GertSandersG 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          18

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular