Isd5100 – series – Rainbow Electronics ISD5100 User Manual
Page 45

ISD5100 – SERIES
Publication Release Date: October, 2003
- 45 -
Revision 0.2
7.5.4.3. Read Digital Data
Read
=====
I2CStart
SendByte(0x80) - Write, Slave address zero
WaitACK
WaitSCLHigh
SendByte(0xc0) - Enter Digital Mode
WaitACK
WaitSCLHigh
I2CStop
I2CStart
SendByte(0x80) - Write, Slave address zero
WaitACK
WaitSCLHigh
SendByte(0xe1) - Read Digital Data Command
WaitACK
WaitSCLHigh
SendByte(row/256) - high address byte
WaitACK
WaitSCLHigh()
SendByte(row%256) - low address byte
WaitACK
WaitSCLHigh
I2CStart - Send repeat start command
SendByte(0x81) - Read, Slave address zero
repeat until all data is read
{
data = ReadByte() - send clocks to read data byte
SendACK - send NACK on the last byte
WaitSCLHigh - The only flow control available