Use CFAF320240F-T with a PIC32's PMP?


New member

I am trying to increase the speed of data transfer to my CFAF320240F-T my using the PIC32's PMP (Parallel Master Port). I have the display configured to use 8-bit 8080 mode, and have been successful controlling the display using the 8-bit demo code provided by Crystalfontz.
My problem is that once I enable the PMP, it stops wortking. Here is my PMP initialization code:
// PMP setup 
PMMODE = 0; PMAEN = 0; PMCON = 0;
PMMODEbits.MODE   = 2;  // Intel 80 master interface
PMMODEbits.WAITB  = 0;
PMMODEbits.WAITM  = 0;
PMMODEbits.WAITE  = 0;
PMMODEbits.MODE16 = 0;  // 8 bit mode
PMCONbits.PTRDEN = 1;  // enable RD line
PMCONbits.PTWREN = 1;  // enable WR line
PMCONbits.PMPEN  = 1;  // enable PMP
And my Write_Command and Write_Data functions (these are only used once the PMP is enabled, which happens AFTER LCD Initialization. The initialization uses the normal methods from the CF demo code):
void Write_Command(unsigned int command)
	PMDIN = command;

void Write_Data(unsigned int data)
	PMDIN = data;
My LCD data lines are connected to PMD0-PMD7, and for the control lines:
Write/Read -> PMWR
Read Strobe -> PMRD
Chip Select -> PMCS2
Chip Reset -> PORTD.1 (general I/O)
Data/Command -> PORTD.2 (general I/O)

My concern is just that I haven't used the PMP much and I'm afraid I have something hooked up wrong or my code is wrong, etc.
If anyone has any insight, I would really appreciate it.
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.


New member
It's a PIC32MX440F256H, but I solved my problem. The RD and WR polarity needed to be set to active low, and PMMODEbits.WAITM needed to be set to 0b0001 (it was too fast for the LCD at first).