Results 1 to 3 of 3

Thread: Use CFAF320240F-T with a PIC32's PMP?

  1. #1
    Join Date

    Use CFAF320240F-T with a PIC32's PMP?


    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.

  2. #2
    Join Date
    Western WA, USA
    "PIC32" is a little vague. Got an actual part number for the cpu?
    Infinity or Bust

  3. #3
    Join Date
    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).


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts