0
\$\begingroup\$

So I have an issue with the UART configuration of my customized uC based on the ATmega2560. To establish serial communication, I'm using the FT232RL chip and the Arduino IDE.

I don't have any issues with the converter because through the FT_PROG program, I can detect the device. Also, a loopback test has been successful.

Regarding the baud rate, for the FT232RL, it has been configured through the COM port (Device Manager on Windows) at 9600. In the implemented code, the baud rate of serial.begin() is also set to 9600.

My problem arises from the fact that the ATmega outputs strange characters on the serial monitor. I've looked at the waveform on the oscilloscope of pin 46 (TX) and it's heavily distorted. I first tested on UART1 and then UART0, and the result is the same.

Additionally, I've configured the Fuse Bits through the Microchip software as EFUSE : 0xFD, HFUSE : 0xD8, LFUSE : 0xFF & LOCK BITS : 0xCF .

Inside the ATmega, I'm using the original Arduino ATmega2560 bootloader.

Do people experienced with the ATmega2560 have any idea what the problem might be? Is it a Fuse Bits issue or something else?

\$\endgroup\$
2
  • \$\begingroup\$ Usually serial terminal programs that open COM ports also set the baud rate and settings to whatever defaults they want. Setting them in Device Manager is usually irrelevant. Use some terminal that shows the baud rate. Also you could show a scope capture what you mean by distorted, or post the AVR code, or tell which terminal program you are using. Also post hardware schematics to verify your baud rate calculation. \$\endgroup\$
    – Justme
    Commented May 13 at 4:32
  • \$\begingroup\$ "the waveform on the oscilloscope of pin 46 (TX) and it's heavily distorted." ... could you show us please? \$\endgroup\$
    – jonathanjo
    Commented May 13 at 9:56

0

Browse other questions tagged or ask your own question.