Connecting with I2C

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

Moderators: Henry, Mods

Post Reply
robpar
LCD?
Posts: 2
Joined: Sun Dec 07, 2003 9:16 pm
Location: Vancouver BC

Connecting with I2C

Post by robpar »

I am trying to connect myLK202-25 to a Basic Atom 28. I would prefer
to use I2C. I am having trouble connecting to the LCD I believe the problem
is with the Control Byte as MBasic refers to it.

Control is a variable or constant that specifies the I2C device s control byte. The control byte consist of two parts The first four bits are the device type (EEproms use %1010). The next three bits are the device ID. If the address lines of the serial EEPROM (i.e. : A0, A1, A2) are grounded then the next three bits of the control byte must be zero.(ie: %1010000). Thelast bit is a flag used to determine the addressing format, 1 =16bit addressing, 0 = 8bit addressing.

I do not know what the device type is or where to find it . I have searched through
the manual that came and may have missed it but have looked for awhile.

The command is of this nature:

I2COUT DataPin, ClockPin,{ErrLabel,}Control,{Address,} [{mods} Var,...VarN] Sends data to an I2C device (EEPROM, External A/D Converter)

Any help would be greatly appreciated.

Thank You

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

Post by Miles »

Hello...

Most microcontrollers or development kits have an I2C function that will not require the use of bit bashing. Much of the time I2C devices use a memory address. Our units do not require a memory address therefore all that is needed is the I2C address. Once the I2C address is established, the command syntax of (0xFE) is sent, followed by the action required.

1) LCD I2C Address.
2) Command Syntax (0xFE).
3) Send appropriate commands to perform tasks wanted.
Miles Y.
Head of Technical Support
Product Manager
Matrix Orbital
Ken J
LCD?
Posts: 6
Joined: Wed Aug 13, 2003 6:31 am

Post by Ken J »

I have been using I2C to communicate from an Atom to Matrix Orbital displays for a while now. It is a wonderful and easy way to join these to units, using the Atom internal pullup resistors makes the interconnect very simple as external pullup resistors are not required. But I had some difficulty at first as well. The problem seems to be with the Atom and the
Miles
Matrix Orbital
Matrix Orbital
Posts: 1105
Joined: Mon Mar 04, 2002 4:00 pm

Post by Miles »

Thanks for your example! It was very informative!! :D
Miles Y.
Head of Technical Support
Product Manager
Matrix Orbital
Post Reply