Graphical LCD module from mobile

Radarman2

Member
Hi all,
have seen several posts by people trying to get Nokia screens working with picaxe and the inherent problems in soldering to the tiny connectors.
Just found these on fleabay for £6 delivered (more than 10 available):

http://cgi.ebay.co.uk/Nokia-5110-LCD-Module-blue-84-48-arduino-PIC-MCU-/150612108384?pt=UK_AudioElectronicsVideo_Video_TelevisionSetTopBoxes&hash=item23112e6460

It's a made for MCU module using a Nokia 5110 screen (with backlight).
VCC - power input (3.3v and 5v available)
GND - Ground
SCE - Chip Select
RST - Reset
D \ C - data / instruction selection
DN - Serial Data Line
CLK - Serial Clock Line
LED - backlit console

I am in no way associated with the seller, just something I came across.
 

eclectic

Moderator
@Radarman and Slurp.

Having been there a couple of years ago,
£6 is worth every penny,
compared to aggro / time / Opticians bills .....

(Not to mention the binned-ones that I didn't show! :)

e
 

Attachments

Texy

Senior Member
I didn't see how you select between 3.3 and 5 volts, or ate two different modules supplied?
Texy
 

hippy

Technical Support
Staff member
@ radarman2 : Thanks for the heads-up. Having had a box of Nokia LCD's for years now, languishing as too daunting to wire-up, these are a godsend, though I actually got mine from another supplier.

The side-facing LED's are a bit annoying with a lot of bleed and I'd prefer a proper diffused backlight, but them's the breaks. I used to have a watch lit the same way so at night time you could tell it had a light and the battery was working but not see the time :)

@ Texy : I'd take that 5V with a pinch of salt though some people say they've had no problems using Nokia LCD's at 5V. The PCD8544 datasheet rates itself at 3V ( 2V7 to 3V3 ) with 5V an absolute maximum so recommended to stick to 3V or on your own head be it. You will need a current limiting resistor for the LED's at 5V and I wouldn't even try at 3V without; 180R was fine for mine.

I'm sure there's other PICAXE example code on the Forum but my preliminary work-in-progress example attached for a 20X2. Designed to be a serial to LCD interface but also capable of running its own program included - I want to have a trend bar chart of temperature hence the inclusion of bar graph specific code. I've used PWM to drive the backlight.

The code is somewhat long, a bit much as a whole, so you'll probably want to turn block collapsing on in the Programming Editor.

For the record - Decoding bitmaps and putting 84 characters from the internal receive buffer to the screen takes around 100ms. When using double-width and/or double-height characters that will take longer. The commonest mode of operation is most heavily optimised.
 

Attachments

PerthEng

Member
A good start there hippy with information should help many others get started.

Your comments wrt the Reset signal does certainly highlight that one MUST read the datasheet specific to the chip in hand and not presume that data from one sheet or some other website posting can be applied to another relatively similar chip.
 

lbenson

Senior Member
Sorry to revive a 5-year-old thread, but the Nokia 5110 LCD appeared on my radar again.

Srnet has a related thread here: http://www.picaxeforum.co.uk/showthread.php?21676-Mini-Morse-decoder-using-Nokia-5110-graphics-LCD&highlight=5110

And matherp here: http://www.picaxeforum.co.uk/showthread.php?25360-Nokia-5110-revisited&highlight=nokia+5110

Matherp's has nice well-commented, well-structured code derived from srnet and hippy above. I'm wondering if with bit-banged spi, this would work adequately with a 14M2, not as a stand-alone controller for the LCD, but as a quite slow-changing display for a project which needs only 2 spare I/Os.

Matherp's program had a nice ascii art drawing for his 20x2 design which I've modified for the 14m2 (ascii art originally hippy's):
Code:
; Nokia 5110 LCD
;                         PICAXE-14M2
;               +3V -.-  .------_------.                              Nokia
;                    `---| +3V      0V |--------------.                LCD
;         .------------->| SI   SO B.0 |---.          |            .----------.
;         |             -| C.4     B.1 |---|----------|----- VDD --|  _____   |
;         |             -| C.3     B.2 |---|-------.  }----- GND --| |     |  |
;         |   .----------| C.2     B.3 |---|-----. `--|----- SCE --| |     |  |
;         |   |         -| C.1     B.4 |---|---. `----|----- RST --| |     |  |
;         |   |      .---| C.0     B.5 |---|-. `------|----- D/C --| |     |  |
;         |   |      |   `-------------'   | `--------|----- DAT --| |     |  |
;         |   |      |                     |       .--|----- CLK --| |_____|  |
;         |   |      |                     |       |  |  .-- LED --|          |
;         |   |      |                     |       |  |  |         `----------'
;         |   |      `---------------------|-------'  |  |
;         |   |                   ____     |          |  |           PCD8544
;   TX <--|---|----------|<|-----|____|----'          |  |
;         |   |         1N4148    180R                |  |      Note that the top
;   RX >--^   |                                       |  |       line is to the
;             |              ____                     |  |       right as shown
;   0V >--.   .-------------|____|--------------------|--'      where the larger
;        _|_                 180R                    _|_         metal area is
With the replacement of hspiout commands with a "gosub sendSPI", matherp's program passes a syntax check for the 14m2.

Should this work?
 

Hemi345

Senior Member
Just another option that would require only one pin on your 14M2 and no bitbanging are the various Digole displays. I recently received a graphical color LCD (1.44") and was up and running in minutes graphing temperature data using the UART mode. Works great at 3.3V. $11 US shipped from their Ebay store.
 

Hemi345

Senior Member
That's the same one I bought. Yep, you got it. VCC, DATA (serial in), and GND are all you need. Here's the manual with commands for it:
http://digole.com/images/file/Digole_Serial_Display_Adapter-Manual.pdf

It took me a minute to understand the format for the bytes on the commands. For example, to change the color of the text, you send "SC" as ASCII and then the byte.
("SC",224) ;change text color to red
Then display some text and exit text mode.
("TT","Hello!",0) ;change to text mode (TT), print Hello!, exit text mode (0).
 

lbenson

Senior Member
Continuing with the revival of this 5-year-old thread, and off-topic to boot with respect to the Nokia 5110, this is my first pass with the Digole serial LCD mentioned by Hemi345:
Digole LCD.jpg
This displays 5 of the 7 built-in fonts in order of font size (the 6th & 7th didn't display for me, and I didn't pursue the matter). Because the line number placement depends on the font size, I had to fiddle with the line number to get the 5th line in the right place.
Code:
' 14lcd_digole writes text to digole lcd
#picaxe 14M2

symbol pLCD_Power = B.1
symbol pLCD_Data  = B.2

symbol fontSequence = b4 ' smallest to largest
symbol fontNo       = b5
symbol lineNo       = b6

setfreq m8
pause 2000
high pLCD_Power
pause 9000
serout pLCD_Data, T9600_8, ("CL") ' clear screen
pause 1000

main:
  do
    for fontSequence = 1 to 5 ' 6 & 7 don't display
'      lookup fontSequence,(0,0,6,10,18,51,120,123),b5
      lookup fontSequence,(0,6,10,0,18,51,120,123),b5 'by size
'      serout pLCD_Data, T9600_8, ("CL")
      serout pLCD_Data, T9600_8, ("SF",fontNo) ' set font
      b6 = fontSequence + 1
      if fontSequence = 5 then : lineNo = 4 : endif
      serout pLCD_Data, T9600_8, ("TP",0,lineNo) ' pos x,y
      serout pLCD_Data, T9600_8, ("TT",#fontNo," Hello!",0)
      sertxd("Hello!",cr,lf)
      pause 3000
'      serout pLCD_Data, T9600_8, ("TT","Goodbye!",0)
      sertxd("Goodbye!",cr,lf)
      pause 3000
    next fontSequence
  loop
The LCD worked when powered with 2-AAs or 3 if attached directly to the battery +. It also worked with 3-AAs when powered from a picaxe pin (but not with 2-AAs). Don't know if powering it from a pin is safe in the long run.

Very easy and flexible, and not too expensive.
 
Last edited:
Top