Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Can't get Spartan 3E to talk over UART to PIC246FJ128 UART

Status
Not open for further replies.

Build-A-Burger

Full Member level 1
Joined
Oct 27, 2010
Messages
95
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Wyoming
Activity points
2,101
I have a UART implemented using VHDL on a Spartan 3E and have the RX going to the TX of a PIC24FJ128. The RX from the PIC goes to the TX of the FPGA. I have the baud rate set right but they don't seem to want to talk to each other. They are both at 3.3v so I'm guessing I need either a current limiting resistor or some kind of driver. The FPGA is putting out a test pattern and I can read it on the scope, as well as the output of the PIC but the RX pins of neither want to read the signal for some reason.
 

Not much info to work with, so I'll ask something basic... is the parity set the same (or is parity even used) so the RX is looking for the same number of bits as the TX? Do you have an extra inversion in the TX or RX that would have the two ends looking at different levels for a MARK? Can you externally loop the TX back to its own RX to verify operation at each end?
 

Hi,

Use a scope to verify the outputs of your circuits.

Then use a USB-to-UART(3V3) to generate signals to input to your devices.

Klaus
 

I tried the loopback test and it works fine. Then I hooked the RX/TX to a 3v3 <-> 5v converter and then into a RS-232 converter and it works going to minicom on my linux box. Then I put another 3v3<->5v converter and RS232 converter on both serial ports on the PIC24 and tested them going to minicom on 2 different linux boxes. Then I connected a serial cable from the RS-232 converter on the FPGA to the RS-232 converter on one of the comm ports on the PIC24 and hooked the other comm port on the PIC24 to a linux box and wrote the PIC24 program so it reads from the FPGA on one port, writes to the linux box on the other port and writes some sample data back to the FPGA and it works (I just tested it but I got a bad cable so I have to fix that but it should work). So what all this tells me is that the FPGA can talk to the PIC24 over the serial port as long as I convert it to RS-232 and back. But I plan on having the FPGA and PIC24 real close to each other so I was hoping to get by with just using a direct wire from each of the 3v3 RX/TX pins. I haven't tried just using a 3v3<->5v converter chip yet, so that will probably work.
 

If both devices use 3.3V logic, they can be of course connected without any drivers. You may use current limiting series resistors if you see a risk that involved pins could be configured wrong sometimes.
 

Hi,

Loopback test is no very good test here, because it can't detect baudrate mismatch.

It can't detect wrong baudrate setting, and it can't detect if baudrate is off the specified percentage precision.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top