PIC18F23K20-E/MLQTP MICROCHIP [Microchip Technology], PIC18F23K20-E/MLQTP Datasheet - Page 137

no-image

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
10.9
In addition to its function as a general I/O port, PORTD
can also operate as an 8-bit wide Parallel Slave Port
(PSP) or microprocessor port. PSP operation is
controlled by the 4 upper bits of the TRISE register
(Register 10-1).
(TRISE<4>), enables PSP operation as long as the
enhanced CCP module is not operating in dual output
or quad output PWM mode. In Slave mode, the port is
asynchronously readable and writable by the external
world.
The
microprocessor data bus. The external microprocessor
can read or write the PORTD latch as an 8-bit latch.
Setting the control bit, PSPMODE, enables the PORTE
I/O pins to become control inputs for the microprocessor
port. When set, port pin RE0 is the RD input, RE1 is the
WR input and RE2 is the CS (Chip Select) input. For this
functionality, the corresponding data direction bits of the
TRISE register (TRISE<2:0>) must be configured as
inputs (set) and the ANSEL<7:5> bits must be cleared.
A write to the PSP occurs when both the CS and WR
lines are first detected low and ends when either are
detected high. The PSPIF and IBF flag bits are both set
when the write ends.
A read from the PSP occurs when both the CS and RD
lines are first detected low. The data in PORTD is read
out and the OBF bit is clear. If the user writes new data
to PORTD to set OBF, the data is immediately read out;
however, the OBF bit is not set.
When either the CS or RD lines are detected high, the
PORTD pins return to the input state and the PSPIF bit
is set. User applications should wait for PSPIF to be set
before servicing the PSP; when this happens, the IBF
and OBF bits can be polled and the appropriate action
taken.
© 2007 Microchip Technology Inc.
Note:
PSP
Parallel Slave Port
The Parallel Slave Port is only available on
PIC18F4XK20 devices.
can
Setting
directly
control
interface
bit,
to
PSPMODE
Advance Information
an
8-bit
The timing for the control signals in Write and Read
modes is shown in Figure 10-3 and Figure 10-4,
respectively.
FIGURE 10-2:
PIC18F2XK20/4XK20
Data Bus
Note:
Set Interrupt Flag
PSPIF (PIR1<7>)
WR LATD
or
WR PORTD
RD PORTD
RD LATD
I/O pins have diode protection to V
Data Latch
Q
D
One bit of PORTD
CK
EN
PORTD AND PORTE
BLOCK DIAGRAM
(PARALLEL SLAVE PORT)
EN
Q
D
Chip Select
Read
Write
DS41303B-page 135
TTL
DD
TTL
TTL
TTL
and V
PORTE Pins
SS
RDx pin
.
RD
CS
WR

Related parts for PIC18F23K20-E/MLQTP