English
Language : 

PIC32MX440F256H-80I Datasheet, PDF (410/646 Pages) Microchip Technology – 64/100-Pin General Purpose and USB 32-Bit Flash Microcontrollers
PIC32MX3XX/4XX
17.4 I/O Pin Control
Enabling the SPI modules will configure the I/O pin
direction as defined by the SPI control bits (see
Table 17-7). The port TRIS and LATCH registers will be
overridden.
TABLE 17-7: I/O PIN CONFIGURATION FOR USE WITH SPI MODULES
Required Settings for Module Pin Control
IO Pin Name Required
Module
Control(3)
Bit
Field(3)
TRIS(4) Pin Type
Buffer Type
Description
SCK1, SCK2
Yes
ON
and
MSTEN
—
X
O
CMOS
SPI1, SPI2 module Clock
Output in Master Mode.
SCK1, SCK2
SDI1, SDI2
SDO1, SDO2
Yes
Yes
Yes(1)
ON
and
MSTEN
ON
—
X(5)
I
—
X(5)
I
ON
DISSDO
X
O
CMOS
CMOS
CMOS
SPI1, SPI2 module Clock
Input in Slave Mode.
SPI1, SPI2 module Data
Receive pin.
SPI1, SPI2 module Data
Transmit pin.
SS1, SS2
Yes(2)
ON
and
FRMEN
and
MSTEN
SSEN
X(5)
I
CMOS
SPI1, SPI2 module Slave
Select Control pin.
SS1, SS2
ON
Yes
and
—
X(5)
I
FRMEN
and
FRMSYNC
CMOS
SPI1, SPI2 Frame Sync
Pulse input in Frame Mode.
SS1, SS2
ON
Yes
and
—
X
O
CMOS SPI1,SPI2 Frame Sync
FRMEN
Pulse output in Frame Mode.
and
FRMSYNC
Legend: CMOS = CMOS compatible input or output; ST = Schmitt Trigger input with CMOS levels; I = Input;
O = Output; X = Don’t Care
Note 1: The SDO pins are only required when SPI data output is needed. Otherwise, these pins can be used for
general purpose I/O and require the user to set the corresponding TRIS control register bits.
2: The Slave Select pins are only required when a select signal to the slave device is needed. Otherwise,
these pins can be used for general purpose I/O and require the user to set the corresponding
TRIS control register bits.
3: These bits are contained in the SPIxCON register.
4: The setting of the TRIS bit is irrelevant.
5: If the input pin is shared with an analog input, then the AD1PCFG and the corresponding TRIS register
have to be properly set to configure this input as digital.
DS61143E-page 408
Preliminary
© 2008 Microchip Technology Inc.