Arduino Mega 2560 with 7 inch TFT display issues

I recently purchased a NHD-7.0-800480WF-CTXI#-T (7 inch TFT display with built in SSD1963 controller). I’m trying to get it to work with my Arduino Mega 2560, but the best I can get is the occasional red or blue segments filling part of the screen here and there when loading the UTFT_Demo_800_480 from the UTFT library.

Now UTFT_Supported_display_modules_&_controllers.pdf shows that the SSD1963 at 800 x 480 is only supported in 16 bit mode however there is only DB0 - DB7 coming off the board that New Haven has installed on the back of the screen. Currently I have DB0-DB7 coming off the SSD1963 controller connected to pins 22 - 29 respectively, RS → pin 38, RD → connected to 3.3V, WR → pin 39, CS → pin 40, RST → pin 41. All data and control lines are connected through two of Adafruit’s TXB0108 (8-bit bidirectional logic level converter). What do I need to do to get the screen to work with my setup?

UPDATE

Ok so I found that the RST pin was killing the logic level converter, as soon as I disconnect the RST pin the logic shifts appropriately. However, the display won’t do anything unless I fiddle with the RST pin a bit. If I do I get random colors all over the screen. I rewrote my own simple code to interface to the SSD1963 over an 8 bit bus (using PORTA) but still no dice (I pulled RST to 3.3V high for these tests). I was playing around trying get different colors by setting the variable temp to 0xFF0000 for red, 0x00FF00 for green, and 0x0000FF for blue but the screen just isn’t responding, any help would be greatly appreciated, thanks!

const int pinRS_LCD = 38;    // set pin 38 as the register select pin for the LCD screen (0 for command, 1 for data)
const int pinWR_LCD = 39;    // set pin 39 as the write signal for the LCD screen (active low)
const int pinCS_LCD = 40;    // set pin 40 as the slave select for the LCD screen (active low)
const int pinRST_LCD = 41;   // set pin 41 as the reset for the LCD screen (active low)
const int pinRD_LCD = 42;    // set pin 42 as the read signal for the LCD screen (active low)

unsigned long temp;

void setup()
{
  Serial.begin(9600);
  
  DDRA = B11111111;  // set PORTA (digital pins 22-29) to outputs
  
  // set the different control pins as outputs
  pinMode (pinRS_LCD, OUTPUT);
  pinMode (pinWR_LCD, OUTPUT);
  pinMode (pinCS_LCD, OUTPUT);
  pinMode (pinRST_LCD, OUTPUT);
  pinMode (pinRD_LCD, OUTPUT);
  
  digitalWrite(pinRS_LCD,HIGH);    // initialize all pins high
  digitalWrite(pinWR_LCD,HIGH);
  digitalWrite(pinCS_LCD,HIGH);
  digitalWrite(pinRST_LCD,HIGH);
  digitalWrite(pinRD_LCD,HIGH);
  
  
  TFT_7_Init();
  TFT_7_Write_Command(0x29); // display on
  
  
}

void loop()
{
  TFT_7_WindowSet(0x0000,0x031f,0x0000,0x01df);
  TFT_7_Write_Command(0x2c);
  
  digitalWrite(pinRS_LCD,HIGH); //GPIO_SetBits(GPIOC, RS);
  
  temp = 0x0000FF;
  for(int n=0; n<480; n++)
  {
    for(int i=0; i<800; i++)
    {
      TFT_7_SendData(temp);
    }
  }
}

