EmbDev.net

Forum: FPGA, VHDL & Verilog rs232 test VHDL


von Martin M. (martin_m19)


Rate this post
useful
not useful
Using Digilent Nexys 2 board which has a rs232 port (uses the Spartan 3E 
fpga).

Trying to test the rs232, i have a usb to rs232 cable and i use Putty 
which all seems to  be working ok. So i wrote this for the FPGA to loop 
back RX and TX so the fpga would just echo back what ever data it got.
1
library IEEE;
2
use IEEE.STD_LOGIC_1164.ALL;
3
4
entity top is
5
    Port ( rxd : in  STD_LOGIC;
6
           txd : out  STD_LOGIC);
7
end top;
8
9
architecture Behavioral of top is
10
11
begin
12
13
  txd <= rxd;
14
15
end Behavioral;

Unfortunately once put on the fpga i can't write anything in the 
terminal which i think is because the fpga is not echoing back the data.

Can anyone see the problem here? Or have a better way to test the rs232?

Thanks.

von Lothar M. (Company: Titel) (lkmiller) (Moderator)


Rate this post
useful
not useful
Start as close as possible to the computer!
Do you get the characters echoed, when you bridge Pins 2 and 3 on the 
RS232 cable at the computer (without any FPGA or other hardware)?

Your code is fine. Do you also have assinged the ports to pins in a 
constraints file?

von Martin M. (martin_m19)


Rate this post
useful
not useful
It Works!
I resynthesised and programmed to board. and it works.
Not sure what i did the only main thing i did differently was run Putty 
as administrator.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.