i2c and the ATOM

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

Moderators: Henry, Mods

Post Reply
ctm6761
LCD?
Posts: 2
Joined: Wed Aug 28, 2002 6:00 pm

Post by ctm6761 »

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.

Henry
OMNIPRESENT
OMNIPRESENT
Posts: 3002
Joined: Tue Aug 14, 2001 6:00 pm
Contact:

Post by Henry »

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>

ctm6761
LCD?
Posts: 2
Joined: Wed Aug 28, 2002 6:00 pm

Post by ctm6761 »

I have sorted through the manual and the site and i am still having nothing come up on the screen. I am using the address of Hex 5C (according to the 19Kbps buad rate) and the control bit i am using is 01010000 (corresponding to the 0x05 device id in the manual).

Aniso
-=Beloved by all=-
-=Beloved by all=-
Posts: 286
Joined: Tue Aug 14, 2001 6:00 pm
Location: ...I could tell you my velocity...

Post by Aniso »

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.

Ice_Cold
LCD?
Posts: 3
Joined: Sat Aug 31, 2002 6:00 pm
Location: Australia
Contact:

Post by Ice_Cold »

Aniso is correct in saying that 0x5c is 01011100

Post Reply