Digole
Digital Solutions
iDigole Buyer ProtectioniDigole Buyer
Protection
My shopping cart
0 Items:
Secure Checkout
Top Rated Plus
Visit Our Live Auctions
99.9% Customer's Satisfaction
 
Forum : Digole Serial Display :

 Search Forum.. 
 Creat New Topic   Reply 

2.6" Color IPS Display Probelm with Flash

Hi there

I have used the digole board for many LCD based projects and I am now experimenting with the color displays.

I have loaded the example, but it freezes at the point where it does a test load the the flash memory. This is the minimum code which re-creates the problem:

void setup() {
    mydisp.begin(); //initiate serial port
    mydisp.setBgColor(0); //set another back ground color
    mydisp.clearScreen();
    mydisp.setColor(WHITE); //set fore ground color, 8bit format, for 24bit color format, use:setTrueColor(R,G,B)
    mydisp.setRot90();

    mydisp.flashErase(600000, 8588); //erase 8588 bytes in flash to store font data, this function will use screen memory to buffer the 4096 erase block
    delay(400);
    mydisp.flashWrite(600000, 8588, userfont3);  //write array d to flash memory start at 0, length=8588
    mydisp.setFlashFont(600000);  //use user font in flash chip from any address
}

And this is what the screen looks like:

RE:2.6" Color IPS Display Probelm with Flash

Because the block size of Flash chip is 4096B, if user want to erase patial memory in a block, the module need to use the RAM on the LCD panel as buffer to store data from the Flash chip before erasing, so, you will see the random pixels at the corner of screen.

To avoid this, you can always erase the flash chip by starting the address 4096xn and erase the length of data 4096xm, here n,m are int value.

 

RE:2.6

One more thing:

The flash write to 2MB flash chip will return a byte of value of 17 after all writing correct, if you are using I2C and SPI mode, you must pull out this value from module, otherwise the module will freeze and waiting for you to do that.

On UART mode don't have such problem, because the module will put the value of 17 to the TX pin directly.

RE:2.6

Add the following red line, then it should work because you are using 2MB flash chip:

#define FLASH_CHIP
 

void setup() {

    mydisp.begin(); //initiate serial port
    mydisp.setBgColor(0); //set another back ground color
    mydisp.clearScreen();
    mydisp.setColor(WHITE); //set fore ground color, 8bit format, for 24bit color format, use:setTrueColor(R,G,B)
    mydisp.setRot90();

    mydisp.flashErase(600000, 8588); //erase 8588 bytes in flash to store font data, this function will use screen memory to buffer the 4096 erase block
    delay(400);
    mydisp.flashWrite(600000, 8588, userfont3);  //write array d to flash memory start at 0, length=8588
    mydisp.setFlashFont(600000);  //use user font in flash chip from any address
    mydisp.print("Test user font address 60K");
}

 

 

Copyright Digole Digital Solutions, 2008-2017. All rights reserved.
Powered by Victor Sun