7.0" TFT module CPLD SDRAM arduino DUE MEGA2560 MS070SD

Hi guys
I have just got the 7.0" TFT module CPLD SDRAM arduino DUE MEGA2560 MS070SD Display and it works great with the latest UTFT Library using the // UTFT_CPLD_PageSwitching.
I have Arduino Due with CTE Shield so i set it as this UTFT myGLCD(CPLD,25,26,27,28);
all works with the demo code and with // UTFT_Demo_800x480
But the problem is i want to use a Flash IC. this display didn’t come with the Flash IC chip so i put that on myself.
I can use the // SPIflash_ChipTest to check the Flash that is ok.
But i can not upload images to the flash or display anything.
Im trying the // Image Importer to Flash memory library from Coadtears. But can not get this to work

This will compile as the standard code
// Image Importer to Flash memory
// for CTE LCD Modules
// (C) 2013 Coldtears electronics
// For use with CTE TFT LCD Modules w/Font and Icon Flash IC
// in combination with CTE TFT/SD Shield for Arduino DUE
// web: http://stores.shop.ebay.com/coldtears-electronics-store
// For Usage, please read the PDF in the download package
//
// This ultility requires SDfat and a compatible SDcard
// web: http://code.google.com/p/sdfatlib/
// Please use the sdfat library in the package as it is slightly modified
//

#include <SdFat.h>
#include <UTFT.h>
#include <SdFatUtil.h>
#include <Importer.h>
#include “SPI.h”

#define BVS_13 10
#define BVS_15 12
#define BVS_19 14
#define BVS_22 18
#define BVS_28 22
#define BVS_34 28
#define BVS_43 38
#define BVS_52 53
#define BVS_74 78
#define BVS_112 122

UTFT myGLCD(CTE35);

But if i change UTFT myGLCD(CTE35); to UTFT myGLCD(CPLD,25,26,27,28);
I get thisa error message
Image_importer:31: error: ‘CPLD’ was not declared in this scope
All i want to do is display images from Flash

this is a video showing this working??? how did thay do it. i have contacted coldtears but no help from them

Coldtears 7" TFT LCD Module with Page Buffer and Font IC Demo running at Arduino Mega 2560 (800x480)

First of all, the YouTube video you referenced shows the SSD1963 controller version of the 7" CTE display with Font IC. You are probably aware that Coldtears neither supply nor support the Font IC on the CPLD displays?

If like me you wanted Font IC functionality on your CPLD display, you could probably figure it out in about 6 weeks or less by writing your own UTFT_CTE library with CPLD support. Then add in some extra features even Coldtears don't offer ;) like transparent text, CENTER & RIGHT justification of text and PORTRAIT mode just for laughs. There are some crap quality videos on YouTube demonstrating the features so far, and also I have now expanded the list of displays to be CTE32, CTE35IPS and CPLD with all of the features I demonstrated in the videos.

https://www.youtube.com/playlist?list=PLr-hMPOfKXXbBEO7mofb7j9FJ5ayOJu3x

Finally, let's not have YET another thread when I already have a fairly comprehensive one covering ALL of my efforts so far here http://forum.arduino.cc/index.php?topic=306646.new#new

Regards,

Graham

vmansmx5: i have contacted coldtears but no help from them

You DO surprise me LOL..... It is a pity their customer service is so dire when their product is so good, and yet, if you are brave/stupid enough to mention Sain~~smart~~shit, THAT will guarantee a reply!! ;) :P

Regards,

Graham

Sorry, I am clearly tired, since I been awake all night and is now daylight and I STILL didn't sleep yet :( but I re-read your first post. If all you want is images on the chip and display them, you already mentioned 'SPIflash_ChipTest' which is part of Henning's SPI_Flash library, which also has a corresponding UTFT_SPIflash for drawing pictures. If you are not looking to use the Font IC per se, the SPI_Flash approach would be my recommendation.

Regards,

Graham