/*******************************************************************************
* Function Name : UILCD_Init
* Description : Initializes LCD.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void TFT_7_Init(void)
{
  digitalWrite(pinRS_LCD,LOW);
  digitalWrite(pinCS_LCD,LOW);  //GPIO_ResetBits(GPIOC, CS1);
  digitalWrite(pinRD_LCD,HIGH); //GPIO_SetBits(GPIOC, nRD);
  digitalWrite(pinWR_LCD,LOW);  //GPIO_ResetBits(GPIOC, nWR);
  digitalWrite(pinRST_LCD,LOW); //GPIO_WriteBit(GPIOC, RES, Bit_RESET);
  delay(5);
  digitalWrite(pinRST_LCD,HIGH);//GPIO_WriteBit(GPIOC, RES, Bit_SET);
  delay(100);
  TFT_7_Write_Command(0x01); //Software Reset
  TFT_7_Write_Command(0x01);
  TFT_7_Write_Command(0x01);
  delay(10);
  TFT_7_Command_Write(0xe0,0x01); //START PLL
  TFT_7_Command_Write(0xe0,0x03); //LOCK PLL
  TFT_7_Write_Command(0xb0); //SET LCD MODE SET TFT 18Bits MODE
  digitalWrite(pinRS_LCD,HIGH);//GPIO_SetBits(GPIOC, RS);
  TFT_7_Write_Data(0x08); //SET TFT MODE & hsync+Vsync+DEN MODE
  TFT_7_Write_Data(0x80); //SET TFT MODE & hsync+Vsync+DEN MODE
  TFT_7_Write_Data(0x03); //SET horizontal size=800-1 HightByte
  TFT_7_Write_Data(0x1f); //SET horizontal size=800-1 LowByte
  TFT_7_Write_Data(0x01); //SET vertical size=480-1 HightByte
  TFT_7_Write_Data(0xdf); //SET vertical size=480-1 LowByte
  TFT_7_Write_Data(0x00); //SET even/odd line RGB seq.=RGB
  TFT_7_Command_Write(0xf0,0x00); //SET pixel data I/F format=8bit
  TFT_7_Command_Write(0x36,0x09); //SET address mode=flip vertical, BGR
  //TFT_7_Command_Write(0x3a,0x60); // SET R G B format = 6 6 6
  TFT_7_Write_Command(0xe2); //SET PLL freq=113.33MHz
  digitalWrite(pinRS_LCD,HIGH);//GPIO_SetBits(GPIOC, RS);
  TFT_7_Write_Data(0x22);
  TFT_7_Write_Data(0x03);
  TFT_7_Write_Data(0x04);
  TFT_7_Write_Command(0xe6); //SET PCLK freq=33.26MHz
  digitalWrite(pinRS_LCD,HIGH);//GPIO_SetBits(GPIOC, RS);
  TFT_7_Write_Data(0x02);
  TFT_7_Write_Data(0xff);
  TFT_7_Write_Data(0xff);
  TFT_7_Write_Command(0xb4); //SET HBP,
  digitalWrite(pinRS_LCD,HIGH);  //GPIO_SetBits(GPIOC, RS);
  TFT_7_Write_Data(0x03); //SET HSYNC Total
  TFT_7_Write_Data(0xef);
  TFT_7_Write_Data(0x00); //SET HBP
  TFT_7_Write_Data(0xa3);
  TFT_7_Write_Data(0x07); //SET VBP
  TFT_7_Write_Data(0x00); //SET Hsync pulse start position
  TFT_7_Write_Data(0x00);
  TFT_7_Write_Data(0x00); //SET Hsync pulse subpixel start position
  TFT_7_Write_Command(0xb6); //SET VBP,
  digitalWrite(pinRS_LCD,HIGH);  //GPIO_SetBits(GPIOC, RS);
  TFT_7_Write_Data(0x01); //SET Vsync total = 496
  TFT_7_Write_Data(0xef);
  TFT_7_Write_Data(0x00); //SET VBP=4
  TFT_7_Write_Data(0x04);
  TFT_7_Write_Data(0x01); //SET Vsync pulse 2=1+1
  TFT_7_Write_Data(0x00); //SET Vsync pulse start position
  TFT_7_Write_Data(0x00);
  TFT_7_Write_Command(0x2a); //SET column address
  digitalWrite(pinRS_LCD,HIGH); //GPIO_SetBits(GPIOC, RS);
  TFT_7_Write_Data(0x00); //SET start column address=0
  TFT_7_Write_Data(0x00);
  TFT_7_Write_Data(0x03); //SET end column address=799
  TFT_7_Write_Data(0x1f);
  TFT_7_Write_Command(0x2b); //SET page address
  digitalWrite(pinRS_LCD,HIGH); //GPIO_SetBits(GPIOC, RS);
  TFT_7_Write_Data(0x00); //SET start page address=0
  TFT_7_Write_Data(0x00);
  TFT_7_Write_Data(0x01); //SET end page address=479
  TFT_7_Write_Data(0xdf);
  /*TFT_7_Write_Command(0x33); //SET scroll area
  GPIO_SetBits(GPIOC, RS);
  TFT_7_Write_Data(0x00); //SET top fixed area=0
  TFT_7_Write_Data(0x00);
  TFT_7_Write_Data(0x01); //SET vertical scrolling area=479
  TFT_7_Write_Data(0xdf);
  TFT_7_Write_Data(0x00); //SET bottom fixed area=0
  TFT_7_Write_Data(0x00);
  TFT_7_Write_Command(0x28); //SET display off */
 }
