Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

2009-2013 Microchip Technology Inc. DS70000582E-page 27
UART
8.4 Setup for 9-Bit Reception Using Address Detect Mode
The setup procedure for 9-bit reception is similar to the procedure for 8-Bit Receive modes,
except that the PDSEL<1:0> bits (UxMODE<2:1>) should be set to 11 (see Section 7.4 “Setup
for UART Reception”).
The Receive Interrupt mode should be configured by writing to the URXISEL<1:0>
(UxSTA<7:6>) bits.
The procedure for using the Address Detect mode is as follows:
1. Set the ADDEN bit (UxSTA<5>) to enable address detect. Ensure that the URXISEL<1:0>
control bits are configured to generate an interrupt after each received word.
2. Check each 8-bit address by reading the UxRXREG register to determine if the device is
being addressed.
3. If this device has not been addressed, discard the received word.
4. If this device has been addressed, clear the ADDEN bit to allow subsequent data bytes to
be read into the receive buffer and interrupt the CPU.
If a long data packet is expected, the Receive Interrupt mode can be changed to buffer
more than one data byte between the interrupts.
5. After receiving the last data byte, set the ADDEN bit so that only address bytes are
received.
Also, ensure that the URXISELx control bits are configured to generate an interrupt after
each received word.
Figure 8-1: UARTx Reception with Address Detect (ADDEN = 1)
Note: If the Address Detect mode is enabled (ADDEN = 1), the URXISEL<1:0> control bits
should be configured so that an interrupt will be generated after every received
word. Each received data word must be checked in software for an address match
immediately after reception.
Start
bit bit 1bit 0 bit 8 bit 0Stop
bit
Start
bit bit 8 Stop
bit
UxRX (pin)
Read Rcv
Buffer Register
UxRXREG
UxRXIF
(Interrupt Flag)
Word 1
UxRXREG
bit 8 = 0, Data Byte bit 8 = 1, Address Byte
Transfer
to Receive FIFO
Note: This timing diagram shows a data byte followed by an address byte. The data byte is not read into the UxRXREG (receive buffer)
because ADDEN = 1 and bit 8 = 0.

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh