ATMega or other MCU as a UART router

I'm trying to do some scalability testing with as many Zigbee nodes as I can.

Currently, I'm using the Arduino Mega's 4 UART ports to answer requests from the Zigbee nodes and generate fake responses for them. It scans all the ports to check for a byte and adds them to an array for each port until it has a complete packet. Then it sends that packet to a function to generate a response to be transmitted out the received port. The Zigbee nodes communicate to their host device at 38400 8N2.

I've heard of SoftSerial but it has limitations like it can only do 8N1 and can only receive on one port. Is this true?

Is there a such thing as a microcontroller in which all the pins except for VCC, RST, and GND are hardware UARTs?

As far as I remember, four hardware UARTs is the max on any of the ATmega line.

I suspect you'll run into performance limitations if you're hoping to hack SoftSerial to run multiple instances. (If that's what you meant by only one port...)

Your quest is close to my own. :grin:

The SAM (as in the Due) has 5 UARTs (well 4 USARTs and a UART), but it sounds like you could use some quad or octal I2C/SPI UARTs.


Rob