TI Design and Software Examples
3.1.5
IR Emitter and Receiver Software Example
This code shows how to send and receive IR signals using the BOOST-IR BoosterPack. The example
requires two sets of MSP-EXP430FR4133 LaunchPad kits and BOOST-IR BoosterPack modules to
communicate with each other.
3.1.5.1
Source File Structure
This project is organized in multiple files. This makes it easier to navigate and reuse parts of it for other
projects.
describes each file in the project.
Table 5. Source Files and Folders
Name
Description
FR4133_IR_BP_RX.c
IR receiver main function, IR setup and processing, and other functions
FR4133_IR_BP_TX.c
IR emitter main function, IR setup and processing, and other functions
HAL_FR4133LP_Board.c
Board initialization functions, keypad scanning functions
HAL_FR4133LP_LCD.c
LCD initialization functions, LCD display functions
3.1.5.2
IR Emitter Example
The IR Emitter code sends messages to the other board. Whenever a button is pressed on the
BoosterPack, a command corresponding to the key pressed is sent to the other board. You can tell that
the IR emitter code is loaded into the BoosterPack because the LCD radio symbol and TX are displayed.
An LED is lit when the transmission is happening. The button that is pressed is also displayed on the LCD.
This example makes use of the IR features of the MSP430FR4133 device for generating an ASK
modulated signal. TA1CCR2 generates the envelope for the data to be sent, and TA0CCR2 generates the
carrier frequency. The timers are connected internally and using the SYSCFG settings are combined to
generate the IR signal output on a pin, which goes to the IR emitter LED on the BoosterPack. For more
details on the IR generation using the IR modulation features of the MSP430FR4133, and information on
how data is encoded in the examples, see
3.1.5.3
IR Receiver Example
The IR Receiver code receives messages from the emitter board. Whenever a signal is received from the
other board (i.e. when a button on the keypad is pressed on the other BoosterPack), and the Receiver
BoosterPack receives the signal, the name of the button pressed is displayed on the LaunchPad LCD. For
example, if the button POWER is pressed on the emitter BoosterPack, and the signal is received by the
receiver BoosterPack, "POWER" is displayed on the receiver LaunchPad LCD and the LED on P4.0
blinks.
This example uses the IR receiver and demodulator on the BoosterPack to strip the carrier off of the
received signal. This means that the signal into the MSP430 is just the envelope signal. The timer capture
registers are used to measure the high and low pulses to decode the data. For more details on the IR
demodulation and decode using the BoosterPack hardware and the timers of the MSP430FR4133, and for
information on how data is encoded in the examples, see
19
SLAU598A – December 2014 – Revised July 2015
BOOST-IR Infrared (IR) BoosterPack™ Plug-in Module
Copyright © 2014–2015, Texas Instruments Incorporated