Datasheet

Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 17 of 35
SDI4 JF-03
SCK4 JF-04
Note that early versions of the Microchip PIC32MX5Xx/6XX/7XX Family Data Sheet refer to SPI3 as SPI1A and SPI4
as SPI3A.
Detailed information about the operation of the SPI peripherals can be found in the PIC32 Family Reference
Manual, Section 23, Serial Peripheral Interface.
When using the chipKIT Pro MX7 with the MPIDE and the chipKIT system, the SPI ports are accessed using either
the standard chipKIT SPI library or using the Digilent DSPI library.
The standard SPI library supports access to a single SPI port, SPI4, Pmod connector JF. This is accessed using the
SPI object.
The DSPI library supports access to all three SPI ports. The DSPI0 object class is used to create an object used to
access SPI1, Pmod connector JD. The DSPI1 object class is used to access SPI3, Pmod connector JE, and the
DSPI2 object class is used to access SPI4, Pmod connector JF.
11 I
2
C Interface
The inter-integrated circuit (I
2
C) 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 PIC32MX5XX/6XX/7XX
Family Data Sheet and the PIC32 Family Reference Manual, Section 24, Inter-Integrated Circuit, for detailed
information on configuring and using the I
2
C interface.
The PIC32MX795 microcontroller provides for up to five independent I
2
C interfaces. The chipKIT Pro MX7 is
designed to provide dedicated access to two of these interfaces I2C1 and I2C2 via I
2
C daisy chain connectors J7 and
J8. Connector J7 provides access to I2C1 while connector J8 provides access to I2C2.
In addition to I2C1 and I2C2, two other I
2
C interfaces, I2C3 and I2C5 can be accessed via pins on Pmod connectors.
I2C3 can be accessed via Pmod connector JE, pins JE-02 (SCL3) and JE-03 (SDA3). I2C5 can be accessed via Pmod
connector JF, pins JF-02 (SCL5) and JF-03 (SDA5)
The I
2
C daisy chain connectors, J7 and J8, each provide 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 Pro MX7 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 on 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 Pro MX7 I2C2, connector J8, has permanently connected 2.2K ohm, pull-up resistors. I2C1,
connector J7, provides selectable pull-ups that can be enabled or disabled via jumper blocks JP3 and JP4. The pull-
ups are enabled by installing shorting blocks on JP3 and JP4. They are disabled by removing the shorting blocks.
Only one device on the bus should have the pull-ups enabled.
If the I
2
C interfaces on Pmod connectors JE or JF are being used, external pull-up resistors must be provided. These
resistors can be in the range 1K ohm to 10K ohm, and should be connected to pull the pins to 3.3V.