How to work with the Sharp LCD BoosterPack, MSP432 LaunchPad and TI-RTOS.
There's (currently) no TI-RTOS driver or example for the Sharp LCD BoosterPack with the MSP432 LaunchPad. But someone fixed that for us... |
What you need:
- MSP432 LaunchPad
- 1 micro-USB cable
- Code Composer Studio
- TI-RTOS for MSP43X
- 430BOOST-SHARP96430BOOST-SHARP96 LCD BoosterPack
At the time of writing, the TI-RTOS release for MSP43x doesn't ship with a driver for the Sharp 96*96 LCD BoosterPack.
Other flavours of the TI-RTOS (e.g.: CC1310 and 2650) have both driver and examples. My first idea was to port that implementation to the MSP432.
But then I stumbled on a forum post of a Mr. Pocreva on the TI E2E forum that contained a port. A working one!
The start of that forum post contains a zip file. You'll find grlib and LcdDriver folders in BluHale path of that archive.
Copy these two to your project and add a new include entry that points to grlib/grlib.
And then add this include and rtos task (or just replace the existing heartBeatFxn() task of the empty example) to your project. Check my links below to learn how to start a TI-RTOS project if you don't have one ready.
#include <lcddriver/sharp96x96.h> Graphics_Context g_sContext; #define TASKSTACKSIZE 512 Task_Struct task0Struct; Char task0Stack[TASKSTACKSIZE]; /* * ======== heartBeatFxn ======== * Toggle the Board_LED0. The Task_sleep is determined by arg0 which * is configured for the heartBeat Task instance. */ Void heartBeatFxn(UArg arg0, UArg arg1) { Sharp96x96_LCDInit(); GrContextInit(&g_sContext, &g_sharp96x96LCD); GrContextForegroundSet(&g_sContext, ClrBlack); GrContextBackgroundSet(&g_sContext, ClrWhite); GrClearDisplay(&g_sContext); GrContextFontSet(&g_sContext, &g_sFontCm20b); GPIO_toggle(Board_LED0); GrStringDraw(&g_sContext, "Hello,", -1, 10, 15, 0); GrStringDraw(&g_sContext, "world!", -1, 22, 60, 0); GrFlush(&g_sContext); while (1) { Task_sleep((UInt)arg0); GPIO_toggle(Board_LED0); } }
The header of the rtos task initialises the LCD driver. The task's loop just flashes an LED to show that the RTOS lives.
There are 153 fonts available. Enjoy! Make something nice.
(there's a sample project attached)
Top Comments