PMP and LCDs

PMP and LCDs on the PIC32MZ

On this page

Code for this post

Using the Parallel Master Port (PMP) to drive an LCD

OK, finally have my latest development board soldered and working. Today I will talk about using the PIC32MZ to drive an LCD. In my case, the LCD is a 7" 800x480 LCD with a SSD1963 LCD controller chip embedded in it. I got it from BuyDisplay, if anyone's interested. In short, today I want to show you how to do this:

PIC32MZ - Using the PMP to drive an LCD

(Although hopefully you will have more sense than me and take the ugly screen protector off your LCD :) )

The Parallel Master Port (PMP) peripheral

So what is the PMP? Basically, it's an easy way to read or write lots and lots of data quickly to an external device. It can run in either 8bit or 16bit mode and supports up to a 16bit address so it's very useful for things like LCDs, cameras and external memory.

Important Note: In my example I'm using a separate Chip Select line and not making use of the internal PMCS1 and PMCS2. This is purely due to design limitations caused by the widely spaced layout of the PMP pins on the PIC32MZ.

TL;DR

But how is it different from just writing 16bits of data to LATB? The main difference is all the control signals that come with the PMP. The PMP provides two Chip Select (PMCS1 and PMCS2) lines, a Read Strobe (PMRD) and a Write Strobe (PMWR). This turns code like this:

// Send data
LATB = data;
// Toggle clock signal
LATASET = 1;
LATACLR = 1;
// Wait for LCD to be ready again
while (PORTAbits.RA1 == 1);

into this:

// Send data
PMDIN = data;
// Wait for LCD to be ready again
while(PMMODEbits.BUSY);

When you're talking about LCDs, like my 800x480 one, not having to manually handle clock signals can turn into a massive difference in throughput.

OK, let's get on with it. The important pins for PMP are:

  • PMD0 to PMD15 - The data pins
  • PMA0 to PMA15 - The address pins
  • PMCS1 and PMCS1 - The two Chip Select pins
  • PMWR and PMRD - The Write and Read strobe pins

Remember: The PMP runs off of Peripheral Bus Clock 2 (PBCLK2), so it will run at whatever speed that clock runs at

Here's how we initialise up the PMP:

    asm volatile("di");     // Disable all interrupts             

    PMCONCLR = 0x8000;      // Turn PMP peripheral off before setting it up
    PMAEN = 0;              // Disable all address bits
    PMAENSET = 1;           // Enable Address Bit 0 (PMA0)

    PMCONbits.WRSP = 0;     // Set Write Strobe polarity to active low
    PMCONbits.RDSP = 0;     // Ret Write Strobe polarity to active low
    PMCONbits.PTRDEN = 1;   // Enable Read Strobe (RS)
    PMCONbits.PTWREN = 1;   // Enable Write Strobe (WR)
    PMCONbits.ADRMUX = 0;   // No MUXing please, all 16-bits on PMD<0:15>
    PMCONbits.SIDL = 0;     // Continue operation in idle mode
    PMCONbits.CSF = 00;     // PMCS2 enabled, PMCS1 is PMA14
    PMCONbits.ALP = 0;      // Set Address Latch Polarity bit active low
    PMCONbits.DUALBUF = 0;  // Disable Dual Buffer mode (use PMDIN and PMADDR registers)

    PMMODEbits.IRQM = 1;    // IRQ at the end of the Read/Write cycle
    PMMODEbits.MODE16 = 1;  // 16-bit mode
    PMMODEbits.MODE = 0b10; // Master mode 2
    PMMODEbits.WAITB = 3;   // Maximum wait / slowest speed
    PMMODEbits.WAITM = 15;  // Maximum wait / slowest speed
    PMMODEbits.WAITE = 3;   // Maximum wait / slowest speed
    PMMODEbits.INCM = 00;   // Do not automatically increment address when writing

    PMCONSET = 0x8000;      // Turn PMP peripheral on
    asm volatile("ei");     // Enable all interrupts again

