Nokia 5110 revisited

matherp

Senior Member
I've been playing with the Nokia 5110 display. These are now available very cheap and work well with any picaxe with HW SPI.

I found code from hippy and srnet
http://www.picaxeforum.co.uk/showthread.php?21676-Mini-Morse-decoder-using-Nokia-5110-graphics-LCD&highlight=5110
http://www.picaxeforum.co.uk/showthread.php?18500-Graphical-LCD-module-from-mobile&highlight=5110

I've tested this code and have the following observations:
The SPI mode (SPImode01) in the examples appears wrong for the two displays I've tried with a 20X2. It does work just about but the clock idles low whereas it should be high. This is corrected with SPImode00 which then works very well with a SPImedium speed and a clock frequency of 64MHz.
The code now also works well without requiring a disconnect command and is not affected by the use of sertxd

One of the displays I have needs 0V to drive the backlight, the other needs 3.3V so the PWM range will be upside down depending on the display.

The software contrast setting is very sensitive and really there is only a very small range of usable numbers for a display and it is display specific (I found the range 0xB0 to 0xBF to work). So it does not make sense to use a pot as input to the picaxe to set this.

Both srnet and Hippy's versions use the picaxe to read a serial input to drive the display. I prefer to embed the display code in my main program (same for normal LCDs).

Based on their code and some Arduino code, I've developed my own much simplified version to be built into complete programs and which also integrates the generic formatting routines I've just posted:
http://www.picaxeforum.co.uk/showthread.php?25359-Formatting-numbers-solved

It also includes a bargraph routine that I'm quite pleased with :)

Example code (with thanks to Hippy and srnet) attached
 

Attachments

lbenson

Senior Member
I wired up a Nokia 5110 lcd module I just received following matherp's code and wiring example, and it worked on 2 AA batteries.

matherp notes that the software contrast setting is very sensitive. In fact, with the setting of 0xB0 in his code, I almost couldn't tell that the LCD was displaying anything. 0xB8 and 0xBF worked fine for me.

The module has "3V-5V" printed on it. I got 3 of them for $2 each, so I thought I'd see if they would work on 3 AAs. The one I tried displayed nothing and continued to display nothing when I switched it back to 2 AAs.
 

lbenson

Senior Member
Bitbang Nokia 5110 LCD with 14M2

Here is matherp's code modified for bitbanging on a 14M2.

So here is a nice ~$2US display for the 14M2, with B.0 left over for sertxd, and 4 other pins. 6 lines by 14 characters in the standard font. matherp's code includes text formatting and justification, and bar graphing.
 

Attachments

Last edited:
Top