25.3.4.6 Protocol Converter
The Protocol Converter is a hardware accelerator that supports encoding and decoding protocols based on UART or SPI, but use one frame to transfer a single bit. This approach is typically used for one-wire protocols, either unidirectional or where there is large baud rate difference between the host and client.
For encoding, the bits in the Transmit Data (TXDATA) register are shifted out one at a time and used to select the frame to be transmitted.
For decoding, the data from the Receive shift register are decoded and the result is shifted into the Receive Data (RXDATA) register one bit at a time. The Receive Complete (RXC) interrupt flag is set after reception of eight characters.
The table below shows the available decoding schemes, which are selected by configuring the Protocol Converter (PROTCONV) bit field in the Control G (USARTn.CTRLG) register. For the FIXED decoding scheme, the Frame Error (FERR) flags in the Status (USARTn.STATUS) and Receiver Data High (USARTn.RXDATAH) registers is set if the received frame corresponds to neither a “one character” nor a “zero character”. For all other decoding schemes, any frame is decoded as a “zero character” except frames that meet the requirements of a “one character”.
| Decoding Scheme | Decoding “One character” | Decoding “Zero character” |
|---|---|---|
| FIXED | DATA = AUXDATA1 | DATA = AUXDATA0 |
| MASKED | (DATA & AUXDATA2) = (AUXDATA1 & AUXDATA2) | Not “One Character” |
| DUAL | (DATA = AUXDATA1) or (DATA = AUXDATA2) | Not “One Character” |
