loading

Okay, here's the deal. There are some tutorials on youtube showing how to get graphics to show on the nokia 5110 and that's great. If you just want a simple way to do that, go and watch them instead but there are a few problems I see,

1. There are none for mac. I am using a mac and everyone in the videos are using a windows.

2. Sometimes I just wanna go to the computer and search up how to make some graphics. When searching "Nokia 5110 graphics" on google, I found nothing but some libraries and some text.

In this tutorial I will show you how to connect the display, use the code and use some web-based and downloaded tools to create some awesome graphics YOU can customize however you want. Now, enough of me speaking, let's just begin.

Step 1: Connections

First let's connect the Nokia 5110 display. Remember that the LCD runs on 3.3V and although some people have connected it to 5V, it has worked but gave some weird effects, so I suggest connecting to the 3.3V output of the arduino. Next, the LIGHT pin on the LCD. It is the one pin which is controlling whether backlight is on or off. It will be on if the pin is connected through ground and off if it's connected through VCC. The display uses 3 mA when not backlit which is awesome. What I am trying to say is, if you are going to build something that is gonna stay on, do not use the backlight if not necessary. Here are my connections:

LCD -> Arduino:


VCC -> Arduino 3.3V

LIGHT -> Arduino GND (I am going to be using it on)

GND -> Arduino GND

CLK (SCLK) -> Arduino pin 7

DIN (MOSI) -> Arduino pin 6

DC -> Arduino pin 5

CE or CS -> Arduino pin 4

RST (RESET) -> Arduino pin 3


Next, let's go over to creating some bitmaps and converting that to C code etc.

Step 2: Creating a BMP File

BMP (bitmap) is a picture format. It consists of a square grid called pixels. We will save our image as a BMP file.

First we will have to create some graphics, I will be using pixlr editor for this. I think it is a great web-based software for creating images and of course, BMPs. When you are on the website I linked to, choose to create a new image. Be sure to make the size 84 by 48, or whatever size your display is and click OK. Then simply paint or creating something you want to display on the LCD. You might want to increase the zoom level, then do that in the down left corner, choose something like 900%, it works great.

Next save your image by pressing Cmd + S (mac) or Ctrl + S (windows) and now, be sure to save it as a BMP. Next step is to convert this into a code usable by the arduino.

Step 3: LCD Creator

As I am on mac, I will be using a software called LCD creator, which is created by portreathbeach, many thanks to him. On windows, there is a software known as LCD assistant which works the same. Downloads:

LCD creator here

LCD assistant here

I will only show you how to use LCD creator in this tutorial. If you wanna know how to use the LCD assistant further, go visit some youtube tutorial or search the web for it :)

Now, click the "Open .bmp image" and locate and select your image with the graphics. Next click the "Generate C code" and watch the hexadecimal values pop up below. Click the "Copy to clipboard" tab and then exit out of the software.

Next, open your preferred text editing software, create a new file with nothing in it, then simply save it as .c. If .c is not an option, it will most likely not be, then save it as a random file format and rename it to "thename.c" and use .c instead. Hope that made sense. :)

You will now have to open a new arduino sketch and close it again, remember to save it before you close it. Now, navigate to your arduino folder and open the folder your sketch is inside of. Move the C file inside of that folder and bam, you are pretty much done, not much left now. Open the empty arduino sketch and now you see a new "tab" in the upper part of the sketch (see pictures). Open that tab and paste the hexadecimal values you copied before. In the next step we will learn how to some memory.

Step 4: Saving RAM Usage

We will save the C code in the program emory instead of the SRAM as we always need small RAM usage. To do this we will have to include a library and a word like the pictures or like this: (We include the PROGMEM word and the library)

#include <avr/pgmspace.h>

const unsigned char graphic [] PROGMEM= {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xE0, 0xF0, 0xF0, 0xF8, 0xF8, 0xFC, 0xFC, 0xF8, 0xFE, 0xFE, 0x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x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };

Step 5: Code

Now we are all ready to code, here is the code, I have tried to comment everything to make it easier to understand. And I forget to say, do rename the object in the C code to "graphic". I am using the LCD5110_Graph library from Henning Karlsen. Thanks a lot to him. Here is the code, enjoy:

Download the library here. And here is the code:

#include <LCD5110_Graph> //Including library

LCD5110 lcd(7,6,5,3,4); //Creating LCD object

extern uint8_t graphic[]; //Including the graphics

