chicagoedt / Firmware

Atmel microcontroller code for all projects.
1 stars 4 forks source link

Atmega Serial System Issues #1

Open sabinoj opened 9 years ago

sabinoj commented 9 years ago

So I have noticed that there appears to be an issue with serial communications using the Atmega8_16PU, Atmega32, and the Atmega32u4. Chip to chip seems to be fine, but chip to another device appears to have issues. When using a USB-to-serial converter (that is known to work with the RoboteQ motor controller) the data transmitted from the Atmega chip appeared to be wrong and following a pattern. This pattern stays constant for the baud, but varies over different baud rates.

I'm not sure if there's a step in the USART configurations section that I'm missing or if the serial systems are just messed up. I will provide parameters of my tests later.

If anyone knows what I'm doing wrong feel free to asnwer it, otherwise I'll try to get in touch with an Atmel FAE within the next week.

sabinoj commented 9 years ago

So far Jeff Delia has tested the Atmega32U4 serial system and determined that for the UBRR1 register use the recommended value when U2Xn = 0 but set U2Xn = 1 and still left shift once and invert. This has been tested and holds true for all baud rates with a internal clock of 16MHz.

sabinoj commented 9 years ago

Tests need to be conducted on an Atmega8, Atmega16, and Atmega32 to confirm that this is consistent across all Atmel microcontrollers that we use.