Microchip Technology DM240015 Data Sheet
PIC24FJ128GC010 FAMILY
DS30009312B-page 242
2012-2013 Microchip Technology Inc.
REGISTER 16-2:
SPI
X
CON1: SPIx CONTROL REGISTER 1
U-0
U-0
U-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
—
—
—
DISSCK
(
)
DISSDO
(
)
MODE16
SMP
CKE
(
)
bit 15
bit 8
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
SSEN
(
)
CKP
MSTEN
SPRE2
SPRE1
SPRE0
PPRE1
PPRE0
bit 7
bit 0
Legend:
R = Readable bit
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
-n = Value at POR
‘1’ = Bit is set
‘0’ = Bit is cleared
x = Bit is unknown
bit 15-13
Unimplemented:
Read as ‘0’
bit 12
DISSCK:
Disable SCKx Pin bit (SPI Master modes only)
1
= Internal SPI clock is disabled; pin functions as I/O
0
= Internal SPI clock is enabled
bit 11
DISSDO:
Disable SDOx Pin bit
(
)
1
= SDOx pin is not used by the module; pin functions as I/O
0
= SDOx pin is controlled by the module
bit 10
MODE16:
Word/Byte Communication Select bit
1
= Communication is word-wide (16 bits)
0
= Communication is byte-wide (8 bits)
bit 9
SMP:
SPIx Data Input Sample Phase bit
Master mode:
1
1
= Input data is sampled at the end of data output time
0
= Input data is sampled at the middle of data output time
Slave mode:
SMP must be cleared when SPIx is used in Slave mode.
SMP must be cleared when SPIx is used in Slave mode.
bit 8
CKE:
SPIx Clock Edge Select bit
(
)
1
= Serial output data changes on transition from active clock state to Idle clock state (see bit 6)
0
= Serial output data changes on transition from Idle clock state to active clock state (see bit 6)
bit 7
SSEN:
Slave Select Enable (Slave mode) bit
1
= SSx pin is used for Slave mode
0
= SSx pin is not used by the module; pin is controlled by the port function
bit 6
CKP:
Clock Polarity Select bit
1
= Idle state for the clock is a high level; active state is a low level
0
= Idle state for the clock is a low level; active state is a high level
bit 5
MSTEN:
SPIx Master Mode Enable bit
1
= Master mode
0
= Slave mode
Note 1:
for more information.
2:
If DISSDO = 0, SDOx must be configured to an available RPn pin. See
for more information.
3:
The CKE bit is not used in the Framed SPI modes. The user should program this bit to ‘0’ for the Framed
SPI modes (FRMEN = 1).
SPI modes (FRMEN = 1).
4:
If SSEN = 1, SSx must be configured to an available RPn/PRIn pin. See
for more information.