Shop OBEX P1 Docs P2 Docs Learn Events
New driver for Nokia 6100 LCD — Parallax Forums

New driver for Nokia 6100 LCD

scanlimescanlime Posts: 106
edited 2011-02-06 00:44 in Propeller 1
I wanted to use this Nokia 6100 clone display from Spark Fun in some projects of mine:
http://www.sparkfun.com/commerce/product_info.php?products_id=8600

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:
http://svn.navi.cx/misc/trunk/propeller/nokia6100/

And finally, a YouTube video of the demo app:
http://www.youtube.com/watch?v=wWZEEpyoY4k

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.

Comments

  • jazzedjazzed Posts: 11,803
    edited 2010-10-03 16:25
    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.

    Cheers.

    ADDED: A very fast SPI driver is just what I need for another display :)
  • GameHackerGameHacker Posts: 15
    edited 2010-10-04 11:49
    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 2010-10-29 14:55
    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

    by

    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.clear
    lcd.text(0, 0, "Line 1")
    lcd.text(0, 15, @test_line2)

    and in DAT
    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.

    Cheers,

    Alex
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2010-10-30 06:50
    @scanlime

    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.

    Bob
  • JLSJLS Posts: 76
    edited 2010-10-30 11:02
    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 2010-10-31 05:10
    and Gingerbread example
  • JLSJLS Posts: 76
    edited 2010-10-31 05:12
  • scanlimescanlime Posts: 106
    edited 2010-10-31 22:03
    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 2011-02-01 01:41
    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!
    -Tim
  • tim1986tim1986 Posts: 41
    edited 2011-02-06 00:44
    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.