Auto Baud Rate with PIC18F2455

Posted on Aug 16, 2012

Most of the newer PIC come with the EUSART module which have the function for auto baud rate detection. The features allow a person to set the baud rate at runtime by sending the character `U` or 0x55 to the PIC. With ABDEN (auto baud rate enable) bit set and using BRG clock as a reference, each rising edge occurring on the RX pin is taken as a reference to calculate the SPBRG and SPBRGH value. After the Baud rate is set, the RCIF flag will be set. The receive register must be discarded as it doesn't contain meaningful data. The Image (PIC18F2455 datasheet, page 252) below shows the timing diagram for auto baud rate setup.

Auto Baud Rate with PIC18F2455
Click here to download the full size of the above Circuit.

A circuit based similar to the UART test is used to demonstrate the capability of auto baud rate generation.Using the code in the project file attached, It will 1st wait for a character "U" to be send over for baud rate calculation. Auto baud is enable using the 3 lines of code below. The UARTReadByte() will read and discard the byte after a successful configuration of baud rate. The LCD display will be the same as the image below after a successful program of the microcontroller. It is currently waiting for the character U to set the baud rate.

Leave Comment

characters left:

New Circuits



Popular Circuits

Bridging Adapter For Power Amplifiers
4 MHz Modulated Oscillator (2N4401)
Fog Lamp Sensor Circuit
High Performance Sawtooth Generator
Cipher scheme of the module of infrared remote-control between two parties of intellectual family
12v iPad Charger
LA1800 portable am fm radio circuit design electronic project
Servo controlling circuit
Pic microcontroller project
High-performance automatic water level controller circuit
SH-803R produced by high-power holiday lights