I always initially set the PMP to the slowest speed before I initialise LCDs to counter some issues I've experienced. Once I've initialised the LCD I find I can set the PMP back to maximum speed with no issues.

TL;DR

Master mode 2? MUXing?

The PMP has two master modes, cleverly named mode 1 and mode 2. The main difference is that in mode 1, the RD/WR strobes are combined into a single signal and there's another signal called PMENB that determines whether there's a read or a write happening. In master mode 2, they are on two separate pins (namely PMRD and PMWR) and PMENB isn't used. My LCD has two separate pins for read and write strobes so I need to use master mode 2.

Multiplexing is a fancy way of either partially or fully using the same pins for address and data. This can save space but in turn takes longer to process because you have to handle some of the signals. For my LCD I don't need address bit (I just use PMA0 to control the data/command pin of my LCD) so I definitely don't want to use multiplexing.

Once you've set it up, it's incredibly simple to use the PMP:

  • Wait for the PMP to be available
while(PMMODEbits.BUSY);
  • Write data to the PMP
PMDIN = data;

Bam, done. And now, we move onto the fun of using this with LCDs.

Using the PMP to drive an LCD

Before starting, when you want to use an LCD with the PIC32MZ you need to know various things:

  • What controller chip does your LCD use?
  • Is it running in 8bit or 16bit mode?
  • Does it work with 3.3V signals?
  • What strobe (clock) signals does it need?

In my example, I have the following LCD:

  • The controller chip is an SSD1963
  • 16-bit mode
  • Yes, it can run fine off of 3.3V signals and use 5V as a backlight supply
  • It needs separate Read and Write strobes

All LCDs have their own special initialisation code that they need to be fed before they initialise. You can usually find this code on the Internet by googling, for example, "ssd1963 init". Another good resource is the excellent UTFT library source code. In my example, you can see the code for the SSD1963.

IMPORTANT: Please remember that your LCD may have a Chip Select (CS) line that usually needs to be set low for it to work at all. It may not work at all if you forget this!

Anyway, once your LCD initialises, it will usually look something like this (again, hopefully without that incredibly ugly, peeling off, bubbly plastic screen protector):

PIC32MZ - An initialised LCD with an ugly old screen protector

If you've gotten this far, well done. You're actually almost done! Most LCDs have some way of setting the area you want to draw to. With my LCD, I have to do this every time I want to draw something, it doesn't wrap around. Look in the controller chip's manual for something about setting window or setting area.

OK, let's display an image. I'm using one of Tux from Linux, which I hope is a free image. If not, please contact me and I'll draw something in mspaint. I hope not though because my mspaint skillz suck. I got the image from Wikipedia. Before we can use this image, we need to convert it into a 16bit image in RGB565 format. We can do this at the same website we get UTFT from. Choose to output a .c file and it'll turn your image into a 16-bit array.

TL;DR

RGB565 is a way of representing Red, Green and Blue (RGB) data in 16 bits, using 5 bits for Red, 6 bits for Green and 5 bits for Blue. It's very different to the 24-bit or higher colour displays we use on our computers and the colour numbers are not interchangeable.

In my example, I've stored the data in an array called Tux. I draw the image on the screen like this:

    LCD_set_address(0,0,210-1,248-1);   // Tux image is 210 x 248 pixels, but we start at 0 so subtract 1 from each dimension
    LCD_write_command(0x2C);            // For the SSD1963 command 0x2C enables writing of pixel data
    PMADDR = 1;                         // PMADDR = 1 means writing data, not command
    for (cnt = 0; cnt < 210 * 248; cnt++)
    {
        PMP_wait();                     // Wait for the PMP to be free
        PMDIN = Tux[cnt];               // Send across 16bits of data
    }

