
EZ-USB FX2 Technical Reference Manual
Page 13-12 EZ-USB FX2 Technical Reference Manual v2.1
13.4 I²C-Compatible Bus Controller
The I²C-compatible bus controller uses the SCL (Serial Clock) and SDA (Serial Data) pins, and
performs two functions:
• General-purpose interfacing to I²C peripherals
• Boot loading from a serial EEPROM
Pullup resistors are required on the SDA and SCL lines, even if nothing is connected to the
I²C-compatible bus. Each line should be pulled up to Vcc through a 2.2K ohm resistor.
The bus frequency defaults to approximately 100 KHz for compatibility; it can be configured to run
four times faster for devices that support the higher speed.
13.4.1 Interfacing to I²C Peripherals
Figure 13-6. General I²C Transfer
Figure 13-6 illustrates the waveforms for an I²C transfer. SCL and SDA are open-drain FX2 pins,
which must be pulled up to Vcc with external resistors. The FX2 is a bus master only, meaning that
it synchronizes data transfers by generating clock pulses on SCL. Once the master drives SCL
low, external slave devices can hold SCL low to extend clock-cycle times.
To synchronize I²C data, serial data (SDA) is permitted to change state only while SCL is low, and
must be valid while SCL is high. Two exceptions to this rule are used to generate START and
STOP conditions: a START condition is defined as a high-to-low transition on SDA while SCL is
high, and a STOP condition is defined as a low-to-high transition on SDA while SCL is high. Data
is sent MSB first. During the last bit time (clock #9 in Figur e13-6), the master floats the SDA line
to allow the slave to acknowledge the transfer by pulling SDA low.
Multiple Bus Masters — The FX2 acts only as a bus master, never as a slave. Conflicts with a second master
can be detected, however, by checking for BERR=1 (see Section 13.4.2.2, "Status
Bits").
SDA
SCL
123456
7
8 9
D7 ACKD6 D5 D4 D3 D2 D1 D0
start stop
Komentarze do niniejszej Instrukcji