English
Language : 

PIC32MX440F256H-80I Datasheet, PDF (462/646 Pages) Microchip Technology – 64/100-Pin General Purpose and USB 32-Bit Flash Microcontrollers
PIC32MX3XX/4XX
EXAMPLE 20-4: EXAMPLE CODE: LEGACY PARALLEL SLAVE PORT INITIALIZATION
IEC1CLR = 0x0004
//Disable PMP int
PMCON = 0x0000
//Stop and Configure
PMMODE = 0x0000
//Config PMMODE
IPC7SET = 0x001C;
//Priority level=7
IPC7SET = 0x0003;
//subpriority =3
//Same as...
//IPC7SET=0x001F
IFS1CLR = 0x0004;
//Clear PMP flag
IEC1SET = 0x0004;
//Enable PMP int
PMCONSET = 0x8000;
//Enable PMP
20.3.11 Buffered Slave Mode
Buffered Parallel Slave Port mode is functionally iden-
tical to the Legacy Parallel Slave Port mode with one
exception: the implementation of 4-level read and write
buffers. Buffered Slave mode is enabled by setting the
PMMODE<INCM1:INCM0> bits to ‘11’.
When the Buffered mode is active, the module uses the
PMDIN register as write buffers and the PMDOUT reg-
ister as read buffers, with respect to the master device.
Each register is divided into four 8-bit buffer registers,
four read buffers in PMDOUT and four write buffers in
PMDIN. Buffers are numbered 0 through 3, starting
with the lower byte <7:0> and progressing upward
through the high byte <31:24>.
FIGURE 20-9:
PARALLEL MASTER/SLAVE CONNECTION BUFFERED
Master
D<7:0>
CS
RD
WR
PMD<7:0>
PIC32MX3XX/4XX Slave
Write
Address
Pointer
Read
Address
Pointer
PMCS1
PMRD
PMWR
PMDOUT (0)
PMDOUT (1)
PMDOUT (2)
PMDOUT (3)
PMDIN (0)
PMDIN (1)
PMDIN (2)
PMDIN (3)
20.3.12 BUFFERED SLAVE
CONFIGURATION
The Buffered Slave mode configuration is determined
automatically and dedicated to the PMP module when
the Buffered Slave mode is selected. The user only
need to configure the polarity of the PMCS1, PMRD
and PMWR signals.
The following example illustrates which control bits are
to be set for Buffered Slave mode configuration:
• Configure Buffered Slave mode bits -
MODE<1:0> (PMMODE<9:8>) = 00 and
INCM<1:0> (PMMODE<12:11>) = 11.
• Select PMRD “active-low” pin polarity -
RDSP (PMCON<0>) = 0.
• Select PMWR “active-low” pin polarity -
WRSP (PMCON<1>) = 0.
• Select PMCS2, PMCS1 “active-low” pin polarity -
CS2P (PMCON<4>) = 0 and CS1P
(PMCON<3>) = 0.
DS61143E-page 460
Preliminary
© 2008 Microchip Technology Inc.