background image

Software Examples

www.ti.com

3.4.7

SliderBall Game

This application was designed to show the functioning ability of the two Capacitive Touch sliders in
conjunction with the LCD from the 430BOOST-SHARP96 BoosterPack.

To enter the application, the SliderBall game option on the main menu must be highlighted and the right
button (S2) then pushed. The SliderBall game requires the player to use a sliding paddle to keep the ball
in play. The goal of the game is to keep the ball alive and on the screen by having it hit off of the two
paddles at each end of the screen. Users start off with five lives to accumulate as many points as
possible. For each time that the ball is blocked by the paddle, points are awarded. The higher the
difficulty, the more points are awarded for each hit. Each time the ball reaches the end of the screen and
the paddle has not hit the ball, the user loses a life. After the life is lost, the ball automatically starts again
for another round. This repeats until all lives are exhausted, and the game is over. If the high score has
been achieved, a congratulations screen will be displayed to notify the user. At this point the final score,
as well as the board high score will be displayed and the user may then choose a new level of difficulty to
play once again.

To navigate the user levels menu and choose an option, the left capacitive touch slider and right button
are used similar to all previous menus. The user may choose between the following: easy, normal, hard,
and Insane. After selecting a difficulty, the game will begin to start, with the ball moving to the right-hand
side first. Both capacitive touch sliders are used to control their respective paddles along the side of the
screen. When the user misses the ball, it will be held in place for a few cycles before starting to move
again to give the user a chance to regroup following losing a life. To create "easier" versions of the game,
sleep cycles are added to slow down the game play.

The high score for each user level is stored in FRAM and is retained on subsequent power cycles. This
value is erased only when the device is re-programmed.

3.4.8

Special Notes: Inverting the Display Color Scheme

A feature that has been built in to the demo code is the ability to invert the display colors. This can be a
useful feature for times when the original display color settings are difficult to read.

To invert the colors edit the file 'sharp96x96.h' within the 'grlib' directory. In the 'User Configuration for the
LCD Driver' section under 'Invert Display Option' use either one of the # defines 'NORMAL_DISPLAY' or
'INVERT_DISPLAY' as needed.

When INVERT_DISPLAY is defined it allows the demo to display with a black background and white
foreground once the demo code is re-downloaded onto the MSP-EXP430FR5969 board.

3.5

430BOOST-SHARP96 Graphics Library Demo

NOTE:

This graphics library demo is dependent on the 430BOOST-SHARP96 BoosterPack that

comes with the MSP-BNDL-FR5969LCD bundle.

The grlib demo shows how to use the MSP430 Graphics Library

http://www.ti.com/tool/msp430-grlib

or

"grlib," in a project with the Sharp

®

display. This demo cycles screens without user interaction to show

simple graphics primitives.

Pixels

Lines

Circles

Rectangles

Text

Images

The demo introduces the functions to configure grlib such as initialization, color inversion, and using
foreground and background colors properly.

32

MSP430FR5969 LaunchPad™ Development Kit (MSP

EXP430FR5969)

SLAU535B – February 2014 – Revised July 2015

Submit Documentation Feedback

Copyright © 2014–2015, Texas Instruments Incorporated

Summary of Contents for MSP-EXP430FR5969

Page 1: ...tures buttons and LEDs for quick integration of a simple user interface as well as a super capacitor super cap that enables standalone applications without an external power supply Figure 1 MSP EXP430...

Page 2: ...e bat 23 17 Directing the Project Import Function to the Demo Project 24 18 When CCS Has Found the Project 25 19 Live Temperature Mode 26 20 FRAM Log Mode 27 21 FRAM Unified Memory With Dynamic Partit...

Page 3: ...ed in your development Free software development tools are also available TI s Eclipse based Code Composer Studio IDE CCS and IAR Embedded Workbench IDE IAR and the community driven Energia open sourc...

Page 4: ...ture and input voltage values After reconnecting to the GUI these values can be uploaded and graphed in the GUI A more detailed explanation of each mode can be found in Section 3 1 5 Next Steps Lookin...

Page 5: ...ws an overview of the LaunchPad hardware Figure 2 EVM Overview 5 SLAU535B February 2014 Revised July 2015 MSP430FR5969 LaunchPad Development Kit MSP EXP430FR5969 Submit Documentation Feedback Copyrigh...

Page 6: ...latform FRAM is a cutting edge memory technology combining the best features of flash and RAM into one nonvolatile memory More information on FRAM can be found at www ti com fram Device features inclu...