void setup() { lcd.InitLCD(); //Intializing LCD }

void loop() { lcd.clrScr(); //Clearing screen lcd.drawBitmap(0, 0, graphic, 84, 48); //Drawing out bitmap lcd.update(); //Updating the LCD }

Step 6: Finished

Thanks a lot for reading! If you have any questions please contact me or write a comment.

Have a great day,

Samuel

<p>What is the use of the update function?</p>
<p>the other file is const unsigned char name [] PROGMEM , but the one in arduino is uint8_t , and it doesnt pick up the reference . also when i changed the graphic type to uint8_t it runs but prints weirdly . any help ? </p>
<p>I did :) but only with the basic example thanks for share </p>
<p>I did :) but only with the basic example thanks for share </p>
<p>I did :) but only with the basic example thanks for share </p>
<p>Nice</p>
<p>Very good instructable, a lot of information in just one place!<br>I am not 100% sure, but maybe, in step 4, more memory could be saved if the code was declared as byte instead of char.</p>
<p>Hi, </p><p>I'm sorry for replying to an old comment, but this could be useful for other readers.</p><p>Byte and unsigned char are basically the same, both using 1 byte of memory. For clarity in the code it might be preferable to use byte over unsigned char, so that it's immediately clear that the array doesn't hold ASCII character codes but some number. Memory-wise it doesn't make any difference.</p>
You're right, I haven't realized this detail, both char and byte are 8 bits size. Thanks for the reply.
<p>Hello Ineves,</p><p>Sorry for my late reply, either way, thanks for your feedback! And yes, it would probably save more memory if you say so :) I am not a genius in technology and arduino :) Have a great day!</p><p>Samuel</p>
<p>Hi! This is a very fine tutorial, ad easy to understand, there is one little thing, the link to the &quot;Henning Karlsen Library&quot; do not work, due to the site do not allow &quot;deep linking&quot; to their site and is advising the user to tell the Administrator to fix the error. Hereby done.</p><p>Keep up the good tutorials, they are a great help.</p><p>Merry Christmas! 2015 Greetings from Denmark to everybody.</p>
<p>Hello my friend,Get your degree in Electrical Engineering first,then you can be a pilot with knowledge of what is actually going on in the cockpit and in the rest of the aeroplane , also you will be able to get a real good job when you get tired of flying as you will find flying very very boring...rem the first astronaughts were monkeys.</p>
<p>Very good and simple tutorial, my only confusion was when you said to rename the object in the C code to graphic. What did you mean by that?</p>
<p>Hello, </p><p>In this line:</p><p>const unsigned char something [] PROGMEM= {</p><p>Just change your &quot;something&quot; to graphic so it matches the code. Hope this helps,</p><p>Samuel</p>
<p>Great instructable</p><p>I use a 5510 as alyseur logic that operates with an ATmega8 the main power supply is 5 volts but the 5510 is supplied with 3 V 3 through 1N4007 diode in series with Vdc (3 x 0.6 V = 1.8 V 5 V = -1.8 V 3.2Volts) I do not have a problem in this way.</p><p>Here is the author's website with the schema and the program:</p><p>http://www.serasidis.gr/circuits/mini_logic_analyzer/miniLogicAnalyzer.htm</p>
friends don't let friends use Nokia 5110!<br>Most eBay sold displays are reconditioned. The foam that makes the connection between glass and circuit board is a single point of failure.<br>If your display remains dark. Try pressing/lifting glass and board. You might have to take it apart and clean contacts. I had 1:5 success rate, rest were throw always. You get higher resolution OLED displays for same money, often requiring many fewer connections.<br>My advice: avoid
Hello ChrisHerman,<br><br>These LCDs are in my experience very high quality, I buy mine from aliexpress and I have never had any problem, they are also cheaper than oleds, have a great day!<br><br>Samuel
Yes, they are nice when they work and they are quite inexpensive. Good to know there is better quality out there than i found.<br>BTW great job on your article in general - most comprenhensive work on 5110s.
<p>I've worked with 5110 displays for a while, and found that some work with 3.3v, some at 5v, and some at 3.3v, but needing a 100-ohm resistor to Vcc. Quite a mixed lot of them out there.</p>
<p>Hello thegrendel,</p><p>Sure are the 5110 displays great :) And yes, I have heard &quot;rumors&quot; (and they are probably true) that the nokia 5110 will sometimes work with 5V, as mine works perfect with 3.3V I don't wanna try to connect it to 5V and then blowing the screen :( Either way, have a great day!</p><p>Samuel</p>
<p>Very useable info - timely (in my case) also.<br>I'm making a prototype environmental bit of kit, it'll use an Xmega (Think: Arduino - Mega - on steroids!) and although the 'production' version won't have a display - we haven't taught the Lapland Reindeers how to read, despite the best efforts of the drunk locals - the R&amp;D version will. R&amp;D == What the customer will see in a live demonstration, in our case.<br>One &quot;USP&quot; - &quot;Unique Selling Point&quot; is if your menus are in the customers' languages. Now I think I can implement Cyrillc for our (only slightly) Eastern customers.<br>Keep it up, Samuel. I tore apart my first radio when I was 8. (Put it back together when I was 12, so bit ashamed...)<br>-Andy</p>
<p>Hello Andy,</p><p>Thanks for your feedback. Nice story you've got there :) Hope your eastern customer can read the menu in his language soon haha. Have a great day!</p><p>Samuel</p>
<p>Not bad, wish I was at your level when I was 14, both in terms of electronic tinkering and English. Continue on this path and you'll be destined for great things!<br><br>Lycka till!</p>
<p>Hello Switch and Lever,</p><p>Thanks a lot for your feedback! It means a lot :) I am actually not going to become an electronics engineer hahah, I am shooting for the skies :) I am gonna become a pilot. Have a great day and again thank you for beliveing in me :)</p><p>Samuel</p>
<p>it's a good idea, maybe i can have a try.</p>
<p>Yes, it is really cool. Have fun :)</p>
<p>Nicely done. Thanks for sharing this!</p>
<p>Thanks a lot. Always appreciated with some nice feedback :)</p>

About This Instructable

86,796views

423favorites

License:

Bio: Hello, My name is Samuel, I am a student. I love micro controllers like arduino, they are my favorite interest. I also do geocaching, a ... More »
More by samuel123abc:Real time clock using DS3231 (EASY) Controlling 120-240 VAC with a relay using arduino Nokia 5110 graphics tutorial 
Add instructable to: