Interfacing I2c LCD with PIC

Thread Starter

jj_alukkas

Joined Jan 8, 2009
753
I recently salvaged out a 98 x 64 - 5 line mono LCD from a Motorola T190 mobile phone. Since its a graphical display, Im curious to work on it but it uses an I2C to get its data. Could somebody please help me in Hi Tech C on how to use this with a PIC? A simple sample program or a library or a circuit diagram would be helpful! This is the pinout diagram I found out after a lot of googling. Thanks a lot!

 

Attachments

Thread Starter

jj_alukkas

Joined Jan 8, 2009
753
Wow.. That lmgtfy.com thingy was so awesome... I tried googling before posting.. but I always added 'PIC' along with the Hi tech c and it gave me nothing usefull. The main point I made this post was that everywhere it asks for a I2c write address like at 0x78h, how do I find that one for this lcd when I dont have the datasheet?? Thank You.
 

ErnieM

Joined Apr 24, 2011
8,377
Oh, sorry. I thought you had that part. Is there any part numbers on the display? Slogging ramdom info at it will probably be frustrating and useless, and nothing is coming up on it so you may be the first one trying to hack one.

(LMGTFY is lots of fun :D)
 

Thread Starter

jj_alukkas

Joined Jan 8, 2009
753
I found one hacked project video with the same display on youtube but that was with ATmega8 and the person had not linked his code nor any other details other than the uC and the display from Motorola T190. Tried contacting the person too, but no reply. I tried googling all what I could find on the display, but returned nothing. it reads GPM131D0 and B-KB331726. Now the only hope remaining is that most motorola mono low res displays use address ranging between 0x72h to 0x78h, so give it a trial and error. :D

I found a sample code to drive an LCD through I2c with a pic 16 HERE Could you please tell me if this is complete? Its looks so short, Im a complete beginner to this, so confused. :confused: Another one here I. I just need to get this lcd started, rest I will try somehow :)

Both the codes show no sign of which ports to connect to RES, SCL and SDA of lcd???
 
Last edited:

ErnieM

Joined Apr 24, 2011
8,377
Oh sure it's possible, maybe even easier then using the hardware module. I use the hardware module but it is never simple, especially when you're making a slave device. With a software I2C you can put the I/O pins most anywhere you want.

I'll peek around a bit for some sample code. You're looking for "bit bang" or "bitbang" code samples.

Just found some C code (don't know what compiler) here. It has a nice tutorial too.
 
Last edited:

Thread Starter

jj_alukkas

Joined Jan 8, 2009
753
Thank You, I will try compiling some programs and get it to 'talk' :p I donno how much resemblance there is between just I2c communication and using it for an lCD data. BTW, could you tell me what this NRSTOUT pin is in the first diagram I posted? It goes to /RES marked on display terminal. Can I leave it out or should it be grounded?
 

ErnieM

Joined Apr 24, 2011
8,377
/RES looks like an active low reset pin. Most screen displays I've seen want to get a reset signal after the power is up and stable.

Don't just ground it or leave it out. Keep NRSTOUT high for the most part, but do an init sequence on start up something like:

Rich (BB code):
  NRSTOUT = 1;
  DelayMs(100);
  NRSTOUT = 0;
  DelayMs(100);
  NRSTOUT = 1;
I'm just guessing how long the reset needs be but that should cover it, and you can try cutting it back once you see your screen working.
 
Top