Page 7: ...TB0 4 COUT 29 P3 6 TB0 5 30 P3 7 TB0 6 31 P1 6 TB0 3 UCB0SIMO UCB0SDA TA0 0 32 P1 7 TB0 4 UCB0SOMI UCB0SCL TA1 0 33 P4 4 TB0 5 34 P4 5 35 P4 6 36 DVSS 37 DVCC 38 P2 7 39 P2 3 TA0 0 UCA1STE A6 C10 40 4...

Page 8: ...en out or if an input should be pulled or driven to a high or low level 4 Begin target FR5969 execution 5 Measure the current Keep in mind that if the current levels are fluctuating it may be difficul...

Page 9: ...ct interfacing to a PC for easy programming debugging and evaluation The eZ FET uses Spy Bi Wire SBW two wire protocol to interface with the MSP430 devices These pins are the SBW RST and SBW TST pins...

Page 10: ...he MSP Application UART1 port In this case Figure 6 shows COM13 but this varies from one host PC to the next After you identify the correct COM port configure it in your host application according to...

Page 11: ...the application energy profile as well as CPU and peripheral states By default EnergyTrace technology is disabled in CCS To enable EnergyTrace click Window Preferences Code Composer Studio Advanced T...

Page 12: ...r separate tabs Profile States Power and Energy Table 1 EnergyTrace Debug Windows EnergyTrace Description Debug Window Profile Displays a compressed view of captured data and allows comparison with pr...

Page 13: ...ofile to project directory When saving an EnergyTrace profile the default filename will start with MSP430_D followed by a timestamp When saving an EnergyTrace profile the default filename will start w...

Page 14: ...olation Block Connections Jumper Description GND Ground V 3 3 V rail derived from VBUS by an LDO in the eZ FET domain Backchannel UART Ready To Send for hardware flow control The target can use this t...

Page 15: ...do this disconnect every jumper in the isolation jumper block This is necessary because the emulator cannot connect to more than one target at a time over the Spy Bi Wire SBW connection Next make sure...

Page 16: ...osterPack Power Domain Legend Hardware www ti com 2 4 Power The board is designed to support five different power scenarios The board can be powered by the eZ FET or JTAG debugger external power Boost...

Page 17: ...3 3 V ensure that a jumper is connected across the J13 V terminal The eZ FET is a debugger so J10 must be set to debugger for power to reach the target MSP430FR5969 device For the power configuration...

Page 18: ...me use cases it might be required to power the board from a BoosterPack When powered from a BoosterPack the BoosterPack voltage should be across J4 Pin 1 Vcc and J5 Pin 20 GND This complies with the B...

Page 19: ...per cap to power the LaunchPad first change the J2 jumper to select Use and then set a jumper on J11 to charge the super cap After waiting for it to charge any external power can be removed from the s...

Page 20: ...oosterPack Plug in Module Headers The BoosterPack headers allow for a variety of applications to be created by plugging BoosterPacks onto the LaunchPad BoosterPacks cover a wide range of possible appl...

Page 21: ...oftware More information about compatibility can be found at http www ti com launchpad Figure 15 shows the 20 pin pinout of the FR5969 LaunchPad Note that software s configuration of the pin functions...

Page 22: ...b to display graphics primitives and images 3 1 MSP430 Software Driver Library Graphics Library and Capacitive Touch Library The examples are built upon three MSP430 libraries available from TI shown...

Page 23: ...0Flasher tool is also shipped to interface with the eZ FET Emulator To quickly program a demo onto the LaunchPad simply navigate into the corresponding demo project s directory and double click the Pr...

Page 24: ...igure 17 Directing the Project Import Function to the Demo Project Selecting the CCS or CCS_Code_Size_Limited folder also works The CCS specific files are located there When you click OK CCS should re...

Page 25: ...stall MSP430Ware which contains driverlib grlib capacitive touch library and the TI Resource Explorer These are already included in a CCS installation unless the user selected otherwise 3 3 Out of Box...

Page 26: ...3 to wait for UART commands from the PC GUI The GUI that is included in the MSP EXP430FR5969 Software Examples download is required to connect to the serial port that the LaunchPad s UART communicatio...

Page 27: ...ting the FRAM Log Mode 3 3 4 FRAM Log Mode To enter the FRAM Log Mode click the Start button under FRAM Log Mode in the GUI s Application Controls panel The PC GUI immediately sends the current system...

Page 28: ...HARP96 BoosterPack and has a very limited use without it The full demo source code cannot be built with the free version of CCS or IAR IAR KickStart because of the code size limit To bypass this limit...

Page 29: ...ption to turn on or off the seconds display is provided using the left button S1 This is useful when attempting to measure power The device spends most of the time in standby LPM3 waking up every one...

