Jump to content
RobG

Nokia 5110 display

Recommended Posts

Hi there,

 

can somebody give me a little jump start to this Display.

I am using a Launch Pad with an G2553, CCS 6 with Win7.

If i copy Rob G's Code to a new Project (main.c and PCD8544.h) an Build it i am getting 34 Errors.

I will try to solve this problems, but i am wondering about that much Errors.

Maybe somebody can give me a advice. I think i made a basic error and the code is fine.

thanks for your help,

 

Max

 

post-29761-0-21908100-1438612531_thumb.jpg

Share this post


Link to post
Share on other sites

This is weird, I got the same error when I created new project.

Comment out line right above first error, //setAddr(0, 0); 

Build, then un-comment that line and build again, error should disappear.

Share this post


Link to post
Share on other sites

Thats really weird. Finally it runs. But i think there is another error.

void writeToLCD(unsigned char dataCommand, unsigned char data) {
LCD5110_SELECT;
if(dataCommand) {
LCD5110_SET_DATA;
} else {
LCD5110_SET_COMMAND;
}
UCB0TXBUF = data;
while(!(IFG2 & UCB0TXIFG))
;
LCD5110_DESELECT;
}

In line 10 should be a { instead a ; ?

 

The Display now works nice.

Thanks for your help

Share this post


Link to post
Share on other sites

Hi guys , I use tm4c1294 and ,i connected 5110 lcd to my launchpad but i can not send the required data to lcd ? do you have any library for 5110 lcd which is compatible with tm4c1294 in energia ?

Hi , i connected 5110 lcd to my launchpad but i can not send the required data to lcd ? can u help please

Share this post


Link to post
Share on other sites

Hi @@RobG ... 

 

If you have some additional advice on how to get your code working - I too have a huge number of errors - exactly like the poster on 3 aug 2015.   My CCS6 build looks the same as his screenshot with the first error starting at line 64 (   int c = 0x20;) then onwards.   I compiled the code today.

 

I followed your advice (see the note I cut / paste immediately below) but with no positive result.   It is very strange.

 

And, in fact, when I tried your ' 4 channel - voltmeter - on  - a 5110' - elsewhere in this forum -  but I got the same huge number of errors.     I had no time to investigate then.

But thought to bring it up now - I have 5110 displays on hand and would love to use them !

 

Thank you.

Cheers.

 

 

 

=================    RobG's advice.....

 

Posted 04 August 2015 - 04:14 AM

This is weird, I got the same error when I created new project.

Comment out line right above first error, //setAddr(0, 0); 

Build, then un-comment that line and build again, error should disappear.

 

 

Share this post


Link to post
Share on other sites

@@RobG

 

Super big thanks.

I downloaded your main.c (5.49KB, your post just above) and replaced the old main.c with the new one.    But not PCD8544.h (so as to try one step at a time).

 

>>>>>    It worked.      It compiled and dowloaded into the 2553LP.  No 5110 attached at the moment.    No errors in the original PCD8544.h file.

 

I'm on two machines here:  Win10 and Vista.     Vista worked, next I'll try Win10.    I'm also on CCS = 6.1.1.00022 on the Vista, 6.1.3 on Win10.   (but I'm quite sure I got the same prob on the Win10 machine with CCS 6.1.3)

 

 

I have no clue at all why this happened ---   and FWIW, the same thing happened with your 4 channel voltmeter onto Nokia 5110.

Maybe the forum download put in non-printing chars?    But I'm not going to debug that one...

 

Anyway, thanks again.

 

Next step is to wire up the Nokia 5110 and try out your excellent code.

 

Cheers.

Share this post


Link to post
Share on other sites

Yes, I am actually in the process of doing it.

 

But going back to the problem, looks like compiler doesn't like when declaration is in the middle of statement block and there's no white space before the type. Moving declaration to the top of block or adding white space fixes the problem.

void clearBank(unsigned char bank) {
setAddr(0, bank);
int c = 0; //<-- causes error
while(c < PCD8544_HPIXELS) {
...
void clearBank(unsigned char bank) {
int c = 0; //<-- OK, declaration at the top
setAddr(0, bank);
while(c < PCD8544_HPIXELS) {
...
void clearBank(unsigned char bank) {
setAddr(0, bank);
 int c = 0; //<-- OK with white space (that's why formatted code works)
while(c < PCD8544_HPIXELS) {
...

You can reproduce it in new project like this:

#include <msp430.h>
/*
 * main.c
 */
int main(void) {
    WDTCTL = WDTPW | WDTHOLD;	// Stop watchdog timer
int c = 0;
	return 0;
}

Share this post


Link to post
Share on other sites

Rob,

 

In the original post I found you were measuring voltage with a jumper.  Is there a schematic or other documentation covering external inputs?

 

Thanks 

 

John Fergus

Share this post


Link to post
Share on other sites

hi there Rob.I try to connected msp430g2553 between nokia 5110 LCD. But i didnt succeed.Please help me!. fisrtly i design msp430g and 5110 LCD in proteus.but your shematic and proteus not same.How to connected msp430+5110 LCD? i need your your help

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

×