Atmega 2560 UARTs strange output and serial communication

UART Issues with atmega 2560

Hello everyone,

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've basically used the schematic of the arduino nano as a reference except that my usb connector is type A.

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?

Thanks!

Maybe the D+ and D- lines are reversed?

Hi JCA34F, thanks for your input.

I can confirm that I routed the D+ to USBP and D- to USBM pins of the FT232RL.

Have you set the serial monitor to the correct baud rate?

Is that a chassis connector like those on a computer, or the kind on the end of a USB cable?

Hi j remington thanks for your question.

Yes i did set the baud rate correctly in the serial monitor and also when I tested in another software called putty

Its a through hole connector with a chassis similar to those we see in a computer yes.

So similar to this (USB-A)?
image

Or like this (USB-B)?
image

Or ...

Can you capture the image on the scope and post it here. If it's a modern scope, then a screenshot will likely also include timing information.

Can you upload your schematic as well.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.