Datasheet

chipKITWF32™ Board Reference Manual
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 10 of 24
When using the WF32 outside the MPIDE environment, the Microchip Application Library provides USB stack code
that can be used with the board. There are reference designs available on the Microchip web site demonstrating
both device and host operation of PIC32 microcontrollers. These reference designs are suitable to use for
developing USB firmware for the WF32 Shield.
9 SD Card Interface
The micro-SD card connector provides the ability to access data stored on micro-SD sized flash memory cards using
the SD card library provided as part of the MPIDE software system.
The SD card is accessed using an SPI interface on PIC32 microcontroller pins dedicated to this purpose. The SD
library uses a ‘bit-banged’ software SPI implementation to talk to SD cards.
On the WF32 board, the I/O pins used to communicate with the SD card are dedicated to that function and not
shared with other uses.
10 Peripheral I/O Functions
The PIC32 microcontroller on the WF32 board provides a number of peripheral functions. The following
peripherals are provided:
10.1 UART Ports
UART 1: Asynchronous serial port. Pin 0 (RX), Pin 1 (TX). This is accessed using the runtime object: Serial. These
pins are connected to I/O connector J9 and are also connected to the FT232RQ USB serial converter. It is possible
to use these pins to connect to an external serial device when not using the USB serial interface. This uses UART1
(U1RX, U1TX) on the PIC32 microcontroller.
UART 4: Asynchronous serial port. Pin 39 (RX), Pin 40 (TX). This is accessed using the runtime object: Serial1. This
uses UART4 (U24X, U4TX) on the PIC32 microcontroller.
10.2 SPI
Synchronous serial port. Pin 10 (SS), Pin 11 (MOSI), Pin 12 (MISO), Pin 13 (SCK).This can be accessed using the SPI
standard library. It can also be accessed using the DSPI0 object from the DSPI standard library. This uses SPI2 (SS2,
SDI2, SDO2, SCK2) on the PIC32 microcontroller. These signals also appear on connector J10.
Jumpers JP6 and JP7 are used to select whether the WF32 operates as a Master (transmit on MOSI, receive on
MISO) or a Slave (transmit on MISO, receive on MOSI) device. The shorting blocks on JP6 and JP7 are normally
placed in the Master position for the WF32 to function as an SPI master.
Jumper JP3 is used to select PWM output or the SPI SS function on Pin 10. The shorting block on JP3 should be in
the PWM position to select PWM output. It should be in the SS position to select the SPI SS function. JP4 will
normally be in the PWM position. In general, the only time it needs to be in the SS position is when the WF32
board is being used as an SPI slave device.
SPI1: Synchronous serial port. This is an additional SPI interface on the PIC32 microcontroller that can be assessed
using the DSPI1 object from the DSPI standard library. It is not accessible using the SPI standard library. Several of
the SPI1 signals are shared in various ways with other peripheral functions. SS1 is connected to connector J9, pin