Just received an email from coldtears image importer only support SSD1963 version, not CPLD version so i have been trying the UTFT_SPIflash // Demo_Color_Images. So i have put the files on SD card // | TestImages_240x320.* | 240X320.SFD | // | TestImages_240x400.* | 240X400.SFD | // | TestImages_320x240.* | 320X240.SFD | // | TestImages_400x240.* | 400X240.SFD | // | TestImages_480x272.* | 480X272.SFD | // | TestImages_800x480.* | 800X480.SFD | And im trying // SPIflash_Restore is this the correct one to upload these files to flash? When i run the Serial monitor i get this

SPIflash Dumpfile Restore
-------------------------

Initializing SD card... Card initialized.
Initializing Flash chip... Chip initialized.

Enter a filename to restore (8 characters maximum, no extension): 240X320.SFD
Waiting for flash chip to be ready... Chip is ready.
Erasing chip... Done.

Starting restore...

Number of pages to be written: 0x0E30
Writing page: 0x0000
Writing page: 0x0100
Writing page: 0x0200
Writing page: 0x0300
Writing page: 0x0400
Writing page: 0x0500
Writing page: 0x0600
Writing page: 0x0700
Writing page: 0x0800
Writing page: 0x0900
Writing page: 0x0A00
Writing page: 0x0B00
Writing page: 0x0C00
Writing page: 0x0D00
Writing page: 0x0E00
Writing page: 0x0E2F
Finished!

then i use // SPIflash_FileListWithImageSize this is what i get in the serial monitor

The connected device is a W25Q64FV, which is a 64Mbit SPI Serial Flash from Winbond.

| ID    | Filetype              | Filesize  | ImgX  | ImgY  | Note
|-------|---------------------------------------|---------------|-------|-------|---------------
|   0  | Color image               |        153600 |   240 |   320 | Chaplin
|   1  | Color image               |        153600 |   240 |   320 | Madonna
|   2  | Color image               |        153600 |   240 |   320 | Girl
|   3  | Color image               |        153600 |   240 |   320 | Cat_1
|   4  | Color image               |        153600 |   240 |   320 | Cat_2
|   5  | Color image               |        153600 |   240 |   320 | Cat_3
|-------|---------------------------------------|---------------|-------|-------|---------------

so dose that mean that the file 240X320.SFD is on there?

when i use // Demo_Color_Images all i get is a black screen?

Yes that does mean the files are on there, and did you change line 37 to

UTFT          myGLCD(CPLD, 25, 26, 27, 28);

?

Yes I am aware the image importer does not support the CPLD display, and as I already mentioned in the Font IC thread, I know many people have had problems with it so I never even bothered trying to use it, I formulated my own way to upload stuff to the chip.

Regards,

Graham

EDIT… Ops, you did say MEGA, so should be

UTFT          myGLCD(CPLD, 38, 39, 40, 41);

Having re-read your entire first post, I now have NO IDEA why MEGA even features in the title of the thread???

Hi there yes im using the arduino Due well i tried using IDE 1.6.3 and its now working using // Demo_Color_Images TestImages_800x480.* | 800X480.SFD well finally but the thing is it still has the slow page effect when changing images is there away to sped it up using the // UTFT_CPLD_PageSwitching

vmansmx5: is there away to sped it up using the // UTFT_CPLD_PageSwitching

Yes!! That's exactly what you do.

:sunglasses:

Regards,

Graham

IM TYING IT USING // UTFT_CPLD_PageSwitching AND // Demo_Color_Images
BUT ALL I GET IS THE FIRST IMAGE

// Demo_Color_Images 
// Copyright (C)2015 Rinky-Dink Electronics, Henning Karlsen. All right reserved
// web: http://www.RinkyDinkElectronics.com/
//
// This program is a demo of the loadBitmap()-function.
//
// This program requires UTFT_SPIflash, UTFT v2.41 or higher, 
// as well as SPIflash.
//
// This demo expects the appropriate dataset to be loaded
// into the flash chip.
//
// Appropriate datasets:
// | Full name            | Short name  |
// |----------------------|-------------|
// | TestImages_240x320.* | 240X320.SFD |
// | TestImages_240x400.* | 240X400.SFD |
// | TestImages_320x240.* | 320X240.SFD |
// | TestImages_400x240.* | 400X240.SFD |
// | TestImages_480x272.* | 480X272.SFD |
// | TestImages_800x480.* | 800X480.SFD |
// |----------------------|-------------|
// (Demo datasets are supplied with the SPIflash library)
//
// This demo should work for all display sizes provided the
// images loaded on the flash chip aren't too large, and will
// also work in PORTRAIT mode.
//

