5.6.2 Serial Peripheral Interface (SPI)

The PIC16F, PIC18F and PIC32CM MCUs provide SPI peripherals that feature high-speed, full-duplex, synchronous data transfer between microcontrollers and other devices. These SPIs support Host and Client modes, allowing communication with a wide range of external devices. Table 5-22 provides a comparison of features between PIC16F, PIC18F and PIC32CM.

Table 5-22. PIC16F, PIC18F and PIC32CM SPI Features
FeaturePIC16F MSSPPIC18F MSSP/SPIPIC32CM SERCOM-SPI
Integration

Host Synchronous Serial Port (MSSP)

Stand-alone SPI

MSSP

Stand-alone SPI

Mode in SERCOM peripheral
Data Buffering

One-level TX buffer

Two-level RX buffer

FIFO

One-level TX buffer

Two-level RX buffer

internal FIFO

Host/Client SupportSupportedSupportedSupported
Data WidthEight bits (standard)

16 bits

Eight bits (standard)

16 bits

8/16 bits (configurable)
Bit Rate/Clock SpeedUp to 10 MHzUp to 20 MHzUp to 24 MHz
SPI Modes Supported All four SPI modesAll four SPI modesAll four SPI modes
Data Order MSb firstLSb or MSb first LSb or MSb first
DMA SupportN/ASupportedSupported
Framed SPI/FSYNCHardware-controlled through Client Select (SS) pin Hardware-controlled through the SS pinHardware-controlled FSYNC
0-bit Extension N/AN/ASupported
Wake-up from Idle SupportedSupportedSupported
Write Collision ProtectionSupportedSupportedSupported
InterruptsSupportedSupportedSupported
Pin Mapping FlexibleFlexibleFlexible
Advanced Features

Enhanced buffer

Auto-CS

Interrupt

16-bit mode

Enhanced buffer

Auto-CS

Interrupt

16-bit mode

Advanced error flags

DMA

DMA

Event System

Sleepwalking

Multi-protocol