The new Atmega328PB
-
@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.@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/
-
@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/
@Samuel235
This library is actually part of Arduino IDE 1.x and can be used for the purpose of using other pins as serial ports. But the atmega328pb has two hardware serial ports possible. The question is if I need them. In my case I prefer an extra SPI port over all the ADC pins (4 analog inputs is more then enough im my case).The datasheet of the atmea328pb is quite an interesting read indeed.
-
@Samuel235
This library is actually part of Arduino IDE 1.x and can be used for the purpose of using other pins as serial ports. But the atmega328pb has two hardware serial ports possible. The question is if I need them. In my case I prefer an extra SPI port over all the ADC pins (4 analog inputs is more then enough im my case).The datasheet of the atmea328pb is quite an interesting read indeed.
@GertSanders said:
I In my case I prefer an extra SPI port over all the ADC pins (4 analog inputs is more then enough im my case).
I think you have just answered your own question. If it suits your situation more, then go for the extra SPI port. I don't see where 2 seeial ports would be any use in any situation other than a gateway tbh. But thats my opinion :)
I might make the datasheet my next morning read over my breakfast ;)
-
Consider a RS485 network, with a node that needs to talk with a sensor / actuator via rs232.. Then dual UARTS is quite usable :)
But I admit, it's a very rare situation..
-
Consider a RS485 network, with a node that needs to talk with a sensor / actuator via rs232.. Then dual UARTS is quite usable :)
But I admit, it's a very rare situation..
@tbowmo
It seems two SPI devices connected to the mcu is more common (ethernet and nrf24, or flash and nrf24). -
@tbowmo
It seems two SPI devices connected to the mcu is more common (ethernet and nrf24, or flash and nrf24).@GertSanders talking about that, i may add some flash to my latest sensor board. Just a thought.
-
Hello, did anyone happen to use this new chip in the end ?
Or did it arrive too late ? -
@Nca78 I did test it for Atmega328p compatibility which looked just fine.
Not sure what the current state is regarding support for the extra peripherals though.