RC -5 bit encoding
"0"
"1"
1.778ms
1.778ms
T
T
T
T
1
0
1
0
Functional Description
19.3.8.3 CIR Mode
In consumer infrared mode, the infrared operation is designed to function as a programmable (universal)
remote control. By setting the MDR1 register, the UART can be set to CIR mode in the same way as the
other IrDA modes are set using the MDR1 register.
The CIR mode uses a variable pulse width modulation technique (based on multiples of a programmable
T period) to encompass the various formats of infrared encoding for remote control applications. The CIR
logic is to transmit and receive data packets according to the user definable frame structure and packet
content.
19.3.8.3.1 Consumer IR Encoding
There are two distinct methods of encoding for remote control applications. The first uses time extended
bit forms i.e. a variable pulse distance (or duration) whereby the difference between a logic one and logic
zero is the length of the pulse width; and the second is the use of a bi-phase where the encoding of the
logic zero and one is in the change of signal level from 1
→
0 or 0
→
1 respectively. Japanese
manufacturers tend to favor the use of pulse duration encoding whereas European manufacturers favor
the use of bi-phase encoding.
The CIR mode is designed to use a completely flexible free format encoding where a digit ‘1’ from the
TX/RX FIFO is to be transmitted/received as a modulated pulse with duration T. Equally, a ‘0’ is to be
transmitted/received as a blank duration T. The protocol of the data is to be constructed and deciphered
by the host CPU. For example, the RC-5 protocol using Manchester encoding can be emulated as using a
“01” pair for one and “10” pair for a zero.
Figure 19-25. RC-5 Bit Encoding
Since the CIR mode logic does not impose a fixed format for infrared packets of data, the CPU software is
at liberty to define the format through the use of simple data structures that will then be modulated into an
industry standard, such as RC5 or SIRC. To send a sequence of “0101” in RC5, the host software must
write an eight bit binary character of “10011001” to the data TX FIFO of the UART.
For SIRC, the modulation length (i.e. multiples of T) is the method to distinguish between a “1” or a “0”.
The following SIRC digits show the difference in encoding between this and RC5 for example. Note: the
pulse width is extended for “1” digits.
3489
SPRUH73H – October 2011 – Revised April 2013
Universal Asynchronous Receiver/Transmitter (UART)
Copyright © 2011–2013, Texas Instruments Incorporated