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 BaudRate drift calculation on PC side?

Status
Not open for further replies.

xpress_embedo

Advanced Member level 4
Joined
Jul 5, 2011
Messages
1,154
Helped
161
Reputation
396
Reaction score
189
Trophy points
1,353
Location
India
Activity points
10,591
Hello!! all, i am having a device, which sends data to PC using UART, is there any way to calculate the drift in the Baud Rate of the received data.

Lets say, i had written a program in a micro-controller to send some characters to PC using UART communication, but this micro-controller has to face different ranges of temperature and due to which the clock can change and due to this, the Baud Rate can also change.
Is there any software for this purpose or, any other way to to calculate the drift in Baud Rate as compared to actual Baud Rate.
 

There are two possible solutions
1. you can use Auto baud rate detection code on Microcontroller side
2. you use SPI or I2C, in which master send the clock. In your case it will be your microcontroller. On other side you need another microcontroller which convert ur SPI or I2C data to PC UART
 

Is there any software for this purpose or, any other way to to calculate the drift in Baud Rate as compared to actual Baud Rate.
A standard PC UART has no means to do this, it even can't fine tune the baudrate because the driver interface isn't prepared for.
 
I didn't get your point, how this helps in calculating Baud Rate Error.

- - - Updated - - -

Even a micro-controller can be used to calculate the Baud Rate Error.

I will send 'U' from the unit under test and then based on this the packet formed is as follow:-
0(Start) 1(LSB) 0 1 0 1 0 1 0(MSB) 1(Stop)
Then by using any micro-controller, let's say PIC16F877A, i will measure the frequency of this and this will be my Baud Rate.
Is it correct method do so, what do you think it will work properly.
Apart from this also guide me to measure the how measure the frequency accurately. (My Baud Rate for device under test is 9600 or 115200).
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top