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

Infrared Receiver Circuit
PIC Dual Temperature Meter by PIC16F628
studio synth circuit
wien bridge sine wave oscillator circuit using lm107
op amp Humming and Transmission issues
Digital DC Motor Speed Control With LED Display
analog to digital converter adc0804
gym agility simple strategy
multimedia riaa preamplifier
555 Timer as Monostable Multivibrator
TTL pulse recording for fMRI data collection
Electronic Circuit Schematic Dimmer LED using LM555 for Photo/Build Light
Direct infrared remote control switch circuit diagram composed of LS-2
Circuit example of the LM381



Top