UART Serial RX problems

Hello everyone,

I am having trouble sending a signal from my FPGA to my Arduino Uno.

I didn't have an FTDI cable on hand so I grabbed an Arduino instead to use as the middle man. The FPGA sends data to the Arduino Uno which the Arduino Uno then sends through USB to a terminal such as Putty or the Arduino serial terminal window.

I was having problems getting the Arduino to display the correct data so I just put in a test character, for example hex 66. The Arduino was not displaying the correct value at all, and occasionally the value would change.

I connected my oscilloscope to the FPGA and confirmed that the correct data is being sent, and it is not being sent backwards or anything either.

I wasn't exactly sure what UART/serial protocol the Arduino likes, (1 or 2 stop bits, parity, ect.) and I couldn't find a good answer from looking online.

Again here is my configuration:

1 Start bit (0) I assume the arduino is looking for a low start bit

8 Data bits

0 Parity bits

1 Stop bit (1) I assume the arduino wants a high stop bit

Baud rate: 115,200

I originally had the baud rate at 460,800 but that was causing the Arduino to get really bizarre results. I assumed it couldn't go that fast so I turned it down to 115,200 which the datasheet and forums said was okay, and now I am here. The data again is quite precise, (not randomly changing values or getting weird values) but the data is always wrong.

What could the problem be?

Are you connecting the FPGA TX to Arduino RX (pin 0)?

Yes.

That won't work. You will need a separate port for the FPGA. There are software serial libraries to use to set up a second serial port on a Uno. Software serial can not support the speed of the hardware serial port. An alternative is to use an Arduino with more than one hardware serial port (Mega).

What do you mean? I think I am just using the hardware serial port. The FPGA sends data to the arduino and the arduino sends that data to the screen. The Arduino doesn't communicate back to the FPGA.

Yeah I am using only the hardware serial port. I have no libraries in the project of any kind.

The PC (USB) TX connects to pin 0 (RX) on the Arduino through the USB to TTL converter chip. When you also connect the FPGA TX to Uno RX you have 2 outputs connected together. What happens if one output is low and the other is high?

The PC is not connected to any TX. The computer doesn't send anything to the Arduino.

Can you provide a schematic of your setup? Do you have a USB connection between the PC and Uno?

Its pretty simple, I just have the USB plugged into the Uno, and I have the FPGA TX connected to the Arduino RX.

So the output of the FPGA is connected to the output of the MCU (= input of the FTDI chip).
Leo..

Yeah that sounds like what I wanted when I was doing this! Now the question is if that is what is actually happening.

Is there anywhere I can look up the protocol arduino uses? Like the number of start and stop bits, parity, ect?

BPAArduino:
Yeah that sounds like what I wanted when I was doing this! Now the question is if that is what is actually happening.

Is there anywhere I can look up the protocol arduino uses? Like the number of start and stop bits, parity, ect?

Just pop out the 28pin Arduino chip,

Plug the FPGA-TX into pin 1 TX, for Transmit from FPGA to PC
Plug the FPGA-RX into pin 0 RX, to Send from PC to FPGA.
Connect a shared GND

Also, note, this contraption is INVERSE TTL of RS232 Levels. So inactive is HIGH (TTL) which corresponds to -12V RS232.

Configure your PC software to use the Serial port that Window's Identifies as ARDUINO UNO

Configure your PC software with the FPGA's Baud rate (the USB s/w with configure the Arduino board)

All done.

Chuck.

That is one of the most creative solutions yet! I hadn't thought of that at all.

Only one problem, the computer and/or any terminal software I use does recognize that the 'Arduino Uno' is plugged in but they fail to open a connection with it. What may be causing this?

BPAArduino:
That is one of the most creative solutions yet! I hadn't thought of that at all.

Only one problem, the computer and/or any terminal software I use does recognize that the 'Arduino Uno' is plugged in but they fail to open a connection with it. What may be causing this?

Turn off handshaking. Windows defaults to hardware.

Chuck.