3 UART with Protocol as DMX Receiver
The UART with protocol can be configured as a DMX receiver and the module can detect and respond to only valid break + Mark After Break (MAB) conditions. This helps the microcontroller to idle or attend to other high priority interrupts while it waits for a break condition. A break received interrupt is available, which will trigger only if the correct timing requirements are met for the break condition.
The first byte following a break + MAB condition is always received in the UART Receive Buffer (UxRXB). This is the slot 0 data or commonly known as the start code of the DMX packet. User firmware can read this byte out of the UxRXB register and branch away from normal reception, if it is a special start code.
Based on the application, the receiver would be interested in only a small range of data in the complete DMX packet. The UART with protocol helps simplify user firmware by having a configurable address range where the module will ignore all the data bytes outside that range. The address range is defined by the UART Parameter 2 (UxP2: start address) and UART Parameter 3 (UxP3: end address) registers. The module will produce receive interrupts only for the range defined by these registers. This helps reduce unnecessary software overhead to handle unwanted interrupts.
The module can be configured to wait for two stop bits at the end of the
packet and verify that two stop bits were received by setting the STP<1:0> bits of
UxCON2 register to ‘0b10
’.
User firmware does not have to update the configuration to receive the next DMX packet, unless the address range is changing.