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.

UART baud rate query

Status
Not open for further replies.

jayati2210

Newbie
Joined
Apr 20, 2021
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
9
Hi all ,
How we can check with the help of assertion that we achieved proper baud rate ?
for ex if required baud rate is 100 then error of +-1% is allowed. i.e. value 99 and 101 is acceptable. I have around 5-6 standard baud rates in my IP like 9600,115200 . I have to write logic for this 1% error. How I can write this
 

Hi,

the question is not clear.

You are in the IC design section.

You have a master clock.
Then there usually is a clock divider to generate baud rate. Usually this is an integer divider.
So the baud rate = master_clock / int_value.

So basically there are just two things that determines the baud rate and it's error.
* input clock (variation)
* the error that the "integer" ( missing fractional part) brings.

To avoid both, one uses a stable, known master clock (XTAL)
And one uses a baud_rate_friendly master frequency.
The mathematical solution is via prime factorisation.

Example
Generating 115200 baud from a 4.0MHz clock
Divider = rounded(4,000,000 / 115,200) = rounded(34.7222) = 35
So the generated baud rate is 4,000,000 / 35 = 114,286 baud

A baud rate friendly input frequency = 3,6864,000 Hz
3,686,400 / 115,200 = 32.0000

For an IC designer this should be nothing new. Also written in any microcontroller documentation, every baud rate generator description ... and already has been discussed many thousand times...

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top