void TFT_7_Write_Command(unsigned char command)
{
  PORTA = command; //GPIO_Write(GPIOB, command);
  digitalWrite(pinRS_LCD,LOW); //GPIO_ResetBits(GPIOC, RS);
  digitalWrite(pinWR_LCD,LOW); //GPIO_ResetBits(GPIOC, nWR);
  digitalWrite(pinWR_LCD,HIGH); //GPIO_SetBits(GPIOC, nWR);
}
void TFT_7_Write_Data(unsigned char data1)
{
  digitalWrite(pinRS_LCD,HIGH); //GPIO_SetBits(GPIOC, RS);
  PORTA = data1; //GPIO_Write(GPIOB, data1);
  digitalWrite(pinWR_LCD,LOW); //GPIO_ResetBits(GPIOC, nWR);
  digitalWrite(pinWR_LCD,HIGH); //GPIO_SetBits(GPIOC, nWR);
}
void TFT_7_Command_Write(unsigned char REG,unsigned char VALUE)
{
  TFT_7_Write_Command(REG);
  TFT_7_Write_Data(VALUE);
}
void TFT_7_SendData(unsigned long color)
{
  digitalWrite(pinRS_LCD,HIGH); //GPIO_SetBits(GPIOC, RS);
  PORTA = color >> 16; //GPIO_Write(GPIOB, (color>>16));
  digitalWrite(pinWR_LCD,LOW); //GPIO_ResetBits(GPIOC, nWR);
  digitalWrite(pinWR_LCD,HIGH); //GPIO_SetBits(GPIOC, nWR);
  PORTA = color >> 8; //GPIO_Write(GPIOB, (color>>8));
  digitalWrite(pinWR_LCD,LOW); //GPIO_ResetBits(GPIOC, nWR);
  digitalWrite(pinWR_LCD,HIGH); //GPIO_SetBits(GPIOC, nWR);
  PORTA = color; // GPIO_Write(GPIOB, (color));
  digitalWrite(pinWR_LCD,LOW); //GPIO_ResetBits(GPIOC, nWR);
  digitalWrite(pinWR_LCD,HIGH); //GPIO_SetBits(GPIOC, nWR);
}

void TFT_7_WindowSet(unsigned int s_x,unsigned int e_x,unsigned int s_y,unsigned int e_y)
{
  TFT_7_Write_Command(0x2a); //SET page address
  TFT_7_Write_Data((s_x)>>8); //SET start page address=0
  TFT_7_Write_Data(s_x);
  TFT_7_Write_Data((e_x)>>8); //SET end page address=639
  TFT_7_Write_Data(e_x);
  TFT_7_Write_Command(0x2b); //SET column address
  TFT_7_Write_Data((s_y)>>8); //SET start column address=0
  TFT_7_Write_Data(s_y);
  TFT_7_Write_Data((e_y)>>8); //SET end column address=479
  TFT_7_Write_Data(e_y);
}

Were you ever successful? If you were, would you please report? I’m interested in trying this for my project, too.

Thank you.