Connecting with I2C
Posted: Mon Dec 08, 2003 4:18 pm
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
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