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

Design for a Wideband, Differential Transimpedance DAC Output
Design for a Wideband, Differential Transimpedance DAC Output
Wrist thrusters let you fly through the water effortlessly
Wrist thrusters let you fly through the water effortlessly
Bertan/Spellman 225-20R HV power supply teardown
Bertan/Spellman 225-20R HV power supply teardown
Blinking Christmas Lights
Blinking Christmas Lights
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adding an “extra sense” with rangefinders
Adding an “extra sense” with rangefinders
This wireless game controller looks like a rug
This wireless game controller looks like a rug
How to run your ESP8266 for years on a battery
How to run your ESP8266 for years on a battery
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Making beats on a tiny Arduino DJ controller
Making beats on a tiny Arduino DJ controller
Qinsi-QS5100 Sn63Pb37 solder profile
Qinsi-QS5100 Sn63Pb37 solder profile
Water Detection System
Water Detection System
Professional Hi-Fi 15W Tube Amplifier circuit
Professional Hi-Fi 15W Tube Amplifier circuit
This Arduino machine will judge how sick your ollies are
This Arduino machine will judge how sick your ollies are
Turn an old payphone into a boombox for ’90s hits
Turn an old payphone into a boombox for ’90s hits
Big F’n 3D printer build
Big F’n 3D printer build
Temperature alarm for boiling milk
Temperature alarm for boiling milk
QuadBot is a 3D-printable walking robot for everyone
QuadBot is a 3D-printable walking robot for everyone
MicroConverter I2C Compatible Interface
MicroConverter I2C Compatible Interface
An Arduino tachometer for your older vehicle
An Arduino tachometer for your older vehicle

Top


Shares