New driver for Nokia 6100 LCD
scanlime
Posts: 106
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.
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
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
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!
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
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
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 !
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.
Thank you in advanced!
-Tim