RS-232 syncronization

Status
Not open for further replies.

ireon

Junior Member level 2
Joined
Mar 28, 2013
Messages
21
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,455
I designed an UART interface based on the protocol RS-232 using the VHDL code. The interface receives data and trasmits them. It works correctly, but I have a problem about the syncronization of the trasmission speed. The interface works with 4 different levels of baud rate: 9600, 19200, 38400, 57600. They can be select using the bottoms on the FPGA. Using Realterm setting one of these values, the interface works correctly, but for example if I set 9600 baud rate on the interface and for example 1200 baud rate on Realterm the interface doesn't work. I thought to solve the problem using a states machine with the following process:


In this way every time that there is a new date, the counter that selects the speed is reset with the reset_count signal. Anyway if for example I send the byte: "11010010" when there are two 1 or two 0 the counter increases itself up to the reset value( if I selected 57600 baud rate it reset itself when it has reached the value 868, considering the clock period of 20 ns). This creates a problem on the date. How could I resolve the problem? I should determine when there is a new input date so I could reset the counter every time and syncronize the speed.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…