Digilent MX3cK User Manual
Page 11

Cerebot MX3cK Reference Manual
www.digilentinc.com
page 11 of 23
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
• 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
Cerebot MX3cK 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 Cerebot MX3cK 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
.
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)
• SDO1
JB-02
• SDI1
JB-03
• SCK1
JB-04
• SS2
JE-01
• MOSI
JE-02
• MISO
JE-03
• SCK2
JE-04
SPI1 is only laid out to support use as an SPI
master. To use SPI1 as a slave device, it is
necessary to use external wiring to connect the
signals appropriately. When using SPI1 as a
slave device, the SS1 signal is obtained from
Pmod connector JD, pin 1 (JD-01).