Inter-Integrated Circuit (IIC) Module
MC9S08GB/GT Data Sheet, Rev. 2.3
208
Freescale Semiconductor
13.2.1.1
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 13-3
, a
START signal is defined as a high-to-low transition of SDA while SCL is high. This signal denotes the
beginningofanewdatatransfer(eachdatatransfermaycontainseveralbytesofdata)andbringsallslaves
out of their idle states.
13.2.1.2
Slave Address Transmission
The first byte of data transferred immediately after the START signal is the slave address transmitted by
themaster.Thisisaseven-bitcallingaddressfollowedbyaR/Wbit.TheR/Wbittellstheslavethedesired
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 13-3
).
Notwoslavesinthesystemmayhavethesameaddress.IftheIICmoduleisthemaster,itmustnottransmit
an address that is equal to its own slave address. The IIC cannot be master and slave at the same time.
However, if 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.
13.2.1.3
Data Transfer
Before 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.
Alltransfersthatcomeafteranaddresscyclearereferredtoasdatatransfers,eveniftheycarrysub-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 13-3
. There is one clock pulse on SCL for each data bit, the MSB being
transferred first. Each data byte is followed by a 9th (acknowledge) bit, which is signalled from the
receiving device. An acknowledge is signalled by pulling the SDA low at the ninth clock. In summary, one
complete data transfer needs nine clock pulses.
If the slave receiver does not acknowledge the master in the 9th bit time, the SDA line must be left high
by the slave. The master interprets the failed acknowledge as an unsuccessful data transfer.
If the master receiver does not acknowledge the slave transmitter after a data byte transmission, the slave
interprets this as an end of data transfer and releases the SDA line.
In either case, the data transfer is aborted and the master does one of two things:
Relinquishes the bus by generating a STOP signal.
Commences a new calling by generating a repeated START signal.