PIC18F2510-E/P MICROCHIP [Microchip Technology], PIC18F2510-E/P Datasheet - Page 151

no-image

PIC18F2510-E/P

Manufacturer Part Number
PIC18F2510-E/P
Description
28/40/44-Pin Flash Microcontrollers with 10-Bit A/D and nanoWatt Technology
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
16.0
16.1
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,
display drivers, A/D converters, etc. The MSSP module
can operate in one of two modes:
• Serial Peripheral Interface (SPI)
• Inter-Integrated Circuit (I
The I
hardware:
• Master mode
• Multi-Master mode
• Slave mode
16.2
The MSSP module has three associated registers.
These include a status register (SSPSTAT) and two
control registers (SSPCON1 and SSPCON2). The use
of these registers and their individual Configuration bits
differ significantly depending on whether the MSSP
module is operated in SPI or I
Additional details are provided under the individual
sections.
© 2009 Microchip Technology Inc.
- Full Master mode
- Slave mode (with general address call)
2
C interface supports the following modes in
MASTER SYNCHRONOUS
SERIAL PORT (MSSP)
MODULE
MSSP Module Overview
Control Registers
2
C)
2
C mode.
16.3
The SPI mode allows 8 bits of data to be synchronously
transmitted and received simultaneously. All four SPI
modes are supported. To accomplish communication,
typically three pins are used:
• Serial Data Out (SDO) – RC5/SDO
• Serial Data In (SDI) – RC4/SDI/SDA
• Serial Clock (SCK) – RC3/SCK/SCL
Additionally, a fourth pin may be used when in a Slave
mode of operation:
• Slave Select (SS) – RA5/SS
Figure 16-1 shows the block diagram of the MSSP
module when operating in SPI mode.
FIGURE 16-1:
HLVDIN/C2OUT
RC4/SDI/SDA
RC3/SCK/
RA5/AN4/SS/
RC5/SDO
SCL
PIC18F2X1X/4X1X
SPI Mode
Read
SS Control
Select
SMP:CKE
Edge
MSSP BLOCK DIAGRAM
(SPI MODE)
Select
bit 0
Edge
Enable
TRIS bit
Data to TX/RX in SSPSR
SSPBUF reg
2
SSPM3:SSPM0
SSPSR reg
Clock Select
4
2
DS39636D-page 153
(
Prescaler
4, 16, 64
TMR2 Output
Write
Clock
Shift
Data Bus
Internal
2
T
OSC
)

Related parts for PIC18F2510-E/P