PIC18F23K20-E/MLQTP MICROCHIP [Microchip Technology], PIC18F23K20-E/MLQTP Datasheet - Page 191
PIC18F23K20-E/MLQTP
Manufacturer Part Number
PIC18F23K20-E/MLQTP
Description
28/40/44-Pin Flash Microcontrollers with 10-Bit A/D and nanoWatt Technology
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
1.PIC18F23K20-EMLQTP.pdf
(420 pages)
- Current page: 191 of 420
- Download datasheet (8Mb)
17.3.3
To enable the serial port, SSP Enable bit, SSPEN of the
SSPCON1 register, must be set. To reset or reconfig-
ure SPI mode, clear the SSPEN bit, reinitialize the
SSPCON registers and then set the SSPEN bit. This
configures the SDI, SDO, SCK and SS pins as serial
port pins. For the pins to behave as the serial port func-
tion, some must have their data direction bits (in the
TRIS register) appropriately programmed as follows:
• SDI is automatically controlled by the SPI module
• SDO must have corresponding TRIS bit cleared
• SCK (Master mode) must have corresponding
• SCK (Slave mode) must have corresponding
• SS must have corresponding TRIS bit set
Any serial port function that is not desired may be
overridden by programming the corresponding data
direction (TRIS) register to the opposite value.
FIGURE 17-2:
© 2007 Microchip Technology Inc.
TRIS bit cleared
TRIS bit set
ENABLING SPI I/O
SPI Master SSPM<3:0> = 00xxb
MSb
Serial Input Buffer
Processor 1
SPI MASTER/SLAVE CONNECTION
Shift Register
(SSPBUF)
(SSPSR)
LSb
Advance Information
SDO
SCK
SDI
Serial Clock
17.3.4
Figure 17-2 shows a typical connection between two
microcontrollers. The master controller (Processor 1)
initiates the data transfer by sending the SCK signal.
Data is shifted out of both shift registers on their pro-
grammed clock edge and latched on the opposite edge
of the clock. Both processors should be programmed to
the same Clock Polarity (CKP), then both controllers
would send and receive data at the same time.
Whether the data is meaningful (or dummy data)
depends on the application software. This leads to
three scenarios for data transmission:
• Master sends data – Slave sends dummy data
• Master sends data – Slave sends data
• Master sends dummy data – Slave sends data
PIC18F2XK20/4XK20
SDO
SCK
SDI
TYPICAL CONNECTION
SPI Slave SSPM<3:0> = 010xb
MSb
Serial Input Buffer
Shift Register
(SSPBUF)
(SSPSR)
Processor 2
LSb
DS41303B-page 189
Related parts for PIC18F23K20-E/MLQTP
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
IC PIC MCU FLASH 4KX16 28-SSOP
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
IC PIC MCU FLASH 4KX16 28-SOIC
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
28/40/44-Pin Flash Microcontrollers with nanoWatt XLP Technology
Manufacturer:
MICROCHIP [Microchip Technology]
Datasheet:
Part Number:
Description:
IC MCU 8BIT 8KB FLASH 28UQFN
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
IC PIC MCU FLASH 4KX16 28-QFN
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
IC PIC MCU FLASH 4KX16 28-DIP
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
8 KB Enh Flash, 768 RAM, 25 I/O Pb Free, Nanowatt XLP 28 QFN 6x6mm TUBE
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
8 KB Enh Flash, 768 RAM, 25 I/O Pb Free, Nanowatt XLP 28 UQFN 4x4x0.5mm TUBE
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
8 KB Enh Flash, 768 RAM, 25 I/O Pb Free, Nanowatt XLP 28 SOIC .300in TUBE
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
8 KB Enh Flash, 768 RAM, 25 I/O Pb Free, Nanowatt XLP 28 SPDIP .300in TUBE
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
8 KB Enh Flash, 768 RAM, 25 I/O Pb Free, Nanowatt XLP 28 SSOP .209in TUBE
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
28/40/44-Pin Enhanced Flash Microcontrollers with ECAN Technology, 10-Bit A/D and nanoWatt Technology
Manufacturer:
MICROCHIP [Microchip Technology]
Datasheet:
Part Number:
Description:
28/40/44-Pin Enhanced Flash Microcontrollers with ECAN Technology, 10-Bit A/D and nanoWatt Technology
Manufacturer:
MICROCHIP [Microchip Technology]
Datasheet: