Getting Started: Running the “Graphics MultiApp Demo”
For proper demo execution, the ResourcesExternalSPIFlash.hex file in "Graphic 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. To enable the programming mode of this demo refer to the flash programming instructions on this document.
The demo runs from two main menu screens, with Figure on top appearing on power-up as the default screen. Navigation between the two menu screens is done with the arrows in the screen’s lower right corner. A total of 10 interactive demos are provided in the application. Touching the appropriate icon invokes that demo. Touching the “Demo” button in the lower left of either menu screen runs a continuous loop of several of the demos. Touching “Exit”, generally in the lower left of any of the demos, returns to the menu screen.
The demos available on the first screen are:
· Lighting: this demonstrates a lighting control terminal application. Using the touch screen, sliders and buttons are provided to vary the red, green and blue lighting colors.
· Language: this shows how multiple languages can be integrated into one application. Text examples in Roman, Cyrillic, simplified Chinese, Japanese and Korean alphabets are shown.
· Game: this is a simple, interactive adaptation of a “snake” video game. Its operation is self-explanatory.
· Animation: this shows animation of stored graphics, along with image scaling and interactivity.
· Drawing: this demo implements free-hand drawing with a selectable color palette using the touch screen.
· ECG: this simulates an electrocardiogram display, demonstrating how analog data can be used to produce a graphic output. The “Ext” option switches between the fixed ECG display and a graphing display based on the potentiometer’s position.
The demos available from the second screen are:
· Clock: this is a simple numeric date and time display, based on the microcontroller’s RTCC.
· Graph Demo: this demo uses the Chart widget from the Microchip Graphics Library to generate a wide range of bar and pie charts based on a fixed set of data.
· External Flash: this demo shows images or pictures stored in the on-board Flash memory.
· Thumb Drive: This portion is enabled when using the PIC devices with USB module. The demo uses the USB Host interface to read a thumb drive connected to the USB port and scan it for graphics files (JPEG or BMP formats only). The application then produces a directory of graphics images, and displays the corresponding file when selected.
· SD Card Demo: This portion is enabled when using the PIC devices with no USB module. The demo uses the MDD File System to read an SD Card connected to a SD & MMC PICtail PlusTM Daughter Board (AC164122) and scan it for graphics files (JPEG or BMP formats only). The application then produces a directory of graphics images, and displays the corresponding file when selected.
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.
· InternalResourceMultiApp.xml – resources placed in internal flash.
· InternalResourceMultiAppSet2 – resources placed in internal flash when the external memory is not available.
· ExternalResourceMultiApp.xml – resources placed in external SPI flash.
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 with SD Card as a Mass Storage Device on selected Development Boards using QVGA display use:
#include "Configs/HWP_XXX_SDMSD_QVGAv1.h”
· To run the demo with SD Card as a Mass Storage Device on selected Development Boards using WQVGA display use:
#include "Configs/HWP_XXX_SDMSD_WQVGAv1.h”
· To run the demo with USB Thumb Drive as a Mass Storage Device on selected Development Boards using QVGA display use:
#include "Configs/HWP_XXX_USBMSD_QVGAv1.h”
· To run the demo with USB Thumb Drive as a Mass Storage Device on selected Development Boards using WQVGA display use:
#include "Configs/HWP_XXX_USBMSD_WQVGAv1.h”
· To run the demo with SD Card as a Mass Storage Device on Multimedia Expansion Board use:
#include "Configs/HWP_MEB_XXX_SDMSD.h”
· To run the demo with USB Thumb Drive as a Mass Storage Device on Multimedia Expansion Board use:
#include "Configs/HWP_MEB_XXX_USBMSD.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) |
PIC24FJ256DA210 Development Board (DM240312) |
none |
✓ (see note 1) |
✓ (see note 1) |
Multimedia Expansion Board (DM320005) + PIC32 USB Starter Kit II (DM320003-2) OR PIC32 Ethernet Starter Kit (DM320004) |
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) |
☒ |
☒ |
PIC32 Starter Kit (DM320001) OR PIC32 USB Starter Kit II (DM320003-2) OR PIC32 Ethernet Starter Kit (DM320004) |
Low Cost Controllerless (LCC) Graphics PICtail™ Plus Board (AC164144) (see note 4)
|
✓ |
✓ |
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 – set to 1-2 (use Y- signal) - JP10 – set to 1-2 (use X+ signal) - JP11, JP12 – don’t care - JP23 – set to 2-3 (use SPI Flash) - JP13 – set to RG8-S1 (use S1 switch) - JP14 – set to RE9-S2 (use S2 switch) - JP15 – set to RB5-POT(RB5) (use potentiometer) 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. Set all the Low Cost Controllerless (LCC) Graphics PICtail™ Plus Board jumpers to 2-3 (External 16-bit) 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
External Flash Programming Instructions:
With the exceptions of all PIC32 Starter Kit based projects (which do not use external memory), all projects in this demo are configured to use the UART Mode in programming the external memory.
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)
|
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.