PDA

View Full Version : Need Help on info for spi lcd driver board purchase



wdmagic
- 29th April 2013, 09:50
I would like to convert a few of my LCD's here to a serial interface, I am looking on ebay at some different ones available at a very low cost but am unsure of what I need to be looking for. For example there is one that is listed as "IIC/I2C/TWI/SPI serial interface board module 5volt" however they dont give any other details or datasheets, looking at the picture there are only 4 pins, +5, gnd, SDA, SCL. which looking at my SPI help guide doesnt even list SDA and SCL so I am assuming thats the I2C names.


Can this board be used with SPI as they claim?
Which is better/easier to use I2C or SPI?
what do I need to search for (hardware interface board) if I wanted to use a simple SEROUT2 command to drive the LCD?

If anyone has links to sites that I can get a board for under 5USD other than ebay let me know, prefer free shipping.
Not promoting this ebay page but want to show what I am looking at so someone can tell me if this is what I need.
Ebay SPI Link (http://www.ebay.com/itm/IIC-I2C-TWI-SPI-serial-interface-board-module-5v-f-arduino-1602-lcd-display-led-/230970713373?pt=LH_DefaultDomain_0&hash=item35c6ed651d#ht_4121wt_1091)
I am hoping to find one without the headers preattached.

Demon
- 29th April 2013, 12:14
Also 14 pins, possibly standard interface.

http://www.mjkdz.com/forum.php?mod=viewthread&tid=3

Chinese?

Haven't found a datasheet yet.

Robert

Edit: reading the auction, it seems like what you want.

Demon
- 29th April 2013, 12:29
Looking at 18F26K22 datasheet as sample, I2C shares SPI pins. Except SPI has data pin (SDA) separated as input (SDI) and output (SDO) pins.

Demon
- 29th April 2013, 12:41
Starting point on C forum:
http://arduino.cc/forum/index.php?topic=142255.0

Demon
- 29th April 2013, 12:52
Bit more on pinout and changing address, similar circuit:

http://item.mobileweb.ebay.com/viewitem?itemId=170922188594&cmd=VIDESC

Edit: Your blue model doesn't seem to have address jumpers.

wdmagic
- 29th April 2013, 18:56
OK i read that forum on the ardrino.cc site, some of it I understood but some I didnt, it talked about constructors and libraries, not a clue here about that, and not sure if i would need to if using as SPI?
Yes I noticed the one I was looking at didnt show address options, and that may be something I will need, not sure.
I need to keep it real simple, I would rather not have to have tons of code just to configure a lcd interface. I have a serial lcd here that I just use the SEROUT2 command and it works great, wish I could set up others like it, but cant find out how so SPI looks to be next option.

Demon
- 29th April 2013, 22:52
Why not just buy one off ebay and test it?

$3.58 free shipping.

I'm curious why you want to use a serial to parallel converter. Is it to use less pins? Does SEROUT work faster than LCDOUT?

I would think it's faster, but I've been wrong before.

Robert

Demon
- 29th April 2013, 22:56
About SPI, I've never used it but I2C uses 2 pins and SPI uses 3, so right there things "should not" work as you wish.

But does SPI need the DataIn line to display to a LCD? I wouldn't know.

Robert

mark_s
- 29th April 2013, 23:32
Its hard to beat the price of that ebay board, but if you want to roll your own here is a PBP version.
Link to code at the bottom of page.

http://www.compsys1.com/workbench/CLCD_Board/clcd_board.html

wdmagic
- 30th April 2013, 00:35
OK demon, im not sure why they say it can do SPI if its only got 2 data lines? As for buying one, Ive been off work along time with no income so even though its just a few bucks I have to make sure its going to do what I need it to do. I have 2 LCD's here with serial boards on them but cannot find manuals on the darn things as there so old, havent been able to get them to work. I also have one that is more recent but its in parts and missing a couple. have not been able to regenerate it back to life.
I have several ICs that have SPI interfaces on them even though Ive never used them (volume controld, temp guages, port expanders and such) and thats why I was perfering to use SPI, and I knew you could use more than one SPI device on a pic at the same time, but have not been able to tell if you can do that with I2C. Also I know you cant mix I2C and SPI on the same PIC.

As far as the serout part, its a single pin output and I dont have to do alot of configuration bits and such, just one line of code to make it work. How much code is needed for SPI or I2C to turn those options on and then use them? not sure.

Mark, what a great link, its got everyting to build one. I may make one just to see how well it works, its even possible to upgrade it with more functions :) Thanks for that link.

If I could read the HEX from one of these that I have now and had the board working I could just duplicate them or upgrade them to a more current line of code. one of these was made back in 1996 and is covered in dirt and debris. no wonder it doesnt work.

but I really would like to find out how to use those cheap ones on ebay, if they cant do SPI I would like to find true SPI ones too so I have a choice.

mark_s
- 30th April 2013, 15:48
With I2C you can normally put different devices on the same clock and data lines. Each i2c device has a ID number or "address". So each read or write you specify which address you want to access. With PBP you can use the software I2C routine, which can be used on any avaliable pins. To use hardware I2C you need to use the specific pins on the pic and manually set all the registers.

For software SPI you use the "shiftout"/"shiftin" command. It takes 3 pins, chip select(CS), clock and data. You can share clock and data pins with more than one device, but each device requires a seperate CS pin. For hardware spi it's the same as i2c. You have to use specific I/O pins and set the registers.

Some where in the arduino link Deemon posted. They reference the chip as a PCF8574 port expander. The data sheet specifies it as an I2C device. So it probably won't work using spi.