Getting Started: Running the “Color Depth Demo”
PIC24FJ256DA210’s built in graphics controller features a color palette or look up table (CLUT). When using the CLUT the PIC24FJ256DA210 can be used as a single chip solution for embedded graphics applications that will use 8BPP color depth and run on QVGA displays or smaller. The demo configures the PIC24FJ256DA210 for 1BPP, 4BPP and 8BPP color depths. The demo runs with two screens. Except for the 1BPP color depth mode, each screen will use a different color palette. Pressing on the icon will switch from one screen to another. Each screen uses a different palette.
The color depth can be changed by setting the macro
#define COLOR_DEPTH X
Where: X can be set to 1, 4 or 8.
Under the “Resources” folder there are sub-folders. Each sub-folder contains the resources used for each color depth.
The xml file(s) in each sub-folder were used to generate the resources for the demo.
In each color depth mode, there are two xml projects, the compressed images and uncompressed images. The compressed images will use the IPU module of the PIC24FJ256DA210 while the uncompressed images will render the images directly without IPU. Open the xml projects in "Graphics Resource Converter" utility to see which files are loaded for each color depth modes.
· InternalResourceColorDepth_XBPPMode.xml – resources loaded to internal flash memory with images NOT compressed.
· InternalResourceColorDepth_XBPPModeCompressed.xml – resources loaded to internal flash memory with images compressed
IPU usage can be enabled by enabling the macro below in GraphicsConfig.h
#define USE_COMP_IPU
When using the IPU, the compressed and decompressed buffers are enabled. These buffers can be placed anywhere in EDS memory. For the demo, the hardware profile used places the buffers in External RAM. The reason they are placed in external RAM is because there may not be enough memory for the buffers to fit in the internal 96K RAM. For 1 bpp and 4 bpp, it may fit in the internal memory. For simplicity of the code the compressed and decompressed buffers are placed in External RAM.
The demo can be run using the WQVGA or QVGA display when using the PIC24FJ256DA210 Development Board (DM240312). This is set in the project HardwareProfile.h file by adding the corresponding Graphics hardware profile.
· For with uncompressed images with QVGA display use:’
#include "Configs/HWP_DA210_BRD_16PMP_INT_QVGAv1.h”
· For with uncompressed images with WQVGA display use:
#include "Configs/HWP_DA210_BRD_16PMP_INT_WQVGAv1.h”
· For with compressed images with QVGA display use:’
#include "Configs/HWP_DA210_BRD_16PMP_INT_IPU_QVGAv1.h”
· For with compressed images with WQVGA display use:
#include "Configs/HWP_DA210_BRD_16PMP_INT_IPU_WQVGAv1.h”
For the hardware profiles used for compressed images there are lines that declare the location of the buffers:
· #define GFX_DECOMPRESSED_DATA_RAM_ADDRESS (GFX_EPMP_CS1_BASE_ADDRESS)
· #define GFX_COMPRESSED_DATA_RAM_ADDRESS (GFX_DECOMPRESSED_DATA_RAM_ADDRESS + GFX_DECOMPRESSED_BUFFER_SIZE)
The hardware profile file name refers to the combination of Development Boards that are used to run the demo. Refer to the abbreviations summary (link) for details.
The table below shows the hardware set up for the selected Development Boards attached to different Display Boards:
Required Hardware/Configuring the Hardware
Selected Development Boards |
Graphics PICtail Board |
3.2″ QVGA Truly TFT Display Board (AC164127-4) |
4.3″ WQVGA Powertip TFT Display Board (AC164127-6) |
PIC24FJ256DA210 Development Board (DM240312) |
none |
✓ (see note 1) |
✓ (see note 1) |
Note: 1. When using PIC24FJ256DA210 Development Board set the jumpers to: - JP8 – open (color depth is 16BPP, byte access is not performed) - JP9 – set to 1-2 (use Y- signal) - JP10 – set to 1-2 (use X+ signal) - JP11 – don’t care - JP12 – don’t care - JP23 – set to 2-3 (use SPI Flash) - JP13 – don’t care (or set to default RG8-S1) - JP14 – don’t care (or set to default RE9-S2) - JP15 – don’t care (or set to default RB5-POT(RB5)) - JP16 – don’t care (or set to default USART_TX-TX) - JP17 – don’t care (or set to default USART_RX-RX)
|
Legend: |
|||
✓ |
Supported out of the box |
☒ |
Hardware compatible, will need firmware modification |
☑ |
Supported, see limitations |
✗ |
Not supported, hardware not compatible |
Trademarks:
The Microchip name and logo, the Microchip logo, MPLAB, and PIC are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
PICDEM and PICTail are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
SD is a trademark of the SD Association in the U.S.A and other countries
Microsoft, Windows, Excel, and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.