One more thing: Many of the LCDs I've messed with only seem to get re-initialised when you power them on and off again, so you may or may not see the grainy test pattern if you simply do a soft reset. YMMV. Using this method I've managed to store rather big 800x480 16-bit images in the PIC23MZ's internal flash (in an array) and write them across to the LCD without any visible flicker or delay, which is much better than some of the awful examples you can find on YouTube. Have fun and good luck!

Here's the code

39 comments
  1. colle

    very nice work! for sure i'll give it a try. can you type the link for buy the LCD?
    for what i read is not too much different from the ILI9325 that i use with the 2.4 TFT display in my board..

    1. Aidan Author

      Hi, yes here is the link:

      https://www.buydisplay.com/...

      I bought the pin header 8080, capacitive touch panel and 5V power supply. I power it with 5V but the PIC32MZ works fine with it for data signals.

      It is very similar to the ILI9325 it's just huge and has a lot of pixels. It needs about 400mA for the backlight, so be prepared :)

      1. colle

        I'm still waiting for the display. In the meantime, what's the difference between PNP and EBI? reading the datasheet I suppose that I can also use EBI interface to drive an LDC, right?

        1. Aidan Author

          Hi,

          Still waiting? You mean you ordered it and it hasn't arrived yet? If you used the cheaper shipping it takes some time but you might be able to track it and see where it is.

          EBI can be used for LCD too but it's more complicated than PMP so I just use PMP. EBI is good for connecting to things like parallel SRAM and flash memory because it is faster and can be used to expand your memory pool. So for example if you connected an 8MB SRAM your PIC would effectively have 8MB + 512kB of RAM.

          SQI can also do this, it has a mode called eXecute In Place (XIP). I'm my SQI post I will cover this. Making a post on DMA soon.

          1. colle

            yes, hasn't arrived yet..
            can you upload the schematic for connect this display to the PIC? just to be sure to make all in the right way.
            i'm also curious about DMA!!

            1. Aidan Author

              Here are the connections from my LCD to my PIC32 board, and for the code on this post:

              C/S - RG9
              D/C - PMA0 (RJ15)
              E_RD - PMRD (RC4)
              W_WR - PMWR (RC3)
              RESET - RA5
              TE - Not Connected
              D0 - PMD0 (RE0)
              D1 - PMD1 (RE1)
              D2 - PMD2 (RE2)
              D3 - PMD3 (RE3)
              D4 - PMD4 (RE4)
              D5 - PMD5 (RE5)
              D6 - PMD6 (RE6)
              D7 - PMD7 (RE7)
              D8 - PMD8 (RG0)
              D9 - PMD9 (RG1)
              D10 - PMD10 (RF1)
              D11 - PMD11 (RF0)
              D12 - PMD12 (RD12)
              D13 - PMD13 (RD13)
              D14 - PMD14 (RD2)
              D15 - PMD15 (RD3)
              BL ON/OFF - RD6

              The DMA code is coming soon, give me a few days.

              1. colle

                Is there a particular reason to use the D/C on PMA0 line? or can i use a normal I/O? by reading the code you use PMADDR = 1 or 0 for declare data or command to be sent. is there some difference if i use PORTx = 1 or 0??

                1. Aidan Author

                  No, you can use whichever PORTx pin you like. I just used PMA0 because it was convenient for me.

                  1. colle

                    Hi Aidan, i'm experimenting with PMP and LCD ( ILI9325 at the moment). why you did't use the PMCS2 PIN in your code to drive the CS line?

                    1. Aidan Author

                      I used to use it but I had no space to route it on my dev board so I changed it to something else.

  2. Nic

    Hey Aidan,
    Wow I would never be this far along without you. Thank You! Before I start designing my PCB. I need to pick out a LCD. I need to go wire less, The stone has some wire less LCD. Do you have any thoughts about wire less LCDs?

    1. Aidan Author

      Hi Nic, I don't know about wireless LCDs. How do you communicate with the lcd from the pic32?

      1. Nic

        Hi Aidan,
        Well I have been looking into that, I like the RTl8711AF.
        What I like best, is the two functions;

        One Transmit and one Receive path (1T1R) I think this would run the LCD
        802.11b/g/n compatible WLAN This would run WIFI
        Here's a link to the data sheet
        https://datasheet4u.com/dat...

        I hope you find it compatible with 32MZ. Here's a link for the development board

        https://www.ebay.com/itm/1P...

        When I was surfing I found the development board cheaper. With your knowledge of programming I am confident that you can tell me the difficulty and compatibility with 32MZ.

        1. Aidan Author

          Hi Nic

          The board looks very nice but I wonder why you wouldn't go with an esp32 instead? The esp32 has a big community around it so you can google for information much easier.

          1. Nic

            Hi Aidan,
            No need to wonder Aidan, it's lack of experience. Thanks for the input (esp32)! I just could not stop reading the data sheet, very impressive and informative. I learned about OTT and I can go on and on.
            Thanks again, I have a lot to do later.

  3. colle

    in my experiments i found out that PMP is not faster than using an 16bit port and manage the CS/RS/WR pin..
    drowing 320x240px takes 9.6ms in "port" mode and 12ms in 16bit PMP mode with all the waiting settings to 0..
    on the other hand PMP is easy to use.
    i tryed it on m ILI9325 LCD.... i'm still waiting the 7" 800x480

    1. Aidan Author

      That's very weird. At 12ms that's 83fps for 320x240 16bit. So that's 12.7MB/s. Here I'm getting 17MB/s using PMP. I'll look into that.

      I have never waited so long for a display to arrive, even with the cheap postage option. Did you contact them and does it have any tracking number?

  4. Nic

    Hello Aidan,
    Very cold here, quick question are you still planning to post your evaluation board? If so, will it be in a Gerber file.
    Hope everything is going well!

    1. Aidan Author

      Hi Nic,

      Pretty cold here too and busy too.

      Yep, I will upload my files once I've verified that some stuff works. I will be uploading the Gerber files too. Be warned: It's not the greatest, prettiest or best designed board in the world, but it does work with all my code. It was made to fit as much as I could put into a 100mm x 100mm board so I could get it made cheaply :) The next few days are a holiday here but hopefully next week some time I'll have enough time to clean up the files and upload them.

      Hope everything's going well for you too.

  5. Nic

    Well Happy Lunar New Year Aidan,
    Just to give you a FYI and maybe you can tell me what you think. My project demands ADC. So working with the ADC I ran into compiling problems.
    Configuration Bits: address 0x1FC0FFC4: FPLLRNG = 7 does not match any valid value in the device database.
    Configuration Bits: address 0x1FC0FFC8: DMTCNT = 31 does not match any valid value in the device database.
    So it compiles, however the phase lock loop isn't running (I think) consequently it doesn't run the pic. I know nothing about the Deadman pragma.
    In the forum;
    https://www.microchip.com/f...
    They write about, but I'm back to a one legged man in a kicking contest.

    1. Aidan Author

      Hi Nic,

      Happy Lunar New Year to you too.

      FPLLRNG can't be set to 7, that may well explain why yours isn't working. I usually set it to 1, which means input signal is 5 to 10MHz. There's another config setting called PLLIDIV to divide your incoming clock signal.

      As far as I can tell inly the first 4 bits of DMTCNT are used so 31 would also not fit in.

      Is there a special reason you have tried these values? Why not just use the settings I use in my example code?

      1. Nic

        Hi Aidan,
        I just check my pragma's

        // DEVCFG3
        // USERID = No Setting
        #pragma config FMIIEN = ON // Ethernet RMII/MII Enable (MII Enabled)
        #pragma config FETHIO = ON // Ethernet I/O Pin Select (Default Ethernet I/O)
        #pragma config PGL1WAY = OFF // Permission Group Lock One Way Configuration (Allow multiple reconfigurations)
        #pragma config PMDL1WAY = OFF // Peripheral Module Disable Configuration (Allow multiple reconfigurations)
        #pragma config IOL1WAY = OFF // Peripheral Pin Select Configuration (Allow multiple reconfigurations)
        #pragma config FUSBIDIO = OFF // USB USBID Selection (Controlled by Port Function)

        // DEVCFG2
        #pragma config FPLLIDIV = DIV_1 // System PLL Input Divider (3x Divider)
        #pragma config FPLLRNG = RANGE_5_10_MHZ // System PLL Input Range (5-10 MHz Input)
        #pragma config FPLLICLK = PLL_POSC // System PLL Input Clock Selection (POSC is input to the System PLL)
        #pragma config FPLLMULT = MUL_50 // System PLL Multiplier (PLL Multiply by 50)
        #pragma config FPLLODIV = DIV_2 // System PLL Output Clock Divider (2x Divider)
        #pragma config UPLLFSEL = FREQ_24MHZ // USB PLL Input Frequency Selection (USB PLL input is 24 MHz)

        // DEVCFG1
        #pragma config FNOSC = SPLL // Oscillator Selection Bits (System PLL)
        #pragma config DMTINTV = WIN_127_128 // DMT Count Window Interval (Window/Interval value is 127/128 counter value)
        #pragma config FSOSCEN = OFF // Secondary Oscillator Enable (Disable SOSC)
        #pragma config IESO = OFF // Internal/External Switch Over (Disabled)
        #pragma config POSCMOD = OFF // Primary Oscillator Configuration (External clock mode)
        #pragma config OSCIOFNC = OFF // CLKO Output Signal Active on the OSCO Pin (Disabled)
        #pragma config FCKSM = CSECME // Clock Switching and Monitor Selection (Clock Switch Enabled, FSCM Enabled)
        #pragma config WDTPS = PS1048576 // Watchdog Timer Postscaler (1:1048576)
        #pragma config WDTSPGM = STOP // Watchdog Timer Stop During Flash Programming (WDT stops during Flash programming)
        #pragma config WINDIS = NORMAL // Watchdog Timer Window Mode (Watchdog Timer is in non-Window mode)
        #pragma config FWDTEN = OFF // Watchdog Timer Enable (WDT Disabled)
        #pragma config FWDTWINSZ = WINSZ_25 // Watchdog Timer Window Size (Window size is 25%)
        #pragma config DMTCNT = DMT31 // Deadman Timer Count Selection (2^31 (2147483648))
        #pragma config FDMTEN = OFF // Deadman Timer Enable (Deadman Timer is disabled)

        // DEVCFG0
        #pragma config DEBUG = OFF // Background Debugger Enable (Debugger is disabled)
        #pragma config JTAGEN = OFF // JTAG Enable (JTAG Disabled)
        #pragma config ICESEL = ICS_PGx1 // ICE/ICD Comm Channel Select (Communicate on PGEC1/PGED1)
        #pragma config TRCEN = OFF // Trace Enable (Trace features in the CPU are disabled)
        #pragma config BOOTISA = MIPS32 // Boot ISA Selection (Boot code and Exception code is MIPS32)
        #pragma config FECCCON = OFF_UNLOCKED // Dynamic Flash ECC Configuration (ECC and Dynamic ECC are disabled (ECCCON bits are writable))
        #pragma config FSLEEP = OFF // Flash Sleep Mode (Flash is powered down when the device is in Sleep mode)
        #pragma config DBGPER = PG_ALL // Debug Mode CPU Access Permission (Allow CPU access to all permission regions)
        #pragma config SMCLR = MCLR_NORM // Soft Master Clear Enable bit (MCLR pin generates a normal system Reset)
        #pragma config SOSCGAIN = GAIN_2X // Secondary Oscillator Gain Control bits (2x gain setting)
        #pragma config SOSCBOOST = ON // Secondary Oscillator Boost Kick Start Enable bit (Boost the kick start of the oscillator)
        #pragma config POSCGAIN = GAIN_2X // Primary Oscillator Gain Control bits (2x gain setting)
        #pragma config POSCBOOST = ON // Primary Oscillator Boost Kick Start Enable bit (Boost the kick start of the oscillator)
        #pragma config EJTAGBEN = NORMAL // EJTAG Boot (Normal EJTAG functionality)
        #pragma config CP = OFF // Code Protect (Protection Disabled)

        //----------------------------------------------------------
        // BF1SEQ0
        //----------------------------------------------------------
        #pragma config TSEQ = 0x0000
        #pragma config CSEQ = 0xFFFF

        So I changed FPLLIDIV = DIV _1 because the explorer1632 has a 8Mhz on broad. I replaced the explorer1632 and the pic32 PIM and the pic still will not run. It was running until I start with ADC.

        1. Aidan Author

          Hi Nic,

          Is it using an 8MHz external clock? If so, you need to set POSCMOD = EC. If it still doesn't work, post the code here and I'll have a look but replies may be a bit slow due to the holiday weekend.

          1. Nic

            Hi Aiden,
            I have copied the link in drop box here is the link:
            https://www.dropbox.com/s/e...

            1. Aidan Author

              Hi Nic,

              I can't test code so I'm just reading over it. Some things to fix:

              In set_performance_mode() you need to move this line (just the one line):
              set_performance_mode();

              That line *must* be moved to your main() function or the interrupts will never work because that's where you set INTCONbits.MVEC and PRISS. Without setting PRISS your program will just crash and without setting INTCONbits.MVEC your interrupts won't work.

              While setting the timers to the same priority (IP) might work, why not set them to different priorities?
              in init_timer2:
              IPC2bits.T2IP = 2; // interrupt priority 2

              and then the ISR too:
              void __attribute__((interrupt(ipl2srs), vector( _TIMER_2_VECTOR), nomips16)) timer2_handler()

              Hopefully this will fix your issues.

              1. Nic

                Hi Aiden, Sorry I have not gotten back to you, been busy with other things, I am still having issues I have attached the changes I made:
                https://www.dropbox.com/s/e...
                Nic

                1. Aidan Author

                  No problem Nic, still on holiday here too. Where are all the pragma config lines?

                  1. Nic

                    1. Aidan Author

                      You've made a small mistake in this line:

                      #ifdef NICS_CONFIG_H

                      This must be changed to:

                      #ifndef NICS_CONFIG_H

                      (Notice the "n" after "if"). In your program the pragma config lines are never called which can easily cause nothing to work. Hopefully this will make something happen, I am still on holiday so can't test the code.

                      1. Nic

                        Aidan,
                        You did it again! The "n" solved the problem. Interesting, the "n" has been missing from the start.
                        You had me put "NICS_CONFIG_H" to make it run the first time. I know I type it wrong then, but it run anyway.

                        So I'm working on the ESP32 with a Nextion display very cool.
                        Thanks again, write you so.

                        1. Aidan Author

                          That's great news Nic, well done. I'm glad it's working. Good luck with the ESP32!

  6. colle

    hi,
    i received my display and i'm doing some tests. all works fine with PMP connection and manual CS enabled PIN. but i cant get it works with CS controlled by PMP. i use CS2 so i canged your PMP init like this:

    PMAEN = 0x8000; //PMA15 as PMA or CS, PMA0 ~ PMA 14 as I/O
    PMCONbits.CSF = 1; // PMCS2 enabled, PMCS1 disabled
    PMADDRbits.CS2 =1; // CS2 active

    i can see that che CS is working via oscilloscope but the LCD does not work..

    any ideas?

    Solved!! Wrong I/o settings

    1. Aidan Author

      Hi colle,

      Glad you got it to work!

  7. colle

    HI,
    Here are my results after a few days of testing:
    Clearing the whole display takes 38ms in 16 bit PORTB connection and 57ms via PMP.
    Put a 800*480 BMP on screen takes 355ms in 16bit PORT connection ad SD@25MHz and 349ms in PMP and SD@ 25MHz.
    so PMP seems to be faster when reading from SD. I can't try PORT B and SD card @50Mhz. But PMP and SDcard @50Mhz takes 224ms for display the BMP image

    https://uploads.disquscdn.c...

    1. Aidan Author

      Hi colle,

      Yeah, part of the reason that reading from SD and putting it on the LCD takes so long is that you can't read the whole BMP in at one go because it's too big for RAM, which makes everything quite a bit slower.

      For the 800x480 BMPs that I use as background images I usually put into arrays that are stored in the PIC32's flash memory. The slow part is the SD card reads. For PMP I've gotten up 17MB/s just from array to LCD but when you start adding in the SD card things slow down a lot.

      Still, glad you got it working.

  8. colle

    HI,
    A question about the backlight. the datasheet says
    J4 SHORT-J3 OPEN backlight from SSD1963
    J4 OPEN-J3SHORT backlight from external.

    but.. to me it seems that J3 and J4 are swapped. i mean, by default J4 is short and J3 open but the backlight is controlled by the external pin.. did you see that as well?

  9. colle

    Hi Aidan
    I'm playing again with this TFT and I'm trying to use it in various mode:
    - 8 bit data bus RG888 (3 writes per pixel)
    - 16 bit data bus RBG565 (1 write per pixel)
    - 16 bit data bus RGB888 (3 writes per pixel)

    the first 2 modes work fine but the third one works fine for fill the display or draw lines and geometrical figures but I can't get it to work for text and image BMP from SD card (BMP 24bit rgb888)

    what i've done is change the pixel data interface (command 0xF0) to 0x00 for 8 bit, 0x03 for 16 bit rgb565 and 0x02 for 16 bit rgb888
    and ofcourse i've changed the data send (pixel) to send 0xRRGG, 0xBBRR and 0xGGBB as described in the datasheet.

    as I said, fill the whole display with one color is fine but text and image no..

    any ideas?

    Edit: also 12 bit RGB 888 works fine.. can't understand why 16bit RGB 888 don't work

  10. Matteo Ginhson

    Hi Aidan. I'm an electronics students, and I'm about to start a project that requires using a TFT LCD. I ended up choosing a screen with an SSD1963, and I now need to pick a microcontroller. I'm between the PIC24F and the PIC24H family. The main difference between the two families is, as far as I understand, that the H family is meant for performance, and can get more or less double the MIPS per MHz. However, by your blog I learnt that I can actually use the PMP module to send the commands and the control signals to the SSD, and I wouldn't have to worry about toggling the WR or RD pins by hand with the PMP. However, some people in the comments said that it was actually faster to not use the PMP, and just do it by hand. I wanted to ask what was your take on that, since, even though the H family seems better, it supposedly lacks the PMP module, so I wanted to see if it was worth downgrading to the F family for having the PMP, or if I would just be better off doing it by hand with higher MIPS. Thanks in advance!

    1. Aidan Author

      Hi Matteo,

      I would say it depends on what your project is. For me, I like to use DMA to transfer data to the LCD in the background and I find it convenient to use PMP. Sadly, at 800x480x16bit it’s impossible to do full-screen updates every frame. It does seem to be faster to do it via the ports manually but like I say, I’m using DMA to do it in the background while I work on other stuff (MP3 decoding or whatever) in the foreground. I guess I could use DMA to Port B but I never needed to try it, this was mainly a tutorial on how to use the PMP module :)

      If you’re going to do direct manipulation then get the better H series, in my opinion.

Comments are hosted by Disqus, which loads only when you ask for it.