Hi @cryptodeity ,
there is (was) an issue with white screen and TFT touchdisplays as some of them use the same pins for the display and the touchscreen function.
Do you find lines like this in the code you used?
#define YP A2
#define XM A3
#define YM 8
#define XP 9
TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);
MCUFRIEND_kbv tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);
The TouchScreen evaluates the resistance measured using XP, YP and XM, YM.
The library "TouchScreen.h" sets XM and YP to INPUT mode everytime getPoint() is called but does not restore the previous state. Now when the drawing functions use these pins, they are no longer in OUTPUT mode ...
This is a snippet from the lib:
// Source: https://github.com/adafruit/Adafruit_TouchScreen/blob/master/TouchScreen.cpp
TSPoint TouchScreen::getPoint(void) {
int x, y, z;
int samples[NUMSAMPLES];
uint8_t i, valid;
valid = 1;
pinMode(_yp, INPUT);
pinMode(_ym, INPUT);
pinMode(_xp, OUTPUT);
pinMode(_xm, OUTPUT);
#if defined(USE_FAST_PINIO)
*xp_port |= xp_pin;
*xm_port &= ~xm_pin;
#else
digitalWrite(_xp, HIGH);
digitalWrite(_xm, LOW);
#endif
(There are actually several places in this function where INPUT/OUTPUT mode of the four pins are changed ... Finally XM and YP seem to stay in INPUT mode).
You may try this
TSPoint p = ts.getPoint();
pinMode(YP, OUTPUT);
pinMode(XM, OUTPUT);
after the call of getPoint() to reset the pin modes ...
Good luck!
ec2021