LK204-25-GW

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
.Macabra
LCD?
Posts: 3
Joined: Fri Sep 19, 2008 8:52 pm

LK204-25-GW

Post by .Macabra »

Hi there!

Is there an example on how to send a string or even a character to the LCD using I2C? I've got my hardware set up with the pull-up resistors as specified, but I'm clueless about the software issue involved..I'm not a programmer and reading the I2c stuff confuses the heck out of me :cry:

So far I got this:

#define W_addr 0x50; //lsb is to write to LCD
void writeI2C1(int W_addr,int data)
{
startI2C1(); //starts I2C
putI2C1(W_addr); //writes address 0x50;
putI2C1(data); // if data is 65 (A in ascii)...will it print A?
stopI2C1();
}

Is this right to send one byte or one character?
also, I don't use the keypad, so do I need to worry about reading?
Thanks :)
Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Hello,

Thank you for posting on the forum.

Looks like you are on the right direction. What you might want to do next is to hook up a scope and see if you have the right waveforms showing on the SCL and SDA lines.

Here's a couple of examples from the forum:
http://lcdforums.com/forums/viewtopic.p ... 1e1e#17470
http://lcdforums.com/forums/viewtopic.p ... 2c&start=0

Also, please visit this app note section on I2C.

Hope these help.

Thanks and Best Regards,
Raquel Malinis
Design and Development
Matrix Orbital
Post Reply