Jump to content

Nokia 5110 display

Recommended Posts

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Here's the code I am using to control 5110. It uses USCIB (2553) but USI (2231) can also be use without any problem or major updates. There is still a lot of work to be done, but basic text and some g

I wrote some code for the nokia lcd using spi a couple of months ago and after seeing Robs post I thought I'd post mine as well. sorry about the video quality I lost my good camera in a drift boat ac

Updated original post with new code. Added simple graphic stuff, 8 x 8 pixel graphics can be displayed, rotated, and flipped. Rotating is not very efficient, maybe there is another way of doing it.

Posted Images

  • 2 years later...

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,





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) {
if(dataCommand) {
} else {
UCB0TXBUF = data;
while(!(IFG2 & UCB0TXIFG))

In line 10 should be a { instead a ; ?


The Display now works nice.

Thanks for your help

Link to post
Share on other sites
  • 9 months later...

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

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.





=================    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.



Link to post
Share on other sites



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 = 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.



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;
Link to post
Share on other sites
  • 1 month later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...