Forum Discussion
Altera_Forum
Honored Contributor
15 years agohi
hi
i m trying to communicate between two fpga board through rs232 ,
a 1 byte is being transmitted from the board1 with a baudrate say 115200.
and the other fpga is also configured to receive 1 byte at the same baud rate,
when 1 byte is arrived to fpga it is arrive wrong , but when i test it using modelsim the result is correct :mad:
please help me to know what is the problem :(
thanks in advance..
5 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- sorry , i mean which buad rate can i use lower than 115200 ?? --- Quote End --- Its an FPGA, you can use *any* baud rate you like, so long as the transmitter and receiver are set to use the same baud rate. --- Quote Start --- can i use a buad rate = 9600 --- Quote End --- Yes, that is a good start. Check with a scope that your serial data rate is correct. Cheers, Dave - Altera_Forum
Honored Contributor
:D:D
sorry , i mean which buad rate can i use lower than 115200 ?? you told me " try a lower buad rate !! " , can i use a buad rate = 9600 with 1 byte data and clk frequency = 50 MHz ?????? - Altera_Forum
Honored Contributor
--- Quote Start --- which buadrate i use ?? --- Quote End --- Only you can answer that! You said it was 115200, are you not sure? Cheers, Dave - Altera_Forum
Honored Contributor
which buadrate i use ??
this is my codes file:///C:/Users/uni/Desktop/rs232/async_receiver.v__.htm file:///C:/Users/uni/Desktop/rs232/async_transmitter.v__.htm the two clocks are the same -->ClkFrequency = 50MHz in the receiver FPGA , 8 leds must light or not depends on the 1 byte that receive but when i send 10101010 for example the 8 leds light !!! why ???? - Altera_Forum
Honored Contributor
1. Plug your transmitter board into a PC serial port and see if the received characters are correct.
2. Plug your receiver board into a PC and transmit serial port characters and see if the FPGA board works correctly. Either (1) or (2) will fail to work. Debug the failing board :) Other things to consider; 3. Try a lower baud rate. 4. Are the reference clocks on the two boards the same? What is the baud rate error, i.e., how different from 115200 are the signal bit times? Look with a scope. Use SignalTap at the transmitter and receiver and look at the signals (sampled at say 50MHz). 5. How are you capturing the data? Are you running the asynchronous signal through a synchronizer, oversampling the baudrate by 16x (or so) and 'filtering' each bit, i.e.. looking for the same logic level on multiple oversampled samples? If your UART is too simple, it might work in Modelsim, but not in hardware. Cheers, Dave