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.
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.
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?
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.