Due, MI0283QT-9A ILI9341, uTFT, 16 bit Parallel

Hi,

I have finally got something to display with this setup. I am using this in utft:

UTFT myGLCD(TFT01_32W,38,39,40,41);
as I wish to use parallel, and the MI0283QT-9A def in utft only seems to use serial.

I end up with the attached running the bitmap example within utft.

Any ideas on how to correct this?

Just some more information, I’m running this simple code:

  for (int xx=0; xx<320; xx++) {
  myGLCD.setColor (255,0,0);
  myGLCD.printNumI(xx, 150, 10);
  
  if (yy > 239) {
    myGLCD.setColor (0,255,0);
    
 }
  myGLCD.printNumI(yy, 150, 30);
  myGLCD.drawPixel(xx,yy);
  if (yy < 240) {yy++;}
}

And get as in img 1

if I change the loop to

 for (int xx=80; xx<400; xx++) {

I get as in img 2.

I assume it has something with uTFT’s setXY.h file:

LCD_Write_COM(0x2a);
  	LCD_Write_DATA(0x3c,x1>>8);
  	LCD_Write_DATA(0x00,x1);
  	LCD_Write_DATA(0x00,x2>>8);
  	LCD_Write_DATA(0x00,x2);
  	LCD_Write_COM(0x2b);
  	LCD_Write_DATA(0x00,y1>>8);
  	LCD_Write_DATA(0x00,y1);
  	LCD_Write_DATA(0x00,y2>>8);
  	LCD_Write_DATA(0x00,y2);
  	LCD_Write_COM(0x2c);

But I’m not sure what to change.

Here is the initLCD in case it’s needed:

LCD_Write_COM(0x01); //software reset
delay(5);
LCD_Write_COM(0x28); // display off
//---------------------------------------------------------
LCD_Write_COM(0xcf);
LCD_Write_DATA(0x00,0x00);
LCD_Write_DATA(0x00,0x83);
LCD_Write_DATA(0x00,0x30);
LCD_Write_COM(0xed);
LCD_Write_DATA(0x00,0x64);
LCD_Write_DATA(0x00,0x03);
LCD_Write_DATA(0x00,0x12);
LCD_Write_DATA(0x00,0x81);
LCD_Write_COM(0xe8);
LCD_Write_DATA(0x00,0x85);
LCD_Write_DATA(0x00,0x01);
LCD_Write_DATA(0x00,0x79);
LCD_Write_COM(0xcb);
LCD_Write_DATA(0x00,0x39);
LCD_Write_DATA(0x00,0x2c);
LCD_Write_DATA(0x00,0x00);
LCD_Write_DATA(0x00,0x34);
LCD_Write_DATA(0x00,0x02);
LCD_Write_COM(0xf7);
LCD_Write_DATA(0x00,0x20);
LCD_Write_COM(0xea);
LCD_Write_DATA(0x00,0x00);
LCD_Write_DATA(0x00,0x00);
//------------power control------------------------------
LCD_Write_COM(0xc0); //power control
LCD_Write_DATA(0x00,0x26);
LCD_Write_COM(0xc1); //power control
LCD_Write_DATA(0x00,0x11);
//--------------VCOM
LCD_Write_COM(0xc5); //vcom control
LCD_Write_DATA(0x00,0x35);//35
LCD_Write_DATA(0x00,0x3e);//3E
LCD_Write_COM(0xc7); //vcom control
LCD_Write_DATA(0x00,0xbe); // 0x94
//------------memory access control------------------------
LCD_Write_COM(0x36); // memory access control
LCD_Write_DATA(0x00,0x48); //0048 my,mx,mv,ml,BGR,mh,0.0
LCD_Write_COM(0x3a); // pixel format set
LCD_Write_DATA(0x00,0x55);//16bit /pixel
//----------------- frame rate------------------------------
LCD_Write_COM(0xb1); // frame rate
LCD_Write_DATA(0x00,0x00);
LCD_Write_DATA(0x00,0x1B); //70
//----------------Gamma---------------------------------
LCD_Write_COM(0xf2); // 3Gamma Function Disable
LCD_Write_DATA(0x00,0x08);
LCD_Write_COM(0x26);
LCD_Write_DATA(0x00,0x01); // gamma set 4 gamma curve 01/02/04/08
LCD_Write_COM(0xE0); //positive gamma correction
LCD_Write_DATA(0x00,0x1f);
LCD_Write_DATA(0x00,0x1a);
LCD_Write_DATA(0x00,0x18);
LCD_Write_DATA(0x00,0x0a);
LCD_Write_DATA(0x00,0x0f);
LCD_Write_DATA(0x00,0x06);
LCD_Write_DATA(0x00,0x45);
LCD_Write_DATA(0x00,0x87);
LCD_Write_DATA(0x00,0x32);
LCD_Write_DATA(0x00,0x0a);
LCD_Write_DATA(0x00,0x07);
LCD_Write_DATA(0x00,0x02);
LCD_Write_DATA(0x00,0x07);
LCD_Write_DATA(0x00,0x05);
LCD_Write_DATA(0x00,0x00);
LCD_Write_COM(0xE1); //negamma correction
LCD_Write_DATA(0x00,0x00);
LCD_Write_DATA(0x00,0x25);
LCD_Write_DATA(0x00,0x27);
LCD_Write_DATA(0x00,0x05);
LCD_Write_DATA(0x00,0x10);
LCD_Write_DATA(0x00,0x09);
LCD_Write_DATA(0x00,0x3a);
LCD_Write_DATA(0x00,0x78);
LCD_Write_DATA(0x00,0x4d);
LCD_Write_DATA(0x00,0x05);
LCD_Write_DATA(0x00,0x18);
LCD_Write_DATA(0x00,0x0d);
LCD_Write_DATA(0x00,0x38);
LCD_Write_DATA(0x00,0x3a);
LCD_Write_DATA(0x00,0x1f);
//--------------ddram ---------------------
LCD_Write_COM(0x2a); // column set
LCD_Write_DATA(0x00,0x00);
LCD_Write_DATA(0x00,0x00);
LCD_Write_DATA(0x00,0x00);
LCD_Write_DATA(0x00,0xEF);
LCD_Write_COM(0x2b); // page address set
LCD_Write_DATA(0x00,0x00);
LCD_Write_DATA(0x00,0x00);
LCD_Write_DATA(0x00,0x01);
LCD_Write_DATA(0x00,0x3F);
//LCD_Write_COM(0x34); // tearing effect off
//LCD_Write_COM(0x35); // tearing effect on
//LCD_Write_COM(0xb4); // display inversion
//LCD_Write_DATA(0x00,0x00);
LCD_Write_COM(0xb7); //entry mode set
LCD_Write_DATA(0x00,0x07);
//-----------------display---------------------
LCD_Write_COM(0xb6); // display function control
LCD_Write_DATA(0x00,0x0a);
LCD_Write_DATA(0x00,0x82);
LCD_Write_DATA(0x00,0x27);
LCD_Write_DATA(0x00,0x00);
LCD_Write_COM(0x11); //sleep out
delay(100);
LCD_Write_COM(0x29); // display on
delay(100);
LCD_Write_COM(0x2c); //memory write

Thanks!