9 ms
Leading Code
0
0
1
0
1
0
1
0
LSB
MSB
ADDRESS
4.5 ms
1
1
0
1
0
1
0
1
LSB
MSB
ADDRESS
0
1
1
0
1
1
1
0
LSB
MSB
COMMAND
1
0
0
1
0
0
0
1
LSB
MSB
COMMAND
Tail
logic 0
logic 1
(carrier modulated pulse)
(space with width A)
(carrier modulated pulse)
(space with width B)
carrier
TI Design and Software Examples
Figure 11. Pulse Distance Encoding
The provided IR Emitter and Receiver code uses a standard timing for remote controls using pulse
distance protocol. Logic 1 is defined as a 560-µs carrier modulated period followed by a 1690-µs space
period. Logic 0 is defined as a 560-µs carrier modulated period followed by a 560-µs space period. The
data frame starts with a Leading Code of 9-ms modulated period followed by a 4.5-ms space period.
After the Leading Code, the data payload begins. The payload consists of 4 bytes:
1. 1 address byte
2. The same address byte inverted
3. 1 command byte
4. The same command byte inverted
The address byte is used to identify the device so that receivers can ignore signals from other IR remotes
that are intended for other devices. The example code has arbitrarily chosen 0x55 for the address byte.
The command byte is the actual data that you want to send – in this example it is a byte that corresponds
to the number of the key that was pressed. The protocol follows the address byte with an inverted version
of itself, and the command byte with an inverted version of itself. This is to help catch any errors in the
communication to increase robustness, and is a standard feature of the pulse distance protocol used by
many remote controls.
After the payload is transmitted, the Data Frame ends with a tail pulse to indicate the end of the packet.
This tail is a 560 us carrier modulated pulse.
shows the full Data Frame Format.
Figure 12. Pulse Distance Protocol, Data Frame Format
3.1.1.5
IR Learning Mode
For some applications like universal TV remotes, it is useful to have a device that can learn different IR
codes. To do this, the device needs to be able to receive an IR signal from another device, record it, and
then later be able to reproduce it on command. The MSP430FR4133 is an FRAM device, allowing for a
large amount of nonvolatile storage that can be quickly and easily accessed with no extra steps needed
(like is needed for writing Flash) . FRAM can be written just like RAM at speeds up to 8 MHz – perfect for
logging data. The FRAM also has near-infinite write cycles, so the IR codes can be reprogrammed
frequently without risk of wearing out the memory. Because of this, the device is a great candidate for
implementing IR applications that require "learning" IR codes. The example software for this TI Design
includes a Learning Mode example.
14
BOOST-IR Infrared (IR) BoosterPack™ Plug-in Module
SLAU598A – December 2014 – Revised July 2015
Copyright © 2014–2015, Texas Instruments Incorporated