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.

how to detect start bit in uart

Status
Not open for further replies.

s3034585

Full Member level 4
Joined
May 24, 2004
Messages
227
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,296
Activity points
2,091
hi
can any one pls explain me how to detect a start bit in uart. i am trying to write a vhdl code for uart. ideally a transition from 1 to 0 is a indication of start bit but there can be a similar condition in the data stream also.
so can any one pls help me.
thanks
tama
 

kate_ppg

Newbie level 2
Joined
Feb 16, 2006
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,296
use a register with serial input fill with 1s and detect the start bit 0 at the last position
 

artem

Advanced Member level 4
Joined
May 22, 2003
Messages
1,350
Helped
126
Reputation
252
Reaction score
32
Trophy points
1,328
Location
Turkey
Activity points
13,450
actually start bit is not just transition from 1 to 0 but also 0 for period of bit duration set by port's speed.
 

tkbits

Full Member level 5
Joined
Dec 4, 2004
Messages
242
Helped
39
Reputation
78
Reaction score
2
Trophy points
1,298
Activity points
2,209
The start bit is detected when the UART is not collecting bits for data. This is either after reset (power up or control signal) or after the stop bit(s). It cannot be detected when the UART is in the state of reading the input as data.

If the UART is reset in the middle of data, it will synchronize properly after a sufficiently long idle time between data.
 

BuBEE

Full Member level 2
Joined
Jul 23, 2005
Messages
133
Helped
12
Reputation
24
Reaction score
7
Trophy points
1,298
Location
Thailand
Activity points
2,044
Hi , s3034585
I thinks
You must know BuadRate of UART , so use clk sampling .

when First transition from 1 to 0 this start bit and clk sampling delay 8 bit for data and 1 bit for parity and transition from 0 to 1 is stop bit

Pls. Download Serial complete in EDA E-Book
 

jelydonut

Full Member level 4
Joined
Dec 27, 2002
Messages
239
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,296
Activity points
1,730
To detect the start bit to go into your receiver FSM, on detection of a low, sample 16x, then if more of 8 of those are low then you can consider it a start bit, if not clear the counter (false start bit) and resample again on next low detection.

jelydonut
 

tlp71@hotmail.com

Full Member level 4
Joined
May 14, 2002
Messages
220
Helped
6
Reputation
12
Reaction score
2
Trophy points
1,298
Activity points
1,596
The best way is detect the fall transition with a fall detector, start to count whit a clock 16x respect your baud rate and when your counter is 8 then sample the state of the line, if you detect zero then you have a real start bit otherwise your fall edge was a spike. if you detect a start bit you can sample the data every 16 times with the clock 16x starting from this point.
Bye
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top