Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
dsPIC33/PIC24 Family Reference Manual
DS70000582E-page 26 2009-2013 Microchip Technology Inc.
8.0 USING THE UART FOR 9-BIT COMMUNICATION
The UART receiver can be used in 9-Bit Data mode for multiprocessor communication. With the
ADDEN bit set in 9-Bit Data mode, the receiver can ignore the data when the 9th bit of the data
is 0. This feature can be used in a multiprocessor environment.
8.1 Multiprocessor Communications
A typical multiprocessor communication protocol will differentiate between the data bytes and the
address/control bytes. A common scheme is to use a 9th data bit to identify whether a data byte
is address or data information. If the 9th bit is set, the data is processed as address or control
information. If the 9th bit is cleared, the received data word is processed as data associated with
the previous address/control byte.
The protocol operates as follows:
The master device transmits a data word with the 9th bit set. The data word contains the
address of a slave device.
All slave devices in the communication chain receive the address word and check the slave
address value.
The slave device that was addressed will receive and process subsequent data bytes sent
by the master device. All other slave devices will discard subsequent data bytes until a new
address word (9th bit set) is received.
8.2 ADDEN Control Bit
The UART receiver has an Address Detect mode, which allows it to ignore data words with the
9th bit cleared. This reduces the interrupt overhead because the data words with the 9th bit
cleared are not buffered. This feature is enabled by setting the ADDEN bit (UxSTA<5>).
The UART must be configured for 9-bit Data mode to use the Address Detect mode. The ADDEN
bit has no effect when the receiver is configured in 8-bit Data mode.
8.3 Setup for 9-Bit Transmit
The setup procedure for 9-bit transmission is identical to the procedure for 8-Bit Transmit modes,
except that the PDSEL<1:0> bits (UxMODE<2:1>) should be set to 11 (see Section 5.3 “Setup
for UART Transmit”).
Word writes should be performed to the UxTXREG register (starts transmission).
Protego_Release_01_05-Related-OEM-Documentation-PIC24FJ32MC10X-Reference_Manual-PIC24FJ32MC102-UART.pdf