Setting the ABDEN bit of the BAUDCON register starts the auto-baud calibration sequence by Copy Microchip PIC12F1552 Firmware. While the ABD sequence takes place, the EUSART state machine is held in Idle. On the first rising edge of the receive line when Extract Microcontroller Code, after the Start bit, the SPBRG begins counting up using the BRG counter clock as shown in below Table.
The fifth rising edge will occur on the RX pin at the end of the eighth bit period before Extract MCU Protection Method. At that time, an accumulated value totaling the proper BRG period is left in the SPBRGH, SPBRGL register pair, the ABDEN bit is automatically cleared and the RCIF interrupt flag is set.
The value in the RCREG needs to be read to clear the RCIF interrupt. RCREG content should be discarded for the purpose of Extract IC AT89C4051 Code. When calibrating for modes that do not use the SPBRGH register the user can verify that the SPBRGL register did not overflow by checking for 00h in the SPBRGH register to Unlock Microcontroller.
The BRG auto-baud clock is determined by the BRG16 and BRGH bits as shown in below Table. During ABD, both the SPBRGH and SPBRGL registers are used as a 16-bit counter, independent of the BRG16 bit setting for the purpose of Extract MCU AT89C2051 Code. While calibrating the baud rate period, the SPBRGH and SPBRGL registers are clocked at 1/8th the BRG base clock rate. The resulting byte measurement is the average bit time when clocked at full speed.