New Nokia 5110 display driver in the obex

JasonDorieJasonDorie Posts: 1,930
edited 2014-11-10 - 18:52:51 in Propeller 1
For anyone interested, there's a very cheap backlit graphic LCD display available from Sparkfun. I'm planning on using one in a project of mine, so I wrote a simple object to initialize it and display text.

The documentation from them is kind of sparse, so this is a mash-up of a bunch of different C & C# sources I found online, converted to Spin. It's fast enough for my needs, and doesn't take a dedicated cog. Displaying a single character takes ~188,000 clock cycles.

The display itself can be found here:

The image below is the output of the "sample usage" code.

1024 x 765 - 86K


  • mickalmickal Posts: 75
    edited 2011-01-14 - 03:02:34
    I have the display. Thanks!
    I am a Great Wind that shall sweep all before me like a .... a Great wind
  • Clock LoopClock Loop Posts: 1,599
    edited 2011-01-17 - 05:38:55
    I made a spin version of the PCD8544 display also.

    The spin code inside my copy has complete documentation of what different commands the pcd8544 chip accepts

    Feel free to hack up my info to get specific data out and copy it into yours for documentations, etc.

    I never put it into the obex due to laziness on cleaning up the non-display related code.
    1.Silicon gel filled square. <-2.Sonics(ultra even). 3.Lazers. 4.?
    54 propeller chips connected, One to rule them all.
    Seriously contemplating removing ALL my content from the net completely, FREEDOM OF SPEECH IS DEAD.
  • mickalmickal Posts: 75
    edited 2011-02-15 - 16:17:02
    I have connected this module from sparkfun to 3.3V is this correct ? There is no sign of life from the LCD, I will check connections

    EDIT : Its ok. was a connection problem.
    I am a Great Wind that shall sweep all before me like a .... a Great wind
  • Cluso99Cluso99 Posts: 15,085
    edited 2013-06-30 - 04:11:53
    For some reason (which I didn't bother to find) Jason's code from the Obex did not work with my display. Perhaps originally I just had a bad connection???

    Anyway, here is my code which works with my Nokia 5110 LCD module purchased on eBay for US$3.28


    I am now driving the power (3V3 and Gnd) from propeller pins (~0.2mA).
    The LED backlight can also be supplied from a prop pin (~6.7mA) although I did not connect this pin.
    My pin connections are not straight forward - change them to what you require.
    I have included a writeup of the LCD commands in the spin code.
    My Prop boards: P8XBlade2, RamBlade, CpuBlade, TriBlade
    Prop OS (also see Sphinx, PropDos, PropCmd, Spinix)
    Prop Tools (Index) , Emulators (Index) , ZiCog (Z80)
  • JonnyMacJonnyMac Posts: 6,213
    edited 2013-06-30 - 15:21:13
    I wrote a driver for my N&V column -- I've run it on the Sparkfun and Adafruit (I prefer) displays.
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • WBA ConsultingWBA Consulting Posts: 2,858
    edited 2014-11-06 - 17:25:54
    For some reason, I was pretty certain that there was a graphics driver for the Nokia 5110 LCD. However, every driver I am finding is only for text. Anyone know of a driver for the Nokia 5110 LCD that will allow you to draw lines and circles? I am after a cheap display for something like this project. I did look at the sample Arduino code on Sparkfun's page for the Nokia LCD and it would seem to be very simple to send the bits to display graphics, but since I don't speak C/Arduino, I am not sure how to "SPINify" the code.
  • JonnyMacJonnyMac Posts: 6,213
    edited 2014-11-07 - 12:33:51
    I've been meaning to add those features to my PASM driver but just haven't had time. My intent is to look at the graphics object Chip wrote and use as much of that as possible.
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • WBA ConsultingWBA Consulting Posts: 2,858
    edited 2014-11-07 - 18:12:13
    JonnyMac, thanks for the update on your driver. I was looking at the code a bit more and the structure of the data makes me believe that a lot of work would be required to draw a line since it would have to go across multiple segments of data.
  • JasonDorieJasonDorie Posts: 1,930
    edited 2014-11-10 - 13:47:15
    Text drivers are easy because they don't require storage on the Prop. If you were doing a proper graphics driver, it'd need to maintain a copy of the pixels to be displayed, update those pixels in Prop memory first, then send the changes to the device. It's not particularly hard, but it is a decent amount more work than a simple text driver.
  • AJ MilneAJ Milne Posts: 12
    edited 2014-11-10 - 18:52:51
    ... dunno if someone else has already stuck one of these in here; looked around a bit and didn't see it, figured I might as well put it here...

    So if anyone's looking for C source for driving the 5110 from the Propeller, I just modified SparkFun's code a bit to make it a little more Propeller-friendly. It uses the SimpleIDE's simpletools library. Attached.

Sign In or Register to comment.