GFX_DISPLAY_BUFFER_LENGTH Macro

Microchip Graphics Library

Microchip Graphics Library
GFX_DISPLAY_BUFFER_LENGTH Macro
C
#define GFX_DISPLAY_BUFFER_LENGTH 0x00025800ul            // <COPY GFX_GCLK_DIVIDER>
Overview

The following are additional Hardware Profile macros used when using the driver for the Microchip Graphics Module that comes with the PIC Microcontroller (PIC24FJ256DA210 Device Family) (PIC24FJ256DA210_DEV_BOARD).

  • When using internal or external memory
    • GFX_GCLK_DIVIDER - Set the clock divider for the pixel clock.
    • GFX_DISPLAY_BUFFER_START_ADDRESS - Set the Display Buffer location.
    • GFX_DISPLAY_BUFFER_LENGTH - Set the Display Buffer length (size) in bytes. This is calculated by the display's width*height*(color depth/2).
  • When using external memory only. External memory may be placed in chip select 1 (CS1) and/or chip select 2 (CS2) regions. Refer to EPMP Family Reference Manual for details on how to use EPMP for graphics applications.
If the display buffer is located in external memory (i.e in PIC24FJ256DA210) then the memory requirement for the graphics use must fit into the chip select region size. The table below summarizes the requirements.

Buffer Name 
Enabled Features 
External Memory Required 
Display Buffer Location 
none 
EQ1 
chip select 1 region. 
EQ2 
chip select 1 region. 
EQ3 
chip select 1 region. 
none 
EQ4 
chip select 2 region. 
EQ5 
chip select 2 region. 
EQ6 
chip select 2 region. 

 

Equation 
Description 
EQ1 
GFX_EPMP_CS1_MEMORY_SIZE >= GFX_DISPLAY_BUFFER_LENGTH 
EQ2 
GFX_EPMP_CS1_MEMORY_SIZE >= (GFX_DISPLAY_BUFFER_LENGTH*2) 
EQ3 
GFX_EPMP_CS1_MEMORY_SIZE >= (GFX_DISPLAY_BUFFER_LENGTH*2) + GFX_COMPRESSED_BUFFER_SIZE + GFX_DECOMPRESSED_BUFFER_SIZE 
EQ4 
GFX_EPMP_CS2_MEMORY_SIZE >= GFX_DISPLAY_BUFFER_LENGTH 
EQ5 
GFX_EPMP_CS2_MEMORY_SIZE >= (GFX_DISPLAY_BUFFER_LENGTH*2) 
EQ6 
GFX_EPMP_CS2_MEMORY_SIZE >= (GFX_DISPLAY_BUFFER_LENGTH*2) + GFX_COMPRESSED_BUFFER_SIZE + GFX_DECOMPRESSED_BUFFER_SIZE 
Microchip Graphics Library Version 3.06.02 - October 15, 2012
Copyright © 2012 Microchip Technology, Inc.  All rights reserved