Jump to content
gimli1426459910

[HELP] Hello World with Nokia 5110 and Kroesche/Stellaris_Drivers

Recommended Posts

Hi all, I need some help.
 
I want to write some test character on Nokia 5110 LCD with Kroesche/Stellaris_Drivers.
 
I've done "Hello World"-ing with Energia, and now I want to do it with CCS 5.2.
 
Here's my code

#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>

#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "driverlib/ssi.h"
#include "driverlib/pin_map.h"
#include "grlib/grlib.h"

#include "grl_pcd8544_84x48.h"

#define GRL_PCD8544_ENABLE_TEST

void main(void){
	SysCtlClockSet(SYSCTL_SYSDIV_5 | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ | SYSCTL_OSC_MAIN);
	GRL_PCD8544_84x48_Init(SysCtlClockGet());
	GRL_PCD8544_84x48_Test();
	}


Please refer grl_pcd8544_84x48.h and grl_pcd8544_84x48.c on link above.
 
Everytime I compile it, no error and warning occur, but the lcd remain blank.

 

Help me to do it with CCS, Thank you

 

 

Share this post


Link to post
Share on other sites

I've done "Hello World"-ing with Energia, and now I want to do it with CCS 5.2.

 

I assume this means you have already got the LCD working from energia?  (i.e. you have ruled out hardware/connection problems)

Not sure why this got moved to energia forum, since you are using CCS

 

One thing that seems a little odd is 

#define GRL_PCD8544_ENABLE_TEST

 

in your code file (where it doesn't do any good).

 

This needs to be defined when you compile grl_pcd8544_84x48.c

 

This could be achieved by defining the constant in grl_pcd8544_84x48.c, or in grl_pcd8544_84x48.h or in the CCS properties for your project.

 

Have you tried stepping through the program with the CCS debugger?

Share this post


Link to post
Share on other sites

I'm sorry for my ambiguous question, and yes I've been able to make my 5110 LCD display some text with Energia, thanks to Rei Vilo. Now I want to display some text with stellaris driver provided by Kroesche on CCS IDE.

 

 

I assume this means you have already got the LCD working from energia?  (i.e. you have ruled out hardware/connection problems)

Not sure why this got moved to energia forum, since you are using CCS

 

One thing that seems a little odd is 

#define GRL_PCD8544_ENABLE_TEST

 

in your code file (where it doesn't do any good).

 

This needs to be defined when you compile grl_pcd8544_84x48.c

 

This could be achieved by defining the constant in grl_pcd8544_84x48.c, or in grl_pcd8544_84x48.h or in the CCS properties for your project.

 

Have you tried stepping through the program with the CCS debugger?

.

Thanks Igor, I really need work hard on my C skill. I haven't try stepping through with the debugger, but when I debug it, my program is always suspended and give me message like this

No source available for "C$$EXIT()  at D:\Documents and Settings\User\workspace_v5_2\nokia3110\Debug\nokia3110.out:{3} 0xd78{4}" 

Somebody please make some test code with this driver and share in here, thank you

Share this post


Link to post
Share on other sites

.

Thanks Igor, I really need work hard on my C skill. I haven't try stepping through with the debugger, but when I debug it, my program is always suspended and give me message like this

No source available for "C$$EXIT()  at D:\Documents and Settings\User\workspace_v5_2\nokia3110\Debug\nokia3110.out:{3} 0xd78{4}" 
Somebody please make some test code with this driver and share in here, thank you

 

 

Actually the C$$EXIT() probably means you have run all the way through the program and main has ended. (At least that is what happened when I tried running the code. But I don't have the display, so can't test that part.)

 

Also, be sure that the SSI pins are connected to corresponding pins on one of the launchpad SSI ports, and that the C defines match the pins.

 

Some of the Energia example code uses what look like a random assortment of pins on Port B, does not appear to be using one of the SSI ports; whereas the C code is made to use one of the SSI ports (defaults to SSI port0), which is on GPIO Port A, plus some other sundry pins on port A.

 

Might want to check you wiring again since you probably had to rewire the LCD to match whichever SSI port you picked for the C code.

Share this post


Link to post
Share on other sites

I've been seeking for pin connection (wiring) between Nokia 5110 and LM4F120XL, anyone here can help ?

I saw most of case it mentioned about Energia library.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×