7serial peripheral interface (spi) – Digilent 410-297P-KIT User Manual
Page 12
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 25
UART1 can be accessed from Pmod connector JB and UART2 can be accessed from Pmod connector JC using the
following pins:
• U1CTS
JB-01
• U1TX
JB-02
• U1RX
JB-03
• U1RTS
JB-04
• U2CTS
JC-01
• U2TX
JC-02
• U2RX
JC-03
• U2RTS
JC-04
Some of the pins on UART1 and SPI1 are shared on the PIC32 microcontroller. This means that UART1 and SPI1
can’t both be used at the same time.
Detailed information about the operation of the UART peripherals can be found in the PIC32 Family Reference
Manual, Section 21, UART.
The USB Serial converter is connected to UART1. The MPIDE uses this to communicate with the boot loader. This
can also be used for a serial communications interface between the ChipKIT MX3 board and other software
running on a PC. Resistors are used to decouple the USB serial interface and so UART 1 can also be used via Pmod
connector JB.
Note that when using the MPIDE software, devices connected to JB can interfere with the operation of the serial
interface and prevent the MPIDE from successfully downloading sketches to the board. If this happens, disconnect
the external device from JB until the sketch has been downloaded and then reconnect it.
When using the ChipKIT MX3 with the MPIDE and the chipKIT system, the UARTs are accessed using the
HardwareSerial facility built into the system. UART1, connector JB, is accessed using the Serial object and
UART2, connector JC, is accessed using Serial1.
7
Serial Peripheral Interface (SPI)
SPI is a four wire synchronous serial interface and devices can operate as either an SPI master device or as an SPI
slave device. The four SPI signals are generally called Slave Select (SS), Master Out Slave In (MOSI), Master In Slave
Out (MISO), and Serial Clock (SCK). The master device generates SS and SCK, and the slave device receives SS and
SCK. The SS signal is used to enable the slave device, and this signal is only significant for slave devices. A master
device can use any general purpose I/O pin to generate SS to enable the slave.
The PIC32 microcontroller labels the SPI signals as: Slave Select (SS), Serial Data Out (SDO), Serial Data In (SDI), and
Serial Clock (SCK). When the PIC32 microcontroller is enabled as a master device SDO serves the purpose of MOSI
and SDI serves the purpose of MISO. When the PIC32 microcontroller is operating as an SPI slave device, SDI serves
the purpose of MOSI and SDO serves the purpose of MISO.
The PIC32 microcontroller provides two Serial Peripheral Interfaces, SPI1 and SPI2. SPI1 is accessed via Pmod
connector JB and SPI2 is accessed via Pmod connector JE.
• RD9
JB-01 (used for SS output)