PDA

View Full Version : Master SPI interface to LCD/OLED??



jellis00
- 18th September 2009, 21:38
I am looking for PICBasic Pro approaches to use a Master SPI interface to an LCD or the new technology OLED displays that are operating as a SPI SLave. Can any one give me any URL links or ideas? I have searched everywhere and even thought there are many SPI interfaced LCDs and OLEDs out there, the only programming tips seem to all be in assembly. I want to program the interface in PICBASIC Pro using the SSP module in a PIC 16F690.

Darrel Taylor
- 18th September 2009, 22:25
There's this from Melanie ...

http://www.picbasic.co.uk/forum/showpost.php?p=8742&postcount=6
<br>

jellis00
- 19th September 2009, 01:01
There's this from Melanie ...

http://www.picbasic.co.uk/forum/showpost.php?p=8742&postcount=6
<br>
Thanks, Darrel. This is really a way to interface to the LCD with only two wires using the SHIFT statement. I have the pins to do a standard SPI or I2C interface without this extra chip required in Melanie's approach. What I am really looking for are SPI or I2C code samples for interfacing to an LCD or better yet to one of the new technology OLEDs.
Any ideas or places I can go?

Darrel Taylor
- 19th September 2009, 01:33
Unless you have an LCD that has a built-in SPI or I2C interface, then you need that chip, an I/O expansion port or something to interface to a parallel LCD.

If you do have a display with built-in synchronous interface(s), then we'd need to know which one it is. Because I don't think there's any kind of standard for that.

At any rate, with PBP 2.60's new ARRAYWRITE command.
Sending data to SPI, whether it's SHIFTOUT or the MSSP, just got a whole lot easier.
And I doubt any example you find on the net will include the new commands.

Best to write it from scratch.
<br>

jellis00
- 19th September 2009, 02:14
Unless you have an LCD that has a built-in SPI or I2C interface, then you need that chip, an I/O expansion port or something to interface to a parallel LCD.

At any rate, with PBP 2.60's new ARRAYWRITE command.
Sending data to SPI, whether it's SHIFTOUT or the MSSP, just got a whole lot easier.
And I doubt any example you find on the net will include the new commands.

Best to write it from scratch.
<br>
Thanks for reply, Darrel. I am using a 16F690 which has dedicated pins that can be configured to support the SSP module that includes the interface to either SPI or I2C. So I don't need the chip or I/O expansion.
The OLED display I am looking at ( see http://taiwan01.rs-online.com/mobile/search/searchBrowseAction.html?method=getProduct&R=0554223 )has either SPI or I2C interfaces built-in. I am choosing SPI because I only have a single MASTER to single SLAVE interface and the SPI provides a lot faster interface than I2C.
I presume that the PBP 2.60 (which I just upgraded to) command ARRAYWRITE will permit me to use this SPI interface on an OLED as well as to an LCD as you implied. If you do become aware of any examples that use the new ARRAYWRITE command, even if only with LCD, I would really appreciate hearing about it. In fact, can you please explain to me why this ARRAYWRITE command makes it so much easier to send data as opposed to using SHIFTOUT or MSSP??

Darrel Taylor
- 19th September 2009, 02:51
The OLED display I am looking at ( see http://taiwan01.rs-online.com/mobile...duct&R=0554223 )has either SPI or I2C interfaces built-in. ...
In fact, can you please explain to me why this ARRAYWRITE command makes it so much easier to send data as opposed to using SHIFTOUT or MSSP??
Well actually, now that I see you are talking about a 64x48 bitmapped display, nothing I said has any relevance.

Whoops :eek:
<br>

jellis00
- 19th September 2009, 18:46
[QUOTE=Darrel Taylor;78598]Well actually, now that I see you are talking about a 64x48 bitmapped display, nothing I said has any relevance.

Whoops :eek:
<br>[/QUOTE
Thanks Darrel. Even though it is a bit-mapped display as you point out, can you give me any referrals or suggestions as to how I should program its SPI interface to generate displayed messages?
And I would still like to undertand the advantages of using the ne ARRRAYWRITE command to interface to LCD displays since I am also using them in some of my applications. Woulld therefore appreciate any referrals or suggestions on that topic as well.

Gusse
- 19th September 2009, 23:44
Here is quite much stuff for Nokia LCD (http://www.picbasic.co.uk/forum/showthread.php?t=327) (SPI - shiftout). I hope it will help you.
Do you have datasheet for that OLED display? You'll need that before you can start coding.

BR,
-Gusse-