Forum Update - Announcement about May 10th, 2018 update and your password.

New driver for Nokia 6100 LCD

scanlimescanlime Posts: 106
edited February 2011 in Propeller 1 Vote Up0Vote Down
I wanted to use this Nokia 6100 clone display from Spark Fun in some projects of mine:

But I couldn't find any drivers for the Propeller that were fast, open-source, and actually worked :(

So, I wrote one :) It uses my 10 Mbit SPI engine, so it's pretty fast, and I downsample the ROM font (with filtering) to 8x16 pixels, so it doesn't require the memory overhead of a separate font table. It uses 4096-color mode, and I've included a little Python script for converting PNG files to the right format to use with it. Resource usage in this version is 403 longs of hub memory, and one cog.

A snapshot (version 0.5) is attached to this message. Additionaly, the latest code should always be in my Subversion repository:

And finally, a YouTube video of the demo app:

Enjoy, and let me know if it works (or doesn't) for you. I've tried to design it to work with either flavor of display controller (Philips or Epson) but so far I've only been able to test the Epson code. So if you have a Philips LCD, it might need some tweaking. If you do get it working, please send me patches.


  • 10 Comments sorted by Date Added Votes
  • jazzedjazzed Posts: 11,803
    edited October 2010 Vote Up0Vote Down
    The 2+ supported chips on the LCD can be frustrating.
    Your bitmap drawing demo is cool. My driver only does lines and text.

    I think I have the Phillips variety and can test it later.


    ADDED: A very fast SPI driver is just what I need for another display :)
  • GameHackerGameHacker Posts: 15
    edited October 2010 Vote Up0Vote Down
    AWESOME!!! I have three of these displays, and I couldn't get them to work using any of the drivers available. I was beginning to think there was a 'third' controller, since I seemed to be the only one who could not get it to work.

    I am glad you did!

    One thing to note in the demo, if you add this to the beginning of the code:

    _clkmode = xtal1+pll16x
    _clkfreq = 80_000_000

    It will run even faster!

    Now, I just need figure out how to use a double buffer, and read frames from an SD card. Shouldn't be a problem...

    Thanks again!
  • 4Alex4Alex Posts: 119
    edited October 2010 Vote Up0Vote Down
    Hi ScanLime,

    First, I've tried your code, v 0.6; very, very nice work. Kudos!

    2 questions:

    [a] I wanted to use the lcd in the reversed mode (the connector would be top right), so I replaced the line

    word S1D_DATCTL, $100, $100, $102


    word S1D_DATCTL, $103, $100, $102

    in DAT section under initEpson of Nokia6100.spin. That's as per the Epson datasheet. It does reverse the screen but some characters are garbled and the screen content is shifted. I tried to locate the problem but can't find it. Do you have any idea of what's necessary to reverse the look of the screen?

    This one baffles me! I changed the way Nokia6100_Demo.spin displays on the screen (in your current mode - not reversed). Basically, I've written the following lines
    PUB displayOnLcd
    lcd.text(0, 0, "Line 1")
    lcd.text(0, 15, @test_line2)

    and in DAT
    test_line1 byte "Line 1",0
    test_line2 byte "Line 2",0
    test_line3 byte "Line 3",0

    The first line prints correctly; the second, from DAT, displays only garbled characters, completely gibberish. I can't get it to work. Any idea why this doesn't work?

    Thanks for your help.


  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,462
    edited October 2010 Vote Up0Vote Down

    Great! work. I don't have a LCD to try the code but I still enjoyed reading through your code. I like the way you commented the code as well.

  • JLSJLS Posts: 76
    edited October 2010 Vote Up0Vote Down
    Hi all

    This code is very usefull for me - thanks

    Little demo for this and other code from this forum.

    Produce sound from hopalong fractal and view on LCD :-)

    Sorry my very bad english !
  • JLSJLS Posts: 76
    edited October 2010 Vote Up0Vote Down
    and Gingerbread example
  • JLSJLS Posts: 76
    edited October 2010 Vote Up0Vote Down
    and Mandelbrot
  • scanlimescanlime Posts: 106
    edited October 2010 Vote Up0Vote Down
    Thanks for all the kind comments! And thank you for the additional examples, JLS!

    4Alex: The code as-is doesn't handle rotation, though I may add options for this soon, as I may be mounting the LCD rotated 90 degrees in the next project I use this with. The problem you're seeing is probably due to the differences in the scan direction and the first pixel that you see when the LCD is in different mirroring/flip modes.
  • tim1986tim1986 Posts: 41
    edited February 2011 Vote Up0Vote Down
    This works great! Thank you scanlime for all the work you put into this! Except, the sprites are slanted 45 degrees and the counting number is all garbled. Please let me know how to fix this because I'd really love to use this in projects.

    Thank you in advanced!
  • tim1986tim1986 Posts: 41
    edited February 2011 Vote Up0Vote Down
    I downloaded the updated files from your svn scanlime, but no luck. It still has both the sprite and number problems.
Sign In or Register to comment.