Page 1 of 1

LK204-25-GW

Posted: Tue Nov 18, 2008 10:37 pm
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 :)

Posted: Fri Nov 21, 2008 3:12 pm
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,