#include <SPIflash.h>
#include <UTFT.h>
#include <UTFT_SPIflash.h>

// Remember to set the model code for your display and the appropriate pins for your setup.
// See the UTFT manual for further information.
// myGLCD(<Model Code>, <RS>, <WR>, <CS>, <RST>);
UTFT myGLCD(CPLD,25,26,27,28); 

// myFlash(<SS>); (if using the hardware SPI pins. See the manual for other configurations.)
SPIflash      myFlash(52);

UTFT_SPIflash myFiles(&myGLCD, &myFlash);

// Declare which fonts we will be using
extern uint8_t SmallFont[];
extern uint8_t BigFont[];
extern uint8_t SevenSegNumFont[];

uint8_t  fileid;
uint16_t filetype;



void setup()
{
  myGLCD.InitLCD();
  myGLCD.clrScr();
  myGLCD.setColor(255,255,255);
  myGLCD.setFont(SmallFont);
  myFlash.begin();

  if (myFlash.ID_device==0)
  {
    myGLCD.print("Unknown flash device!", 0, 0);
    while (true) {};
  }    
}

void loop()
{

fileid = 0;
filetype = 0;
  
  for (byte pg=0; pg<4; pg++)
  {
    myGLCD.setWritePage(pg);
    myGLCD.clrScr();
    for (int ln=0; ln<480; ln+=2)
    {
      switch (pg)
      {
        case 0:
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
 
          break;
        case 1:
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);

          break;
        case 2:
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);

          break;
        case 3:
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);

          break;
        case 4:
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);

          break;
      }

    }
    myGLCD.setColor(VGA_BLACK);
    myGLCD.setFont(BigFont);
    myGLCD.setBackColor(VGA_WHITE);
    myGLCD.print("This is page:", CENTER, 200);
    myGLCD.setFont(SevenSegNumFont);
    myGLCD.printNumI(pg, CENTER, 240);
  }


  while(1)
  {
    for (byte pg=0; pg<4; pg++)
    {
      myGLCD.setDisplayPage(pg);
      delay(500);
      fileid++;
    }
  }
}

You are on the right lines, but of course you will only get the first image… You set fileid = 0 on line 72, then you never increment it so pg case 0/1/2/3 always load image 0 ? ? ?

Regards,

Graham

ok so this gives me the first 2 images then it stops?

void loop()
{
 
  for (byte pg=0; pg<4; pg++)
  {
    myGLCD.setWritePage(pg);
    myGLCD.clrScr();
    for (int ln=0; ln<480; ln+=2)
    {
      switch (pg)
      {
        case 0:
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          fileid = 1;
          break;
        case 1:
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          fileid = 2;
          break;
        case 2:
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          fileid = 3;
          break;
        case 3:
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          fileid = 4;
          break;
        case 4:
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          fileid = 0;
          break;
      }

    }
    myGLCD.setColor(VGA_BLACK);
    myGLCD.setFont(BigFont);
    myGLCD.setBackColor(VGA_WHITE);
    myGLCD.print("This is page:", CENTER, 200);
    myGLCD.setFont(SevenSegNumFont);
    myGLCD.printNumI(pg, CENTER, 240);
  }


  while(1)
  {
    for (byte pg=0; pg<4; pg++)
    {
      myGLCD.setDisplayPage(pg);
      delay(500);

    }
  }
}

Loads the first image slow then it has a delay then it loads all the images super fast wooow

void loop()
{

  for (byte pg=0; pg<4; pg++)
  {
    myGLCD.setWritePage(pg);
    myGLCD.clrScr();

      switch (pg)
      {
        case 0:
          fileid = 0;
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          fileid = 1;
          break;
        case 1:
          fileid = 1;
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          fileid = 2;
          break;
        case 2:
          fileid = 2;
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          fileid = 3;
          break;
        case 3:
          fileid = 3;
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          fileid = 4;
          break;
        case 4:
          fileid = 4;
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          fileid = 0;
          break;
      }

    }



  while(1)
  {
    for (byte pg=0; pg<4; pg++)
    {
      myGLCD.setDisplayPage(pg);
      delay(500);

    }
  }
}

