English
Language : 

PIC16F946 Datasheet, PDF (167/274 Pages) Microchip Technology – 64-Pin Flash-Based, 8-Bit CMOS Microcontrollers with LCD Driver and nanoWatt Technology
14.0 SSP MODULE OVERVIEW
The Synchronous Serial Port (SSP) module is a serial
interface used to communicate with other peripheral or
microcontroller devices. These peripheral devices may
be serial EEPROMs, shift registers, display drivers,
A/D converters, etc. The SSP module can operate in
one of two modes:
• Serial Peripheral Interface (SPI™)
• Inter-Integrated Circuit (I2C™)
An overview of I2C operations and additional information
on the SSP module can be found in the “PICmicro®
Mid-Range MCU Family Reference Manual” (DS33023).
Refer to Application Note AN578, “Use of the SSP
Module in the Multi-Master Environment” (DS00578).
14.1 SPI Mode
This section contains register definitions and operational
characteristics of the SPI module. Additional information
on the SPI module can be found in the “PICmicro®
Mid-Range MCU Family Reference Manual” (DS33023).
The SPI mode allows 8 bits of data to be synchronously
transmitted and received simultaneously. To accomplish
communication, typically three pins are used:
• Serial Data Out (SDO) – RC4/T1G/SDO/SEG11
• Serial Data In (SDI) – RC7/RX/DT/SDI/SDA/SEG8
• Serial Clock (SCK) – RC6/TX/CK/SCK/SCL/SEG9
Additionally, a fourth pin may be used when in a Slave
mode of operation:
• Slave Select (SS) – RA5/AN4/C2OUT/SS/SEG5
When initializing the SPI, several options need to be
specified. This is done by programming the appropriate
control bits in the SSPCON register (SSPCON<5:0>)
and SSPSTAT<7:6>. These control bits allow the
following to be specified:
• Master mode (SCK is the clock output)
• Slave mode (SCK is the clock input)
• Clock Polarity (Idle state of SCK)
• Clock edge (output data on rising/falling edge of
SCK)
• Clock Rate (Master mode only)
• Slave Select mode (Slave mode only)
PIC16F946
© 2005 Microchip Technology Inc.
Preliminary
DS41265A-page 165