 |
|
 |
| Parallax Forums > Public Forums > Propeller Chip > Nokia LCD Progress | Forum Quick Jump
|
|  jkroylance Registered Member
        Date Joined Dec 2006 Total Posts : 12 | Posted 4/11/2007 7:19 PM (GMT -7) |   | [Continued from http://forums.parallax.com/forums/default.aspx?f=25&m=174598]
I've been playing with this LCD and code for it, and I tried myself to merge the SPI routines into it and use them instead of the Spin ones. After driving myself nuts for several hours trying to figure out why the LCD works with the Spin code and not with SPI, I stumbled across something: If you issue the very first command to the LCD using the Spin shiftout code (even if it's not a valid command), then start using the faster SPI code, the LCD works fine, and is much faster. Only problem is I can't stand wasting that amount of space on code that's used just once. Attached is an archive of the version I got to work... This is my first attempt at working with propeller programming, so please excuse the sloppiness of the code. I commented alot out as I was tweaking things trying to figure out why it wouldn't work. Hopefully it still makes sense.
Nokia Test.spin (top object file) -NokiaLCD.spin --SPIEngine.spin
The part I was messing with is in NokiaLCD.spin toward the bottom of the file in InitLCD, there's a SendSpcCommand() call which calls the Spin shiftout routines to send a $00 to the LCD, then everything's SPI after that. My LCD works fine like this, but if you change SendSpcCommand() to SendCommand() (or even just comment out the whole line), the LCD is unresponsive.
Anyone have any ideas??
File Attachment : Nokia LCD - SPI (sorta) works!.zip 6KB (application/x-zip-compressed)This file has been downloaded 157 time(s). | | Back to Top | | |
 |  Jello Registered Member
        Date Joined Apr 2007 Total Posts : 9 | Posted 4/12/2007 8:20 AM (GMT -7) |   | | Hi jkroylance,
Thanks for the info. The whole nokia lcd thing seems to be a dead topic in here. It's not fresh and exciting enough I guess. Oh well. Some topics (and people) are like that.
Anyway. I managed to get my Nokia LCD (Philips controller) code working with the spi engine without having to first use the spin shiftout. I will have to do a diff on my code to see what I changed to get it to do it. I think it might have been a simple wait or a no-operation command after initiaization or something. (it's still not fast enough, needs more tweekage).
I will do a diff and let you know what I did to make it work.
<edit> checked my code and i am still doing the blasted spin shift out first! nuts! sorry.
Cheers,
J Post Edited (Jello) : 4/12/2007 10:24:23 PM GMT | | Back to Top | | |
      |  Jello Registered Member
        Date Joined Apr 2007 Total Posts : 9 | Posted 4/13/2007 4:05 PM (GMT -7) |   | Brilliant! Works for me! Glad to be rid of the extra load. Good on ya :)
thx J | | Back to Top | | |
 |  jkroylance Registered Member
        Date Joined Dec 2006 Total Posts : 12 | Posted 4/13/2007 4:36 PM (GMT -7) |   | | It's kinda messy, I'll try to clean it up some and repost it. Good to hear it works for someone other than me. | | Back to Top | | |
   |  jkroylance Registered Member
        Date Joined Dec 2006 Total Posts : 12 | Posted 4/14/2007 2:10 PM (GMT -7) |   | I'm using a Sparkfun Nokia Knockoff LCD www.sparkfun.com/commerce/product_info.php?products_id=569 with the Sparkfun Nokia LCD carrier board www.sparkfun.com/commerce/product_info.php?products_id=600. I am using the 6-pin header on the board, +Vin to propeller VDD, CS to pin 6, SCLK to pin 7, SDATA to pin 8, RST to pin 9. It looks like some people in the original post on this LCD forums.parallax.com/forums/default.aspx?f=25&m=174598 put resistors inline with their data pins, however I did not, and have not experienced any problems so far (been poking around with this for a month or so).
Note: In the NokiaLCD.spin file I had started adding in stuff to plot letters onto the screen, though I think I only got 4 done (enough to write "HELLO" when I was testing). If you don't need them, you can remove them and probably save some space.
Eventually I'd like to dissect the SPI engine and move only the SHIFTOUT assembly code I use into the NokiaLCD to further reduce its size. | | Back to Top | | |
| Forum Information | Currently it is Thursday, July 29, 2010 5:18 PM (GMT -7) There are a total of 462,440 posts in 62,066 threads. In the last 3 days there were 90 new threads and 803 reply posts. View Active Threads
| | Who's Online | This forum has 20143 registered members. Please welcome our newest member, ME01. 61 Guest(s), 12 Registered Member(s) are currently online. Details John Abshier, Rayman, Kevin Wood, BradC, prof_braino, Harley, Sapieha, Gene Bonin, wiresalot, laser-vector, localroger, Nick McClick |
Forum powered by dotNetBB v2.42EC SP2.02 dotNetBB © 2000-2010 |
|
|