How many different screens do you envisage having in total? Less than 8 ?

Regards,

Graham

yes i will have less then 8 pages i have this working but still the first image has the slow page effect

void loop()
{
          myGLCD.setDisplayPage(0);
          myGLCD.setWritePage(0);
          fileid = 0;
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          

          myGLCD.setDisplayPage(1);
          myGLCD.setWritePage(1);
          fileid = 1;
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          

          myGLCD.setDisplayPage(2);
          myGLCD.setWritePage(2);
          fileid = 2;
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          

          myGLCD.setDisplayPage(3);
          myGLCD.setWritePage(3);
          fileid = 3;
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
       

          myGLCD.setDisplayPage(4);
          myGLCD.setWritePage(4);
          fileid = 4;
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
         
}

i HAVE FIXED THE PROBLEM WITH THE FIRST PAGE LOADING SLOW I HAVE IT START WITH A WHITE SCREEN AND IT SAYS LOADING ITS STAYS ON THIS PAGE FOR ABOUT 10 SECONDS THEN IT FLIPS TO THE IMAGES FAST :slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile:

void loop()
{


  for (byte pg=0; pg<6; pg++)
  {
    myGLCD.setWritePage(pg);
    myGLCD.clrScr();

      switch (pg)
      {
        case 0:
          myGLCD.fillScr(VGA_WHITE);
          myGLCD.setColor(VGA_RED);
          myGLCD.setBackColor(VGA_WHITE);
          myGLCD.setFont(BigFont);
          myGLCD.print("LOADING PAGES", CENTER, CENTER);
          break;
        case 1:
          fileid = 0;
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          break;
        case 2:
          fileid = 1;
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          break;
        case 3:
          fileid = 2;
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          break;
        case 4:
          fileid = 3;
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          break;
        case 5:
          fileid = 4;
          filetype = myFlash.getFileType(fileid);
          myFiles.loadBitmap(fileid, 0, 0);
          break;
      }
  }


  while(1)
  {
    for (byte pg=0; pg<6; pg++)
    {
      myGLCD.setDisplayPage(pg);
      delay(500);
    }
  }
}

Here i have it loading great but it seams to have a long delay before it changes image but has go page effect witch is good, Im trying to set it up so i can call up any image when i want i don't wont a slide show

image0(); 
delay(500);
image1(); 
delay(500);
image2(); 
delay(500);
image3();

that's why i have done this its still a slide show but that's just for testing the code

``void setup() { myGLCD.InitLCD(); myGLCD.clrScr(); myGLCD.setColor(255,255,255); myGLCD.setFont(SmallFont); myFlash.begin();

if (myFlash.ID_device==0) { myGLCD.print("Unknown flash device!", 0, 0); while (true) {}; } setup0(); }

void loop() { image0(); delay(500); image1(); delay(500); image2(); delay(500); image3(); }

void setup0() { myGLCD.setDisplayPage(0); myGLCD.setWritePage(0); myGLCD.fillScr(VGA_BLACK); myGLCD.setColor(VGA_WHITE); myGLCD.setBackColor(VGA_BLACK); myGLCD.setFont(BigFont); myGLCD.print("7 TFT TOUCH SCREEN", CENTER, 0); myGLCD.print("CPLD PAGESWITCHING", CENTER, 16); myGLCD.print("SPI FLASH W25Q64FV 64Mbit", CENTER, 32); myGLCD.print("PROCESSOR: SAM3X8E ARM CORTEX-M3 CPU", CENTER, 48); myGLCD.print("INITIALIIZING PROGRAM", CENTER, 80); myGLCD.print("LOADING PLEASE WAIT", CENTER, 96); delay(2000); } void image0() { myGLCD.setDisplayPage(1); myGLCD.setWritePage(1); filetype = myFlash.getFileType(0); myFiles.loadBitmap(0, 0, 0); } void image1() { myGLCD.setDisplayPage(2); myGLCD.setWritePage(2); filetype = myFlash.getFileType(1); myFiles.loadBitmap(1, 0, 0); } void image2() { myGLCD.setDisplayPage(3); myGLCD.setWritePage(3); filetype = myFlash.getFileType(2); myFiles.loadBitmap(2, 0, 0); } void image3() { myGLCD.setDisplayPage(4); myGLCD.setWritePage(4); filetype = myFlash.getFileType(3); myFiles.loadBitmap(3, 0, 0); }

