Datasheet
2009-2011 Microchip Technology Inc. DS41365E-page 133
PIC18(L)F1XK22
14.0 MASTER SYNCHRONOUS
SERIAL PORT (MSSP)
MODULE
14.1 Master SSP (MSSP) Module
Overview
The Master Synchronous Serial Port (MSSP) module is
a serial interface, useful for communicating with other
peripheral or microcontroller devices. These peripheral
devices may be serial EEPROMs, shift registers, dis-
play drivers, A/D converters, etc. The MSSP module
can operate in one of two modes:
• Serial Peripheral Interface (SPI)
• Inter-Integrated Circuit (I
2
C™)
- Full Master mode
- Slave mode (with general address call)
The I
2
C interface supports the following modes in
hardware:
•Master mode
• Multi-Master mode
• Slave mode
14.2 SPI Mode
The SPI mode allows 8 bits of data to be synchronously
transmitted and received simultaneously. All four
modes of SPI are supported. To accomplish
communication, typically three pins are used:
• Serial Data Out – SDO
• Serial Data In – SDI
• Serial Clock – SCK
Additionally, a fourth pin may be used when in a Slave
mode of operation:
• Slave Select – SS
Figure 14-1 shows the block diagram of the MSSP
module when operating in SPI mode.
FIGURE 14-1: MSSP BLOCK DIAGRAM
(SPI MODE)
( )
Read Write
Internal
Data Bus
SSPSR Reg
SSPM<3:0>
bit 0
Shift
Clock
SS
Control
Enable
Edge
Select
Clock Select
TMR2 Output
T
OSC
Prescaler
4, 16, 64
2
Edge
Select
2
4
TRIS bit
SDO
SSPBUF Reg
SDI/SDA
SS
SCK/SCL