My testing until now shows USART0 running nicely at speeds to 1Mbps. USART1, 2 and 3 however, seem to lose the plot at around 200K.
Anybody have any experience with this?
My testing until now shows USART0 running nicely at speeds to 1Mbps. USART1, 2 and 3 however, seem to lose the plot at around 200K.
Anybody have any experience with this?
Could it be baud rate error? At high speeds, the resolution of the baud rate generator is a problem - use this calc: WormFood's AVR Baud Rate Calculator Ver. 2.1.1
You don't see this issue with UART0 through the atmega16u2-as-serial-adapter on the Mega2560 because the 16u2 is also an AVR clocked at 16mhz, so it is subject to the same baud rate issues, so the two still match.
Your serial adapters also may not be able to support that speed - many serial adapters have a limited selection of speeds, and are based on dividing a clock that's chosen to be an even multiple of normal baud rates (ex 9600) rather than ones like 500000 or 2000000. Check the specs on your serial adapters.
I've run all 4 ports through the same TTL-RS232 adapter into the same USB port using a variety of different terminal packages on the PC, including the IDE's serial monitor. Results are consistent. Additionally, I have my own bare metal routines (which I know to work) and have programmed each USART directly.
It's not actually a big deal, but what I read in the documentation suggests that each is capable of up to 2Mbps. My testing was purely curiosity rather than need. Just wondering if anybody else had stumbled across this.
I've tried Microchip but they seem to be too busy just now to deal with any queries about AVRs. I hope that's not foreshadowing the future.