
Figure 20-2: Data transfer on the I
2
C Bus †
MSB
SDA
SCL
1
S or R
Start or Restart
Condition
Stop & Restart
Condition
Byte Complete
Interrupt within
Slave
SCL Held Low while
Servicing Interrupts
2
7
8
9
1
2
3 - 8
9
R or P
P or R
LSB
ACK
from Slave
ACK
from Receiver
The I
2
C controller is a synchronous serial interface. The SDA line is a bidirectional signal and changes only
while the SCL line is low, except for STOP, START, and RESTART conditions. The output drivers are open-
drain or open-collector to perform wire-AND functions on the bus. The maximum number of devices on
the bus is limited by only the maximum capacitance specification of 400 pF. Data is transmitted in byte
packages. †
START and STOP Generation
When operating as a master, putting data into the transmit FIFO causes the I
2
C controller to generate a
START condition on the I
2
C bus. In order for the master to complete the transfer and issue a STOP condition
it must find a transmit FIFO entry tagged with a stop bit. Allowing the transmit FIFO to empty without a
stop bit set, the master will stall the transfer by holding the SCL line low. †
When operating as a slave, the I
2
C controller does not generate START and STOP conditions, as per the
protocol. However, if a read request is made to the I
2
C controller, it holds the SCL line low until read data
has been supplied to it. This stalls the I
2
C bus until read data is provided to the slave I
2
C controller, or the
I
2
C controller slave is disabled by writing a 0 to
IC_ENABLE
register. †
Combined Formats
The I
2
C controller supports mixed read and write combined format transactions in both 7-bit and 10-bit
addressing modes. †
The I
2
C controller does not support mixed address and mixed address format—that is, a 7-bit address
transaction followed by a 10-bit address transaction or vice versa—combined format transactions. †
To initiate combined format transfers, the
IC_RESTART_EN
bit in the
IC_CON
register should be set to
1. With this value set and operating as a master, when the I
2
C controller completes an I
2
C transfer, it checks
the transmit FIFO and executes the next transfer. If the direction of this transfer differs from the previous
transfer, the combined format is used to issue the transfer. If the
IC_RESTART_EN
is 0, a STOP will be
issued followed by a START condition. Another way to generate the RESTART condition is to set the Restart
bit [10] of the
DATA_CMD
register. Regardless if the direction of the transfer changes or not the RESTART
condition will be generated.†
Protocol Details
START and STOP Conditions
When the bus is idle, both the SCL and SDA signals are pulled high through pull-up resistors on the bus.
When the master wants to start a transmission on the bus, the master issues a START condition. This is
I2C Controller
Altera Corporation
cv_54020
START and STOP Generation
20-4
2013.12.30