
chipKIT™ MX3 Board Reference Manual
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page
12
of
24
8
I
2
C™ Interface
The Inter-Integrated Circuit (I
2
C
TM
) Interface provides a medium speed (100K or 400K bps) synchronous serial
communications bus. The I
2
C interface provides master and slave operation using either 7 bit or 10 bit device
addressing. Each device is given a unique address, and the protocol provides the ability to address packets to a
specific device or to broadcast packets to all devices on the bus. Refer to the Microchip PIC32MX3XX/4XX Family
Data Sheet and the PIC32 Family Reference Manual for detailed information on configuring and using the I
2
C
interface.
The PIC32MX320 microcontroller provides for two independent I
2
C interfaces. The chipKIT MX3 is designed to
provide dedicated access to one of these interfaces, I2C1, using I
2
C daisy chain connector J2. The other I
2
C
interface, I2C2, can be accessed at pins 2 & 3 on Pmod connector JC.
The I
2
C daisy chain connector provides two positions for connecting to the I
2
C signals, power and ground. By using
two-wire or four-wire MTE cables (available separately from Digilent) a daisy chain of multiple chipKIT MX3 boards
or other I
2
C-capable boards can be created.
The I
2
C bus is an open-collector bus. Devices on the bus actively drive the signals low. The high state of the I
2
C
signals is achieved by pull-up resistors when no device is driving the lines low. One device on the I
2
C bus must
provide the pull-up resistors. On the chipKIT MX3, I2C1 provides selectable pull-up resistors that can be enabled or
disabled via jumper blocks JP1 and JP10, near Pmod connector JA. The pull-ups are enabled by installing shorting
blocks and are disabled by removing the shorting blocks. Generally, only one device on the bus will have the pull-
ups enabled.
There are no pull-up resistors provided on the chipKIT MX3 for I2C2. If I2C2 is to be used, external pull-up resistors
must be provided. The operating voltage for the I
2
C busses on the chipKIT MX3 is 3.3V. External pull-up resistors
must be connected to a 3.3V source.
Detailed information about the operation of the I
2
C peripherals can be found in the PIC32 Family Reference
Manual, Section 24, Inter-Integrated Circuit.
When using the chipKIT MX3 with the MPIDE and the chipKIT system, the I
2
C interfaces are accessed using the
standard chipKIT Wire library, or the Digilent DTWI library.
The Wire library supports a single I
2
C interface, I2C1 on J2. This is accessed using the
Wire
object.
The DTWI library supports both I
2
C interfaces. The
DTWI0
object class is used to create an object for access to I2C1
and the
DTWI1
object class is used to access I2C2.
The pinout of the I
2
C daisy chain connector is as follows:
Connector J2. I2C1
J2-1 – SCL1
J2-2 – SCL1
J2-3 – SDA1
J2-4 – SDA1
J2-5 – GND
J2-6 – GND
J2-7 – BRD_3V3
J2-8 – BRD_3V3