PIC18F23K20-E/MLQTP MICROCHIP [Microchip Technology], PIC18F23K20-E/MLQTP Datasheet - Page 195

no-image

PIC18F23K20-E/MLQTP

Manufacturer Part Number
PIC18F23K20-E/MLQTP
Description
28/40/44-Pin Flash Microcontrollers with 10-Bit A/D and nanoWatt Technology
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
17.3.8
In SPI Master mode, module clocks may be operating
at a different speed than when in full power mode; in
the case of the Sleep mode, all clocks are halted.
In all Idle modes, a clock is provided to the peripherals.
That clock could be from the primary clock source, the
secondary clock (Timer1 oscillator at 32.768 kHz) or
the INTOSC source. See Section 3.0 “Power-Man-
aged Modes” for additional information.
In most cases, the speed that the master clocks SPI
data is not important; however, this should be
evaluated for each system.
When MSSP interrupts are enabled, after the master
completes sending data, an MSSP interrupt will wake
the controller:
• from Sleep, in slave mode
• from Idle, in slave or master mode
If an exit from Sleep or Idle mode is not desired, MSSP
interrupts should be disabled.
In SPI master mode, when the Sleep mode is selected,
all module clocks are halted and the transmis-
sion/reception will remain in that state until the devices
wakes. After the device returns to Run mode, the mod-
ule will resume transmitting and receiving data.
In SPI Slave mode, the SPI Transmit/Receive Shift
register operates asynchronously to the device. This
allows the device to be placed in any power-managed
mode
TABLE 17-2:
© 2007 Microchip Technology Inc.
INTCON
PIR1
PIE1
IPR1
TRISA
TRISC
SSPBUF
SSPCON1
SSPSTAT
Legend: Shaded cells are not used by the MSSP in SPI mode.
Note 1:
Name
2:
and
These bits are unimplemented in 28-pin devices; always maintain these bits clear.
PORTA<7:6> and their direction bits are individually configured as port pins based on various primary
oscillator modes. When disabled, these bits read as ‘0’.
OPERATION IN POWER-MANAGED
MODES
SSP Receive Buffer/Transmit Register
TRISA7
data to
GIE/GIEH PEIE/GIEL TMR0IE
PSPIE
PSPIP
PSPIF
TRISC7
WCOL
Bit 7
SMP
REGISTERS ASSOCIATED WITH SPI OPERATION
(1)
(1)
(1)
(2)
be
TRISA6
TRISC6
SSPOV
ADIE
ADIP
Bit 6
ADIF
CKE
shifted into the SPI
(2)
TRISA5
TRISC5
SSPEN
RCIE
RCIP
RCIF
Bit 5
D/A
Advance Information
TRISC4
TRISA4
INT0IE
TXIE
TXIP
Bit 4
TXIF
CKP
P
TRISA3
TRISC3
SSPM3
SSPIE
SSPIP
SSPIF
Transmit/Receive Shift register. When all 8 bits have
been received, the MSSP interrupt flag bit will be set
and if enabled, will wake the device.
17.3.9
A Reset disables the MSSP module and terminates the
current transfer.
17.3.10
Table 17-1 shows the compatibility between the
standard SPI modes and the states of the CKP and
CKE control bits.
TABLE 17-1:
There is also an SMP bit which controls when the data
is sampled.
RBIE
PIC18F2XK20/4XK20
Bit 3
Standard SPI Mode
S
Terminology
0, 0
0, 1
1, 0
1, 1
TMR0IF
CCP1IF
CCP1IE
CCP1IP
TRISC2
TRISA2
SSPM2
EFFECTS OF A RESET
BUS MODE COMPATIBILITY
Bit 2
R/W
SPI BUS MODES
TMR2IE
TMR2IP
TMR2IF
TRISA1
TRISC1
SSPM1
INT0IF
Bit 1
UA
CKP
Control Bits State
0
0
1
1
TMR1IF
TMR1IE
TMR1IP
TRISC0
TRISA0
SSPM0
RBIF
Bit 0
DS41303B-page 193
BF
CKE
on page
Values
Reset
1
0
1
0
57
60
60
60
60
60
58
58
58

Related parts for PIC18F23K20-E/MLQTP