24.3.3.2.7 IRCOM Mode of Operation
The USART peripheral can be configured in Infrared Communication mode (IRCOM), which is IrDA® 1.4 compatible with baud rates up to 115.2 kbps. When enabled, the IRCOM mode enables infrared pulse encoding/decoding for the USART.
The USART is set in IRCOM mode by writing 0x02
to the CMODE bit field in
the USARTn.CTRLC register. The data on the TXD/RXD pins are the inverted values of the
transmitted/received infrared pulse. It is also possible to select an event channel from
the Event System as an input for the IRCOM receiver. This enables the IRCOM to receive
input from the I/O pins or sources other than the corresponding RXD pin, which will disable
the RxD input from the USART pin.
For transmission, three pulse modulation schemes are available:
- 3/16 of the baud rate period
- Fixed programmable pulse time based on the peripheral clock frequency
- Pulse modulation disabled
For the reception, a fixed programmable minimum high-level pulse-width for the
pulse to be decoded as a logical ‘0
’ is used. Shorter pulses will then be
discarded, and the bit will be decoded to logical ‘1
’ as if no pulse was
received.
Double-Speed mode cannot be used for the USART when IRCOM mode is enabled.