16F876 Microchip Technology, 16F876 Datasheet - Page 103

no-image

16F876

Manufacturer Part Number
16F876
Description
28/40-pin 8-Bit CMOS FLASH Microcontrollers
Manufacturer
Microchip Technology
Datasheet
10.2.3
Steps to follow when setting up an Asynchronous
Reception with Address Detect Enabled:
• Initialize the SPBRG register for the appropriate
• Enable the asynchronous serial port by clearing
• If interrupts are desired, then set enable bit RCIE.
• Set bit RX9 to enable 9-bit reception.
• Set ADDEN to enable address detect.
• Enable the reception by setting enable bit CREN.
FIGURE 10-6: USART RECEIVE BLOCK DIAGRAM
baud rate. If a high speed baud rate is desired, set
bit BRGH.
bit SYNC and setting bit SPEN.
1999 Microchip Technology Inc.
SETTING UP 9-BIT MODE WITH ADDRESS
DETECT
RC7/RX/DT
Baud Rate Generator
x64 Baud Rate CLK
SPBRG
Pin Buffer
and Control
RSR<8>
SPEN
ADDEN
ADDEN
RX9
RX9
Data
Recovery
Interrupt
CREN
or
64
16
Enable
Load of
Receive
Buffer
RCIF
RCIE
• Flag bit RCIF will be set when reception is com-
• Read the RCSTA register to get the ninth bit and
• Read the 8-bit received data by reading the
• If any error occurred, clear the error by clearing
• If the device has been addressed, clear the
RX9
plete, and an interrupt will be generated if enable
bit RCIE was set.
determine if any error occurred during reception.
RCREG register, to determine if the device is
being addressed.
enable bit CREN.
ADDEN bit to allow data bytes and address bytes
to be read into the receive buffer, and interrupt the
CPU.
MSb
Stop
RX9D
(8)
OERR
7
RSR register
RCREG Register
8
Data Bus
PIC16F87X
8
8
1
FERR
0
Start
LSb
FIFO
DS30292B-page 103

Related parts for 16F876