English
Language : 

PIC16F722AT-ISS Datasheet, PDF (155/286 Pages) Microchip Technology – 28-Pin Flash Microcontrollers with nanoWatt XLP Technology
PIC16(L)F722A/723A
17.0 SSP MODULE OVERVIEW
The Synchronous Serial Port (SSP) module is a serial
interface useful for communicating with other peripher-
als or microcontroller devices. These peripheral
devices may be serial EEPROMs, shift registers, dis-
play drivers, A/D converters, etc. The SSP module can
operate in one of two modes:
• Serial Peripheral Interface (SPI)
• Inter-Integrated Circuit (I2C™)
17.1 SPI Mode
The SPI mode allows 8 bits of data to be synchronously
transmitted and received, simultaneously. The SSP
module can be operated in one of two SPI modes:
• Master mode
• Slave mode
SPI is a full-duplex protocol, with all communication
being bidirectional and initiated by a master device. All
clocking is provided by the master device and all bits
are transmitted, MSb first. Care must be taken to
ensure that all devices on the SPI bus are setup to
allow all controllers to send and receive data at the
same time.
A typical SPI connection between microcontroller
devices is shown in Figure 17-1. Addressing of more
than one slave device is accomplished via multiple
hardware slave select lines. External hardware and
additional I/O pins must be used to support multiple
slave select addressing. This prevents extra overhead
in software for communication.
For SPI 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 17-1:
TYPICAL SPI MASTER/SLAVE CONNECTION
SPI Master SSPM<3:0> = 00xx
SDO
Serial Input Buffer
(SSPBUF)
SPI Slave SSPM<3:0> = 010x
SDI
Serial Input Buffer
(SSPBUF)
Shift Register
(SSPSR)
MSb
LSb
SDI
SCK
Serial Clock
SDO
SCK
Shift Register
(SSPSR)
MSb
LSb
Slave Select
General I/O
SS
Processor 1
(optional)
Processor 2
 2010-2012 Microchip Technology Inc.
DS41417B-page 155