You remind me of me… Have you been on some substances? You are not thinking this through very well…

I am just going out briefly to get some alcohol, I will be on your wavelength later I think :stuck_out_tongue:

I will help you when I get back :wink:

Regards,

Graham

Hopefully this will give you a shove in the right direction… I am guessing it was only going to be a matter of time before you got yourself in a mess dealing with touch events?? So I fixed your screen drawing AND your touch problems you didn’t even ask about yet!!!

You are welcome!! :wink: :stuck_out_tongue:

#include <SPIflash.h>
#include <UTFT.h>
#include <UTFT_SPIflash.h>
#include <UTouch.h>

UTFT myGLCD(CPLD, 25, 26, 27, 28);
UTouch  myTouch( 6, 5, 4, 3, 2);        // start up an instance of for touch                                    //

SPIflash      myFlash(52);

UTFT_SPIflash myFiles(&myGLCD, &myFlash);

extern uint8_t SmallFont[];
extern uint8_t BigFont[];
extern uint8_t SevenSegNumFont[];
byte screenid = 0;
unsigned long currentMillis, prevMillisTouch, MillisDim, MillisHome;
void setup0()
{
  //myGLCD.setDisplayPage(0);
  //myGLCD.setWritePage(0);
  myGLCD.fillScr(VGA_BLACK);
  myGLCD.setColor(VGA_WHITE);
  myGLCD.setBackColor(VGA_BLACK);
  myGLCD.setFont(BigFont);
  myGLCD.print("7 TFT TOUCH SCREEN", CENTER, 0);
  myGLCD.print("CPLD PAGESWITCHING", CENTER, 16);
  myGLCD.print("SPI FLASH W25Q64FV 64Mbit", CENTER, 32);
  myGLCD.print("PROCESSOR: SAM3X8E ARM CORTEX-M3 CPU", CENTER, 48);
  myGLCD.print("INITIALIIZING PROGRAM", CENTER, 80);
  myGLCD.print("LOADING PLEASE WAIT", CENTER, 96);
  myGLCD.setWritePage(1);
  myFiles.loadBitmap(0, 0, 0);
  myGLCD.setWritePage(2);
  myFiles.loadBitmap(1, 0, 0);
  myGLCD.setWritePage(3);
  myFiles.loadBitmap(2, 0, 0);
  myGLCD.setWritePage(4);
  myFiles.loadBitmap(3, 0, 0);
}
void home()
{
  myGLCD.setDisplayPage(1);
  screenid = 1;
}
void function1()
{
  myGLCD.setDisplayPage(2);
  screenid = 2;
}
void function2()
{
  myGLCD.setDisplayPage(3);
  screenid = 3;
}
void function3()
{
  myGLCD.setDisplayPage(4);
  screenid = 4;
}

void button1()
{
  // Do awesome stuff here for button 1!!
}
void button2()
{
  // Do awesome stuff here for button 2!!
}
void button3()
{
  // Do awesome stuff here for button 3!!
}



