Datasheet
www.ti.com
Software Examples
21
SLAU595A–October 2014–Revised July 2015
Submit Documentation Feedback
Copyright © 2014–2015, Texas Instruments Incorporated
MSP430FR4133 LaunchPad™ Development Kit (MSP
‑
EXP430FR4133)
3.4.1 Source File Structure
The project is split into multiple files. This makes it easier to navigate and reuse parts of it for other
projects.
Table 8. List of Source Files and Folders
Name Description
main.c The out-of-box demo main function, initializations, shared ISRs, and so on
hal_LCD.c Hardware abstraction layer for LCD
StopWatchMode.c Main function file for stopwatch mode
TempSensorMode.c Main function file for live thermometer mode
Library: Driverlib Device driver library (MSP430DRIVERLIB)
3.4.2 Power Up and Idle
Upon powering up the out-of-box demo, the LCD displays a scrolling welcome message. The
MSP430FR4133 then enters a loop, in which the LCD cycles through all of its segments followed by a
scrolling instruction message to "Hold S1 and S2 to switch modes".
3.4.3 Stopwatch Mode
While in the power up and idle state or in the temperature sensor mode, the stopwatch mode can be
entered by holding down both S1 and S2 buttons shortly. The LCD displays scrolling text "STOPWATCH
MODE" to indicate successful entry into this mode.
The MSP430FR4133 initializes the stopwatch calendar to HH:MM:SS:CC = 00:00:00:00, then goes to
sleep in LPM3.5. Since the onboard LCD has 6 alphanumeric digits, the stopwatch format is initially
MM:SS:CC but becomes HH:MM:SS when the timer reaches the first hour.
Press the S1 button to start the stopwatch timer (counts up). While the timer is running, the
MSP430FR4133 sleeps and wakes between LPM3 (waiting for RTC interrupt) and active mode
(incrementing calendar and updating LCD). Press the S1 button again to stop the stopwatch timer and
return the MSP430FR4133 back to LPM3.5 to conserve power. When the stopwatch timer is stopped,
press the S2 button resets the timer back to 00:00:00.
While the stopwatch timer is running, press the S2 button to pause the LCD at the current time but
continue the timer running in the background, allowing for the "split timer" functionality. Press the S2
button to resume display of the running timer on the LCD.
3.4.4 Temperature Sensor Mode
While in the stopwatch mode, the temperature sensor mode can be entered by holding down both S1 and
S2 buttons shortly. The LCD displays scrolling text "TEMPSENSOR MODE" to indicate successful entry
into this mode.
Upon entering this mode, the MSP430FR4133 initializes the ADC input to its internal temperature sensor
and starts sampling/conversion at four times per second. Each time an ADC conversion completes, the
LCD shows the calculated temperature to the tenths decimal place.
The temperature unit can be toggled between Celsius and Fahrenheit by pressing the S2 button.
The temperature measurement can also be paused/resumed by pressing the S1 button. While the
temperature measurement is running, the MSP430FR4133 sleeps and wakes between LPM3 (waiting for
ADC sample/conversion to finish) and active mode (processing the results and updating LCD). When the
temperature measurement is paused, the MSP430FR4133 enters LPM3.5 with the LCD remaining on
displaying the last measured temperature.