Verilog code for FPGA to receive input from the computer keyboard via RS-232

Status
Not open for further replies.

August

Newbie
Joined
Aug 19, 2008
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Thailand
Activity points
1,308
RS-232

How to write the verilog code for fpga to recieve input from the computer keyboard through RS-232

Is this right?

module serialfun(clk, RxD, TxD, GPout, GPin);
input clk;
input RxD;
output TxD;
output [7:0] GPout;
input [7:0] GPin;
///////////////////////////////////////////////////
wire RxD_data_ready; wire [7:0] RxD_data;
async_receiver deserializer(.clk(clk), .RxD(RxD), .RxD_data_ready(RxD_data_ready), .RxD_data(RxD_data));
reg [7:0] GPout;
always @(posedge clk) if(RxD_data_ready) GPout <= RxD_data;
///////////////////////////////////////////////////
async_transmitter serializer(.clk(clk), .TxD(TxD), .TxD_start(RxD_data_ready), .TxD_data(GPin));
endmodule
 

Re: RS-232

Hello August.
Try using the RS-232 modules in this website.
www.fpga4fun.com
I used them to receive and send between a Spartan3 board and my PC. It worked perfectly.
 

    August

    Points: 2
    Helpful Answer Positive Rating
Re: RS-232

Thank! For your advice.. I had been to this website

Thank you.^^
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…