Shop OBEX P1 Docs P2 Docs Learn Events
New Nokia 5110 display driver in the obex — Parallax Forums

New Nokia 5110 display driver in the obex

JasonDorieJasonDorie Posts: 1,930
edited 2014-11-10 18:52 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.

http://obex.parallax.com/objects/700/

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: http://www.sparkfun.com/products/10168

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

Nokia5110.jpg

Comments

  • mickalmickal Posts: 75
    edited 2011-01-14 03:02
    I have the display. Thanks!
  • Clock LoopClock Loop Posts: 2,069
    edited 2011-01-17 05:38
    I made a spin version of the PCD8544 display also.

    http://forums.parallax.com/showthread.php?124487-EtPhoneHome-v1.0-A-Nokia-6150%28like%29-pcb-redone-with-two-propellers.-PCD8544-l

    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.
  • mickalmickal Posts: 75
    edited 2011-02-15 16:17
    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.
  • Cluso99Cluso99 Posts: 18,066
    edited 2013-06-30 04:11
    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
    http://www.ebay.com.au/itm/261034182941?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649


    Nokia5110A.spin

    Notes:
    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.
  • JonnyMacJonnyMac Posts: 8,912
    edited 2013-06-30 15:21
    I wrote a driver for my N&V column -- I've run it on the Sparkfun and Adafruit (I prefer) displays.
  • WBA ConsultingWBA Consulting Posts: 2,933
    edited 2014-11-06 17:25
    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: 8,912
    edited 2014-11-07 12:33
    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.
  • WBA ConsultingWBA Consulting Posts: 2,933
    edited 2014-11-07 18:12
    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
    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
    ... 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.

    lcd5110.tgz
Sign In or Register to comment.