Page 30: ...ck E 1015 write cycles This is a minimum specification for FRAM endurance found in the device data sheet Table 9 FRAM Endurance Calculation for 1KB Block of FRAM Variable Derived From Value E FRAM end...

Page 31: ...ins in Low Battery mode If the device has been plugged into USB and the right button S2 is pushed the device enters Deep Sleep mode again When running this application the ADC measurements are logged...

Page 32: ...paddles along the side of the screen When the user misses the ball it will be held in place for a few cycles before starting to move again to give the user a chance to regroup following losing a life...

Page 33: ...ge If the Sharp display was a color display with 16 bits or color per pixel common in color displays this buffer would be significantly larger 2 When selecting a microcontroller for an application wit...

Page 34: ...and all parametric sheet Microcontroller data sheet SLAS704 information for this device 4 3 Download CCS IAR or MSPGCC Although the files can be viewed with any text editor more can be done with the p...

Page 35: ...ple code examples that demonstrate how to use the MSP430 s entire set of peripherals ADC12 Timer_A Timer_B and so on These do not use driverlib rather they access the MSP430 registers directly Every M...

Page 36: ...e a problem on the host side Probe on TXD while sending data from the MSP430 If you don t see data it might be a configuration problem on the USCI_A0 module Consider the use of the hardware flow contr...

Page 37: ...P2 0 TB0 6 25 P2 1 TB0 0 26 P2 2 TB0 2 27 P3 4 TB0 3 SMCLK 28 P3 5 TB0 4 COUT 29 P3 6 TB0 5 30 P3 7 TB0 6 31 P1 6 TB0 3 32 P1 7 TB0 4 33 P4 4 TB0 5 34 P4 5 35 P4 6 36 DVSS 37 DVCC 38 P2 7 39 P2 3 TA0...

Page 38: ...3 J2 Place Jumper 1 2 3 J8 dnp R2 10 R7 10 S3 C1 1n R1 47k 1 2 3 J1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 J13 C7 0 1F EEC S0HD104H J11 Place Jumper 1 2 3 4 5 6 J21 dnp J7 VCC JTAG VCC TD...

Page 39: ...38 1 1 TP110 TP 038 1 1 TP114 TP 038 1 1 TP113 TP 038 1 IO1 2 IO2 3 GND 4 IO3 5 IO4 6 VCC IC102 TPD4E004DRY R123 33k C108 100n C105 100n 1 IN 2 GND 3 OUT 4 NC 5 NC 6 EN IC101 TLV70036DSE 1 2 3 4 5 6 7...

Page 40: ...1SOMI PM_UCB1SCL 44 P4 3 PM_UCB1CLK PM_UCA1STE 45 P4 4 PM_UCA1TXD PM_UCA1SIMO 46 P4 5 PM_UCA1RXD PM_UCA1SOMI 47 P4 6 PM_NONE 48 P4 7 PM_NONE 49 VSSU 50 PU 0 DP 51 PUR 52 PU 1 DM 53 VBUS 54 VUSB 55 V18...

Page 41: ...C 16 DVCC 17 PWPD MSP102 MSP430G2452RSA R116 4k7 R117 4k7 R127 3k3 R126 2k2 R128 6k8 C115 33p R112 220k R113 220k C116 33p R114 220k R115 220k C106 4 7u 1 NO1 2 V 3 IN1 4 COM2 5 NO2 6 GND 7 IN2 8 COM1...

Page 42: ...430FR5969 Software Examples and the MSP EXP430FR5969 Hardware Design Files 1 Changed arrangement of subsections in Section 2 5 NOTE Page numbers for previous revisions may differ from page numbers in...

Page 43: ...set forth above or credit User s account for such EVM TI s liability under this warranty shall be limited to EVMs that are returned during the warranty period to the address designated by TI and that...

Page 44: ...the antenna types listed in the user guide with the maximum permissible gain and required antenna impedance for each antenna type indicated Antenna types not included in this list having a gain great...

Page 45: ...t the EVM user guide prior to connecting any load to the EVM output If there is uncertainty as to the load specification please contact a TI field representative During normal operation even with the...

Page 46: ...OST OF REMOVAL OR REINSTALLATION ANCILLARY COSTS TO THE PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES RETESTING OUTSIDE COMPUTER TIME LABOR COSTS LOSS OF GOODWILL LOSS OF PROFITS LOSS OF SAVINGS LOSS OF...

Page 47: ...e resources are subject to change without notice TI grants you permission to use these resources only for development of an application that uses the TI products described in the resource Other reprod...

Reviews: