Setting up TFT LCD screen with arudino Mega

I have an Open Smart 3.5" TFT LCD screen (ST7793) and I am trying to set it up with the arduino mega without a shield or other device (no MCUFRIEND). The problem I'm having is that the screen doesn't seem to display anything, it just stays white when I run the test code I'm trying to run (which doesn't return any errors). I'm not sure what to do, most online tutorials use either a UNO or a shield and are not working for me.

I've wired it with dupont wires according to one of the attached images, and the others are pictures of what my physical circuit looks like. I have also inputted the code I am trying to run, which outputs a white screen.

Any help would be appreciated.



image

#include <Adafruit_GFX.h>    
#include <Adafruit_TFTLCD.h>

#define LCD_CS A3 
#define LCD_CD A2 
#define LCD_WR A1 
#define LCD_RD A0 
#define LCD_RESET A4 

#define BLACK   0x0000
#define BLUE    0x001F
#define RED     0xF800
#define GREEN   0x07E0
#define CYAN    0x07FF
#define MAGENTA 0xF81F
#define YELLOW  0xFFE0
#define WHITE   0xFFFF

Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);

void setup() {
  tft.reset();
  tft.begin(0x9481);
  tft.setRotation(1);
  tft.fillScreen(RED);
  tft.fillScreen(GREEN);
  tft.fillScreen(BLUE);
  tft.fillScreen(BLACK);
  delay(1000);
}

void loop() {
  // put your main code here, to run repeatedly:

}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.