27220 Parallax Inc, 27220 Datasheet - Page 193

BOOK STAMPWORKS

27220

Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet

Specifications of 27220

Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
I2C_RX_Byte_Nak:
I2C_RX_Byte:
I2C_RX:
' *** Stop Sequence ***
I2C_Stop:
Behind the Scenes
The I2C-bus is a two-wire, synchronous bus that uses a Master-Slave relationship
between components. The Master initiates communication with the Slave and is
responsible for generating the clock signal. If requested to do so, the Slave can send
data back to the Master. This means the data pin (SDA) is bi-directional and the
clock pin (SCL) is [usually] controlled exclusively by the Master.
The transfer of data between the Master and Slave works like this:
i2cAck = Nak
GOTO I2C_RX
i2cAck = Ack
SHIFTIN SDA, SCL, MSBPRE, [i2cWork\8]
SHIFTOUT SDA, SCL, LSBFIRST, [i2cAck\1]
RETURN
LOW SDA
INPUT SCL
INPUT SDA
RETURN
Master sending data
Master receiving data
Master initiates transfer
Master addresses Slave
Master sends data to Slave
Master terminates transfer
Master initiates transfer
Master addresses Slave
Master receives data from Slave
Master terminates transfer
' no Ack = high
' Ack = low
' get byte from device
' send ack or nak
' I2C stop bit sequence

Related parts for 27220