Software Examples
16
SLAU772 – June 2018
Copyright © 2018, Texas Instruments Incorporated
MSP430G2553 LaunchPad™ Development Kit (MSP
‑
EXP430G2ET)
For more details on how to get started quickly, and where to download the latest CCS and IAR IDEs, see
3.1
Out-of-Box Software Example
This section describes the functionality and structure of the out-of-box software that is preloaded on the
EVM.
The Out-of-Box demo for the MSP-EXP430G2ET LaunchPad development kit starts with a two LED toggle
sequence. The demo also implements a real-time temperature sensor.
3.1.1
Source File
The OOBE project includes one main.c source file (see
Table 7. Source File
Name
Description
main.c
Contains the main Out-of-Box demo and auxiliary functions
3.1.2
Overview
The online cloud-based
can be used to download this demo to your board
and visualize the temperature data. A serial terminal can also be used to display the data being sent from
the demo to the PC (application UART settings: 9600, 8, 1, n).
When powering up the Out-of-Box demo, the MSP-EXP430G2ET LaunchPad development kit starts with
a two LED toggle sequence. At any time, press S1 to switch to the Live Temperature mode.
3.1.3
Live Temperature Mode
In this mode, the LaunchPad development kit repeatedly measures the MSP430G2553 device internal
temperature and transfers the data to the PC through UART.
A reference temperature is taken at the beginning of this mode, and the LEDs of the LaunchPad
development kit signal a rise or fall in temperature by varying the brightness of the on-board red or green
LED, respectively. The reference temperature can also be recalibrated with another button press on P1.3.
The application keeps track of the temperature threshold, and when a new temperature data is acquired, it
is compared against the threshold. If measured temperature is below the threshold, the red LED will
illuminate, and if the measured temperature is above the threshold, the green LED will illuminate.
Pressing S1 will recalibrate the temperature threshold in this mode. The further the recorded temperature
is from the threshold, the brighter the corresponding LEDs will illuminate.
The user can influence the temperature of the device by blowing hot or cold air and observing the
changes in the user LED brightness or see data changes on the GUI.
The demo application uses the on-chip peripherals of the MSP430G2553 device such as the 10-bit ADC,
which samples the internal temperature sensor, and 16-bit timers, which drive the PWM to vary brightness
of the LEDs and enable software UART for communication with the PC. The MSP430G2553 offers a USCI
interface that is capable of communicating through UART at up to 2 MBaud, but to be aligned with all the
other MSP430G2xx devices, the demo uses the Timer UART implementation, which can be used on all
the other devices. This way the demo can be used with any other MSP430G2xx device with an integrated
ADC, without any change in the program.
3.2
Blink LED Example
This simple software example shows how to software toggle a GPIO to blink an LED on the LaunchPad
development kit.