Parallax Forums
  HomeLog InRegisterCommunity CalendarSearch the ForumHelp
   
Parallax Forums > Public Forums > Propeller Chip > Nokia LCD Progress  Forum Quick Jump
 
New Topic Post Reply Printable Version
[ << Previous Thread | Next Thread >> ] | Show Newest Post First ]

jkroylance
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2006
Total Posts : 12
 
   Posted 4/11/2007 7:19 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
[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

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2007
Total Posts : 9
 
   Posted 4/12/2007 8:20 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
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
 

simonl
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2006
Total Posts : 787
 
   Posted 4/12/2007 8:35 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Hey folks, don't get disheartened; there are still people watching (like me) who've not YET got the Nokia LCD - but your code will still be very useful when we do ;-)

Thanks for posting :)


Cheers,
Simon

BTW: I type as I'm thinking, so please don't take any offense at my writing style :-)

-------------------------------
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)

Back to Top
 

QuattroRS4
Soldier Of Fortune !



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2006
Total Posts : 896
 
   Posted 4/12/2007 8:57 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Agreed Simonl ... Also Elektor has an application this month on that very topic - slide show from an SD card - to an LCD...

Regards,
Quattro


'Necessity is the mother of invention'

Back to Top
 

QuattroRS4
Soldier Of Fortune !



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2006
Total Posts : 896
 
   Posted 4/12/2007 9:10 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
In the interests of progress ... see attached ...So who will be the first to do this on a Prop. ??? The preverbial Gauntlet has been laid down ...
 
This example shows a siemens C60 LCD ... I seem to remember details of a Nokia somewhere - if it is of any help I can certainly search for it..


Regards,
Quattro


'Necessity is the mother of invention'

Post Edited (QuattroRS4) : 4/12/2007 4:16:14 PM GMT



File Attachment :
LCD_Slideshow.pdf   839KB (application/pdf)
This file has been downloaded 181 time(s).
Back to Top
 

inservi
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jan 2007
Total Posts : 114
 
   Posted 4/12/2007 11:57 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Hello, I also just received 3 lcd Nokia for test. I will test they when i finished the actual job.

regards,
dro.


in medio virtus

Back to Top
 

jkroylance
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2006
Total Posts : 12
 
   Posted 4/13/2007 11:41 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Ok, tweaking this code over lunch I think I fixed the problem. I added a few lines to set the data line low and toggle the clock before sending the first command and that seems to have fixed the problem! No more slow shiftout routine! If someone who has one of these would like to try it & make sure it works, let me know! Here's the file again, same name though SPI fully works and the old spin Shiftout routine has been commented out.

File Attachment :
Nokia LCD - SPI (sorta) works!.zip   6KB (application/x-zip-compressed)
This file has been downloaded 261 time(s).
Back to Top
 

Jello
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2007
Total Posts : 9
 
   Posted 4/13/2007 4:05 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
Brilliant! Works for me!
Glad to be rid of the extra load.
Good on ya :)

thx
J
Back to Top
 

jkroylance
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2006
Total Posts : 12
 
   Posted 4/13/2007 4:36 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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
 

ALIBE
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2006
Total Posts : 299
 
   Posted 4/14/2007 4:32 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
it works for me w/ my Nokia LCD as well. It renders much faster than w/ my earlier trials and code. Thanks


"any small object, accidentally dropped, goes and hides behind a larger object."
 
ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot
 

Back to Top
 

Oldbitcollector
Propeller Powered



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2007
Total Posts : 4328
 
   Posted 4/14/2007 9:51 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Direction for the hardware details and connection for this project?

Thanks
Oldbitcollector


"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -Albert Einstein

Back to Top
 

jkroylance
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2006
Total Posts : 12
 
   Posted 4/14/2007 2:10 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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
 
[ << Previous Thread | Next Thread >> ]
New Topic Post Reply Printable Version
 
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