![Microchip Technology PIC16F87XA Скачать руководство пользователя страница 121](http://html1.mh-extra.com/html/microchip-technology/pic16f87xa/pic16f87xa_datasheet_1785839121.webp)
2003 Microchip Technology Inc.
DS39582B-page 119
PIC16F87XA
10.2.3
SETTING UP 9-BIT MODE WITH
ADDRESS DETECT
When setting up an Asynchronous Reception with
address detect enabled:
• Initialize the SPBRG register for the appropriate
baud rate. If a high-speed baud rate is desired,
set bit BRGH.
• Enable the asynchronous serial port by clearing
bit SYNC and setting bit SPEN.
• 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.
• Flag bit RCIF will be set when reception is
complete, and an interrupt will be generated if
enable bit RCIE was set.
• Read the RCSTA register to get the ninth bit and
determine if any error occurred during reception.
• Read the 8-bit received data by reading the
RCREG register to determine if the device is
being addressed.
• If any error occurred, clear the error by clearing
enable bit CREN.
• If the device has been addressed, clear the
ADDEN bit to allow data bytes and address bytes
to be read into the receive buffer and interrupt the
CPU.
FIGURE 10-6:
USART RECEIVE BLOCK DIAGRAM
x64 Baud Rate CLK
SPBRG
Baud Rate Generator
RC7/RX/DT
Pin Buffer
and Control
SPEN
Data
Recovery
CREN
OERR
FERR
RSR Register
MSb
LSb
RX9D
RCREG Register
FIFO
Interrupt
RCIF
RCIE
Data Bus
8
÷
64
÷
16
or
Stop
Start
(8)
7
1
0
RX9
• • •
RX9
ADDEN
RX9
ADDEN
RSR<8>
Enable
Load of
Receive
Buffer
8
8
F
OSC
http://www.xinpian.net
提供单片机解密、IC解密、芯片解密业务
010-62245566 13810019655
Содержание PIC16F87XA
Страница 112: ...PIC16F87XA DS39582B page 110 2003 Microchip Technology Inc NOTES http www xinpian net IC 010 62245566 13810019655...
Страница 128: ...PIC16F87XA DS39582B page 126 2003 Microchip Technology Inc NOTES http www xinpian net IC 010 62245566 13810019655...
Страница 136: ...PIC16F87XA DS39582B page 134 2003 Microchip Technology Inc NOTES http www xinpian net IC 010 62245566 13810019655...
Страница 168: ...PIC16F87XA DS39582B page 166 2003 Microchip Technology Inc NOTES http www xinpian net IC 010 62245566 13810019655...
Страница 174: ...PIC16F87XA DS39582B page 172 2003 Microchip Technology Inc NOTES http www xinpian net IC 010 62245566 13810019655...
Страница 198: ...PIC16F87XA DS39582B page 196 2003 Microchip Technology Inc NOTES http www xinpian net IC 010 62245566 13810019655...