Datasheet
chipKIT™ WF32™ Board Reference Manual
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 11 of 24
15, the connector location for digital pin 7, via a 1K ohm resistor. This signal is accessed via digital pin number 71.
SDO1 is accessed via digital pin 3. This conflicts with one of the PWM outputs accessed using analogWrite(). SDI1 is
accessed via digital pin 38. SCK1 is connected to connector J7, pin 1, the connector location for digital pin 8, via a
1K ohm resistor. This conflicts with external interrupt INT3. This signal can be accessed via digital pin number 72.
SPI3: Synchronous serial port. This is an additional SPI interface on the PIC32 microcontroller that can be accessed
using the DSPI2 object from the DSPI standard library. It is not accessible using the SPI standard library. Pin 39
(SS3), pin 1 (SDO3), pin 0 (SDI1), and pin 40 (SCK3). Note that pins 0 and 1 conflict with UART1: object class Serial.
Pins 39 and 40 conflict with UART4: Serial1 object class.
SPI4: Synchronous serial port. This port is dedicated for access to the MR24WG0MA WiFi module and is normally
only used by the networking libraries. This can be accessed using the DSPI3 object class from the DSPI standard
library, but this is not recommended for normal operation of the board.
10.3
C
Synchronous serial interface. The PIC32 microcontroller shares analog pins A4 and A5 with the two I2C signals SDA
and SCL. Jumpers JP4 and JP5 are used to select whether the analog pin functions or the I2C pin functions are
being used. The shorting blocks are placed in the AN position to select the analog input function or general digital
I/O. They are placed in the I2C position to select the I2C function. This uses I2C2 (SDA2, SCL2) on the PIC32
microcontroller. Both SDA2 and SCL2 are accessible on connector J6.
Note: The I2C bus uses open collector drivers to allow multiple devices to drive the bus signals. This means that
pull-up resistors must be provided to supply the logic high state for the signals. These pull-up resistors are 2.2 kilo-
ohms and labeled R18 and R19 on the WF32 board, but they require that chipKIT pin numbers 62 and 63 are driven
to a logic high ('1') level. Code to enable the on-board pullup resistors is as follows:
In MPLAB X:
//disables the jtag module
DDPCONbits.JTAGEN = 0;
//Drive RA2 and RA3 to digital high
TRISASET = 0xC;
PORTASET = 0xC;
In MPIDE:
//the jtag module is disabled by default
pinMode(62, OUTPUT);
pinMode(63, OUTPUT);
digitalWrite(62, HIGH);
digitalWrite(63, HIGH);
10.4 PWM
Pulse width modulated output; Pins 3 (OC1), 5 (OC2), 6 (OC3), 9 (OC4), and 10 (OC5). These can be accessed using
the analogWrite() runtime function.