void processMyTouch()
{
  myTouch.read();
  word x = myTouch.getX();
  word y = myTouch.getY();
  switch (screenid)
  {
    case 1: // Home page
      if (x > 100 && x < 200 && y > 150 && y < 250) function1();
      if (x > 200 && x < 300 && y > 150 && y < 250) function2();
      if (x > 300 && x < 400 && y > 150 && y < 250) function3();
      break;
    case 2: // function 1 page
      if (x > 100 && x < 200 && y > 150 && y < 250) home();
      if (x > 200 && x < 300 && y > 150 && y < 250) function2();
      if (x > 300 && x < 400 && y > 150 && y < 250) function3();
      if (x > 500 && x < 550 && y > 400 && y < 450) button1();
      if (x > 600 && x < 650 && y > 400 && y < 450) button2();
      if (x > 700 && x < 750 && y > 400 && y < 450) button3();
      break;
    case 3: // function 2 page
      if (x > 100 && x < 200 && y > 150 && y < 250) home();
      if (x > 200 && x < 300 && y > 150 && y < 250) function1();
      if (x > 300 && x < 400 && y > 150 && y < 250) function3();
      break;
    case 4: // function 3 page
      if (x > 100 && x < 200 && y > 150 && y < 250) home();
      if (x > 200 && x < 300 && y > 150 && y < 250) function1();
      if (x > 300 && x < 400 && y > 150 && y < 250) function2();
      break;
  }

}

void setup()
{
  myGLCD.InitLCD();
  myGLCD.clrScr();
  //myGLCD.setColor(255, 255, 255);
  //myGLCD.setFont(SmallFont);
  myFlash.begin();
  if (myFlash.ID_device == 0)
  {
    myGLCD.print("Unknown flash device!", 0, 0);
    while (true) {};
  }
  setup0();
  home();
}

void loop()
{
  currentMillis = millis(); // get current millis
  //home();
  /////////////////////////////////////////////////////////////////////////////////////
  // if we are not on the homepage and is more than 10 seconds since a touch event
  // return to homepage
  if ((currentMillis - MillisHome > 10000) && (screenid != 1)) home;
  /////////////////////////////////////////////////////////////////////////////////////
  // if more than 12 seconds since last touch event turn screen off
  if (currentMillis - MillisDim > 12000) myGLCD.setBrightness(0);


  if (myTouch.dataAvailable())  {
    //  make sure it's been .5 sec (initially) between touches
    unsigned long TouchRepeatDelay = 500;

    if (currentMillis - prevMillisTouch > TouchRepeatDelay)
    {
      myGLCD.setBrightness(16);        // turn on backlight
      prevMillisTouch = currentMillis; // reset the touch timer
      MillisDim = currentMillis;       // reset screen dim timer
      if (screenid == 1) MillisHome = currentMillis;   // reset return home timer
      processMyTouch();
    }
  }
}

Regards,

Graham

Thanks for that i have fixed the problem now its working :) yes ill add the touch in tonight after work and i like the piece about the touch timing i have done the same on my last touch project. thanks again for the great help :)

void loop()
{
image0();
delay(500);
image1();
delay(500);
image2();
delay(500);
image3();
delay(500);
}

void setup0()
{
 myGLCD.setDisplayPage(0);
  myGLCD.setWritePage(0);
  myGLCD.fillScr(VGA_BLACK);
  myGLCD.setColor(VGA_WHITE);
  myGLCD.setBackColor(VGA_BLACK);
  myGLCD.setFont(BigFont);
  myGLCD.print("7 TFT TOUCH SCREEN", CENTER, 0);
  myGLCD.print("CPLD PAGESWITCHING", CENTER, 16);
  myGLCD.print("SPI FLASH W25Q64FV 64Mbit", CENTER, 32);
  myGLCD.print("PROCESSOR: SAM3X8E ARM CORTEX-M3 CPU", CENTER, 48);
  myGLCD.print("INITIALIIZING PROGRAM", CENTER, 80);
  myGLCD.print("LOADING PLEASE WAIT", CENTER, 96);
    myGLCD.setWritePage(1);
  myFiles.loadBitmap(0, 0, 0);
  myGLCD.setWritePage(2);
  myFiles.loadBitmap(1, 0, 0);
  myGLCD.setWritePage(3);
  myFiles.loadBitmap(2, 0, 0);
  myGLCD.setWritePage(4);
  myFiles.loadBitmap(3, 0, 0);
  delay(2000);
}
void image0()
{
 myGLCD.setDisplayPage(1);
}
void image1()
{
 myGLCD.setDisplayPage(2);
}
void image2()
{
 myGLCD.setDisplayPage(3);
}
void image3()
{
 myGLCD.setDisplayPage(4);
}