Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

Automatic baud-rate detection

Automatic baud-rate detection

Automatic baud-rate detection is desirable in many applications. Microchip standard USART module that the company embeds in most of its PIC microcontrollers lends itself to a simple and easily implemented automatic baud-detection scheme.
Figure represents a general-case signal typically seen on the RX pin of a PIC microcontroller. The time, p, is the number of instruction cycles from the end of the start bit to the beginning of the stop bit. This definition allows you to relate baud rate, B, to the total time it takes for the RX pin on the microcontroller to see eight bits of data. Eight is a convenient figure for a binary machine. Basically. The term (FOSC/4) is the instruction rate of a PIC microcontroller. The term 8/B is the eight bit-times that the RX pin sees. Relating the two baud-rate equations.

The simplified result leads to a simple equation that you can easily implement on a PIC microcontroller. Count the total numbers of instruction cycles for eight bit-times. Divide the result by 32. (In other words, shift the count right five times.) Add a rounding bit. Then, decrement the value by one. Finally, load the SPBRG register with the result to synchronize the PIC microcontroller to the incoming baud rate. It is important to select the right control signal so that the microcontroller samples the correct number of bits. For this implementation, the signal in Figure 2 is an ideal control signal. You take measurements from the rising edge, and the pulse is symmetric. Figure 3 shows the simplified program flow for the baud-rate detection.

It is useful to know the valid frequency range for a baud rate, SPBRG value, and tolerable error. The following equation defines error as follows:–

Visit Here for more.

 

More Articles to Read

All metal C930e webcam
All metal C930e webcam
The Soldering Tools That Make Your Life Easier
The Soldering Tools That Make Your Life Easier
App note: Operation evaluation of ultra low ON resistance MOSFET supporting quick charge for 1 c ...
App note: Operation evaluation of ultra low ON resistance MOSFET supporting quick charge for 1 cell Lithium ion battery protection
Synthesized Sidetone
Synthesized Sidetone
App note: Application precautions: Power MOSFET application notes
App note: Application precautions: Power MOSFET application notes
A high current power supply built around a server voltage regulator
A high current power supply built around a server voltage regulator
Bridge Monitoring System using Wireless Sensor Network
Bridge Monitoring System using Wireless Sensor Network
Piezoelectric Micropump Driver
Piezoelectric Micropump Driver
Fixed DC/DC Regulator Output Margining Using Digitally Controlled Potentiometer
Fixed DC/DC Regulator Output Margining Using Digitally Controlled Potentiometer
An Arduino-powered automatic guitar footswitch
An Arduino-powered automatic guitar footswitch

Top




Shares