I2C - device and register addressing

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

Moderators: Henry, Mods

Post Reply
rdolf
LCD?
Posts: 3
Joined: Thu Jan 06, 2005 6:37 pm

I2C - device and register addressing

Post by rdolf »

I'm using an Lk202-25 on an embedded platform which allows me only indirect access to the I2C bus via libary functions. The write api is something like:
int i2cWrite(byte deviceAddr, byte registerAddr, byte data);

When writing text to the lk202, the lk seems to interpret the register address as display text with the result that every time I call the write function, I actually get 2 bytes of text displayed.

I have found various descriptions of the I2C protocol that conform to the API provided on my platform (e.g. http://www.robot-electronics.co.uk/htm/ ... 2c_bus.htm).

Does anyone know how I can get the LK202 to display text with this I2C driver which wants to send an internal register address as well as the device address?

TIA,
Richard
Miles
Matrix Orbital
Matrix Orbital
Posts: 1105
Joined: Mon Mar 04, 2002 4:00 pm

Post by Miles »

Hello rdolf,

Thanks for the question. Since your I2C platform requires an "internal register address", would it be possible for you to send a null character that the display won't interpret as an ASCII string? :-?
Miles Y.
Head of Technical Support
Product Manager
Matrix Orbital
rdolf
LCD?
Posts: 3
Joined: Thu Jan 06, 2005 6:37 pm

Post by rdolf »

If there was a non-printing character that didn't print, I think your solution would work. Unfortunately, the LK202 behaves as described in the documentation; non-printing characters print as a space.

Richard
Miles
Matrix Orbital
Matrix Orbital
Posts: 1105
Joined: Mon Mar 04, 2002 4:00 pm

Post by Miles »

Would you be able to send the write command then issue a "cursor left" command...? :-?
Miles Y.
Head of Technical Support
Product Manager
Matrix Orbital
rdolf
LCD?
Posts: 3
Joined: Thu Jan 06, 2005 6:37 pm

Post by rdolf »

Thanks for your help, I have a solution working now.

Richard
Miles
Matrix Orbital
Matrix Orbital
Posts: 1105
Joined: Mon Mar 04, 2002 4:00 pm

Post by Miles »

Good to hear! If you have any further questions or concerns, let us know!! :D
Miles Y.
Head of Technical Support
Product Manager
Matrix Orbital
Post Reply