Continue to Site

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.

Detecting unknown baudrate

Status
Not open for further replies.

Elimathew

Member level 5
Joined
Jun 21, 2011
Messages
88
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
India
Activity points
1,894
Hey guys , I have trouble figuring out the logic for this problem statement:there are 2 atmega328 one transmitting data at an unknown baudrate while the atmega I have to program to detect the unknown baudrate ,I know that if there is baudrate mismatch there should be error but what kind error will be flagged and how will I detect that error(is it framing error). Can anyone help me around with logic ,Thank you
 

The error will show as either a framing error or an overrun error or maybe both. If you know the sending device is using one of the standard serial Baud rates, the quickest way to sync them is to step threough the speeds, checking for the one with no errors. If the speed is non-standard, the best way is to sample the lengths of at least 10 bits (using I/O rather than UART) and assume the shortest is one bit length. There will always be at least one isolated single bit length in a frame, even if the data is 0x00 or 0xFF because of the start and stop bits. From the bit length you can calculate the Baud rate exactly then use it for subsequent communication through the UART.

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top