Getting Started: Running the “Graphics Image Decoder Demo”
This demo project is created to run on supported Microchip Demo Boards and development hardware. External data are programmed to the external SPI Flash memory of the selected hardware. Pre-generated hex files are available on the "Precompiled Hex” sub-directory found in the demo directory. These hex files are generated using the alternative hardware profiles found in the sub-directory named "Configs". Use the "Demo Compatibility Matrix" when running pre-generated hex files appropriate for your hardware.
For proper demo execution, the ExternalResource-ImageDecoder.hex file in "Resources” folder must be programmed into external flash memory installed on the selected hardware.
Please refer to the Getting Started - Programming Memory on Graphics PICtail Daughter and Demo Boards.htm for details of setting up the hardware for external memory programming.
This demo shows how images stored in internal flash and external memory are accessed and displayed to the screen. The images stored in the internal and external memory are generated using the "Graphics Resource Converter" utility. JPEG files are added as C arrays for the internal flash and as Intel HEX file for the external memory. All C files generated by the utility must be added in your project. Intel HEX file must be programmed as explained above.
The header file for the external memory access driver must be added into JPEGImage.h. In the external memory access driver the data array reading function must be implemented. The function must be specified in JPEGImage.h file (see the header file for details).
The “Resources” folder also contains the xml project used to generate the images stored in the internal flash and external memory. Open the following files in "Graphics Resource Converter" utility to see which files are loaded from internal flash or external memory.
· InternalResourceImageDecoder.xml
· ExternalResource-ImageDecoder.xml
To run the demo in the supported Development Board combination, set the proper hardware profile in the project HardwareProfile.h file:
· To run the demo on selected Development Boards using QVGA display use:
#include "Configs/HWP_XXX_QVGAv1.h”
· To run the demo on selected Development Boards using WQVGA display use:
#include "Configs/HWP_XXX_WQVGAv1.h”
· To run the demo on Multimedia Expansion Board use:
#include "Configs/HWP_MEB_XXX.h”
Where: XXX represents any of the selected Development Boards.
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) |
5.7″ VGA Truly TFT Display Board (AC164127-8) |
PIC24FJ256DA210 Development Board (DM240312) |
none |
✓ (see note 1) |
✓ (see note 1) |
☒ (see note 4) |
Multimedia Expansion Board (DM320005) + PIC32 USB Starter Kit II (DM320003-2) OR PIC32 Ethernet Starter Kit (DM320004) OR PIC32 Starter Kit (DM320001) |
none |
☑ (see note 2) |
✗ |
✗ |
Explorer 16 (DM240001) + PIC24FJ128GA010 Plug-In-Module (PIM) (MA240011) OR PIC24FJ256GA110 Plug-In-Module (PIM) (MA240015) OR PIC24FJ256GB110 Plug-In-Module (PIM) (MA240014) OR PIC24FJ256GB210 Plug-In-Module (PIM) (MA240021) OR PIC24HJ128GP504 Graphics Plug-In-Module (PIM) (MA240016-2) OR dsPIC33FJ128GP804 Graphics Plug-In-Module (PIM) (MA330019-2) OR PIC32MX 100P QFP TO 100P Plug-In-Module (PIM) (MA320001) OR PIC32MX USB Plug-In-Module (PIM) (MA320002) OR PIC32MX CAN-USB Plug-In-Module (PIM) (MA320003) |
Graphics LCD Controller PICtail™ Plus SSD1926 Board (AC164127-5) (see note 3)
|
✓ |
✓ |
✗ |
Explorer 16 (DM240001) + PIC24EP512GU810 Plug-In-Module (PIM) (MA240025-1) OR dsPIC33EP512MU810 Plug-In-Module(PIM) (MA330024-1) |
Graphics LCD Controller PICtail™ Plus SSD1926 Board (AC164127-5) |
☒ |
☒ |
✗ |
Note: 1. When using PIC24FJ256DA210 Development Board set the jumpers to: - JP8 – don’t care (color depth is 16BPP, byte access is not performed) - JP9, JP10, JP11, JP12, JP13, JP15, JP23 – don’t care - JP14 – set to RE9-S2 (use S2 switch) 2. The Multi-Media Expansion Board and the 3.2″ QVGA Truly TFT Display Board (AC164127-4) uses the same TFT display. 3. When using Graphics LCD Controller PICtail™ Plus SSD1926 Board set the jumpers to: - JP1 – open - JP2 – depending on the PMP interface setting - set to 1-2 (for 8-bit PMP) - set to 2-3 (for 16-bit PMP) - JP3 – set to 1-2 (use RD1) 4. To run this demo on the 5.7″ VGA Truly TFT Display Board (AC164127-8) with the PIC24FJ256DA210 Development Board at 16 bpp color depth, the refresh rate of the display must be set to 32 Hz instead of 60 Hz. 5. The demo is not limited to the selected display boards used here. Other display boards can be used with the appropriate hardware profiles.
|
Legend: |
|||
✓ |
Supported out of the box |
☒ |
Hardware compatible, will need firmware modification |
☑ |
Supported, see limitations |
✗ |
Not supported, hardware not compatible |
Setting up the External Memory Programming Mode
The table below shows the programming mode used for each project.
· UART means, the UART port of the PIC device is used to send external hex data.
· USB means, the PIC device will act as a USB Device and external data will be sent through the USB Device port.
Project Name(*.mcp) |
Programming Mode |
Image Decoder Demo dsPIC |
UART |
Image Decoder Demo UART PIC24 |
UART |
Image Decoder Demo UART PIC32 |
UART |
Image Decoder Demo USB PIC24 |
USB |
Image Decoder Demo USB PIC32 |
USB |
For each development board and PIC device combination, the PRG switch (or push button) used in each development board to prompt the external memory programming is different and enumerated below.
Development Board |
Switch to Prompt Flash Programming Mode (PRG switch) |
PIC24FJ256DA210 Development Board |
S2 |
Explorer 16 + PIC24FJ256GB210 PIM + 16bit PMP Mode |
S5 |
Explorer 16 + any PIC32 PIM + 16bit PMP Mode |
S5 |
Explorer 16 + all other PIM |
S6 |
To program the external memory:
1. Hold down MCLR and PRG (see table above) switches on the board
2. Release MCLR while holding down PRG. This will place the board on programming mode. The display will show the user prompted Programming External Memory Message.
3. Send the hex data from the External Memory Programmer utility.
4. After the programming, the firmware will automatically reset. If there was an error in the programming the screen will show the invalid data Programming External Memory Message.
Programming External Memory Messages |
|
User Prompted |
Program External Data
Please send data using “External Memory Programmer” utility. Now waiting for data via USB… (for USB based projects) via UART… (for UART based projects)
|
Invalid Data Prompted |
External data invalid
Please send data using “External Memory Programmer” utility. Now waiting for data via USB… (for USB based projects) via UART… (for UART based projects)
|
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.