I am working with BASIC Micro's ATOM and the LCD 2401. I want to communicate using I2C but am having trouble. The command structure with the ATOM for this is:
I2COUT DataPin,ClockPin,{ErrLabel,}Control,{Address,}[{Mods}Var,...VarN]
DataPin: SDA pin (0 in my case)
ClockPin: SCL pin (1 in my case)
ErrLabel: lave that the program will jump to if the I2CIN command fails or a device is not connected
Control: a variable or constant that specifies the I2C device's control byte. The control byte consists of 2 parts, the first 4 bits are the device type and the next 3 bits are the device ID. The last bit is for address formating (1 = 16bit and 0 = 8bit)
Address: optional variable or constant that specifies the starting address
Mods: are command modifiers (N/A here)
Var...VarN: Information to be sent.
Any help would be appreciated.
i2c and the ATOM
The LCD2041 uses a standard Phillips 7bit address as defined by Phillips. How ever, we at Matrix Orbital specify I2C address in 8bits. The 8th bit, least significant bit (LSB or Low Order Bit) of the 8bit address is read/write bit. If we take a standard Phillips 7bit address of 45hex this would be in binary 1000101. This is 7bits. If one adds the read write bit to this 7bit address and you assume that you are writing one gets 10001010. Matrix Orbital would describe the Philips I2C address of 45hex as 8Ahex. The read address would be 8Bhex.
Take a look here for more info...
http://www.ping.be/~ping0751/i2cfaq/i2cindex.htm
_________________
Henry J.
Head of Technical Support
Matrix Orbital
<font size=-1>[ This Message was edited by: Henry on 2002-08-29 10:28 ]</font>
Take a look here for more info...
http://www.ping.be/~ping0751/i2cfaq/i2cindex.htm
_________________
Henry J.
Head of Technical Support
Matrix Orbital
<font size=-1>[ This Message was edited by: Henry on 2002-08-29 10:28 ]</font>
-
- -=Beloved by all=-
- Posts: 286
- Joined: Tue Aug 14, 2001 6:00 pm
- Location: ...I could tell you my velocity...
The techs don't know an Atom from Adam, and neither do I. However, I am fairly sure that 0x5c is 01011100 and not 01010000. Seriously, please read the specification provided by the only people qualified to write one - Philips. I am sure that Henry can provide a link if you find that google.com cannot locate I2C infomation on the Philips website.