Inter-IC Bus
IIC Protocol
68HC(9)12DG128 Rev 1.0
MOTOROLA
Inter-IC Bus
255
START Signal
When the bus is free, i.e. no master device is engaging the bus (both
SCL and SDA lines are at logical high), a master may initiate
communication by sending a START signal. As shown in
Figure 39
, a
START signal is defined as a high-to-low transition of SDA while SCL is
high. This signal denotes the beginning of a new data transfer (each data
transfer may contain several bytes of data) and wakes up all slaves.
Slave Address
Transmission
The first byte of data transfer immediately after the START signal is the
slave address transmitted by the master. This is a seven-bit calling
address followed by a R/W bit. The R/W bit tells the slave the desired
direction of data transfer.
1 = Read transfer, the slave transmits data to the master.
0 = Write transfer, the master transmits data to the slave.
Only the slave with a calling address that matches the one transmitted
by the master will respond by sending back an acknowledge bit. This is
done by pulling the SDA low at the 9th clock (see
Figure 39
).
Slave address -
No two slaves in the system may have the same
address. If the IIC is master, it must not transmit an address that
is equal to its own slave address. The IIC cannot be master and
slave at the same time. If however arbitration is lost during an
address cycle the IIC will revert to slave mode and operate
correctly even if it is being addressed by another master.
Data Transfer
Once successful slave addressing is achieved, the data transfer can
proceed byte-by-byte in a direction specified by the R/W bit sent by the
calling master.
NOTE:
All transfers that come after an address cycle are referred to as data
transfers, even if they carry sub-address information for the slave
device.
Each data byte is 8 bits long. Data may be changed only while SCL is low
and must be held stable while SCL is high as shown in
Figure 39
. There
is one clock pulse on SCL for each data bit, the MSB being transferred
first. Each data byte has to be followed by an acknowledge bit, which is
signalled from the receiving device by pulling the SDA low at the ninth
clock. So one complete data byte transfer needs nine clock pulses.
5-iicbus