I have been trying to get the EB-LM4F120-L35 booster pack to work with the Stellaris Launchpad without success.
I am following the getting started workshop workbook and I initially tried to run the demo program but the display just goes bright white. I then tried the first example in the workshop to display an image file and the result was the same. To keep it simple for trouble shooting I just created the code below to display text, clear the screen then repeat. I can still only get a complete white screen.
Probing the pins with an oscilloscope shows that they are changing state. I also tried a second Launchpad.
Can anyone suggest anything might be doing wrong?
Thanks for any help
Regards
Alastair
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/debug.h"
#include "driverlib/sysctl.h"
#include "grlib/grlib.h"
#include "drivers/Kentec320x240x16_ssd2119_8bit.h"
extern const unsigned char g_pucImage[];
tContext sContext;
tRectangle sRect;
void ClrScreen(void);
#ifdef DEBUG
void__error__(char *pcFilename, unsigned long ulLine)
{
}
#endif
int main(void)
{
SysCtlClockSet(SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_OSC_MAIN|SYSCTL_XTAL_16MHZ);
Kentec320x240x16_SSD2119Init();
GrContextInit(&sContext, &g_sKentec320x240x16_SSD2119);
ClrScreen();
while(1)
{
sRect.sXMin = 1;
sRect.sYMin = 1;
sRect.sXMax = 318;
sRect.sYMax = 238;
GrContextForegroundSet(&sContext, ClrRed);
GrContextFontSet(&sContext, &g_sFontCmss30b);
GrStringDraw(&sContext, "Texas", -1, 110, 2, 0);
GrStringDraw(&sContext, "Instruments", -1, 80, 32, 0);
GrStringDraw(&sContext, "Graphics", -1, 100, 62, 0);
GrStringDraw(&sContext, "Lab", -1, 135, 92, 0);
GrContextForegroundSet(&sContext, ClrWhite);
GrRectDraw(&sContext, &sRect);
GrFlush(&sContext);
SysCtlDelay(SysCtlClockGet())
ClrScreen();
SysCtlDelay(SysCtlClockGet())
}
}
void ClrScreen()
{
sRect.sXMin = 0;
sRect.sYMin = 0;
sRect.sXMax = 319;
sRect.sYMax = 239;
GrContextForegroundSet(&sContext, ClrBlack);
GrRectFill(&sContext, &sRect);
GrFlush(&sContext);
}