Compare your wires to the 3rd photo on msg #15. Notice the RA8875 "VIN" pin connects differently on yours than on the known-good photo.
/**************************************************************************/
/*!
Waits for screen to finish by polling the status!
*/
/**************************************************************************/
boolean Adafruit_RA8875::waitPoll(uint8_t regname, uint8_t waitflag) {
/* Wait for the command to finish */
while (1)
{
uint8_t temp = readReg(regname);
if (!(temp & waitflag))
return true;
}
return false; // MEMEFIX: yeah i know, unreached! - add timeout?
}
/**************************************************************************/
/*!
Waits for screen to finish by polling the status!
*/
/**************************************************************************/
boolean Adafruit_RA8875::waitPoll(uint8_t regname, uint8_t waitflag) {
/* Wait for the command to finish */
/* while (1)
{
uint8_t temp = readReg(regname);
if (!(temp & waitflag))
return true;
} */
return false; // MEMEFIX: yeah i know, unreached! - add timeout?
}
// Play with PWM
for (uint8_t i=255; i!=0; i-=5 )
{
tft.PWM1out(i);
delay(10);
}
for (uint8_t i=0; i!=255; i+=5 )
{
tft.PWM1out(i);
delay(10);
}
tft.PWM1out(255);
/* tft.fillScreen(RA8875_RED);
delay(500);
tft.fillScreen(RA8875_YELLOW);
delay(500);
tft.fillScreen(RA8875_GREEN);
delay(500);
tft.fillScreen(RA8875_CYAN);
delay(500);
tft.fillScreen(RA8875_MAGENTA);
delay(500);
tft.fillScreen(RA8875_BLACK);*/
// Try some GFX acceleration!
tft.drawCircle(100, 100, 50, RA8875_BLACK);
tft.fillCircle(100, 100, 49, RA8875_GREEN);
....
/**************************************************************************/
/*!
Waits for screen to finish by polling the status!
*/
/**************************************************************************/
boolean Adafruit_RA8875::waitPoll(uint8_t regname, uint8_t waitflag) {
/* Wait for the command to finish */
/* while (1)
{
uint8_t temp = readReg(regname);
if (!(temp & waitflag))
return true;
} */
delay(20);
return false; // MEMEFIX: yeah i know, unreached! - add timeout?
}
now the code run execpted touchscreen (this is another problem)
[ATTACH=CONFIG]15680._xfImport[/ATTACH]
/* if (x != 0x75) {
return false;
} */
/**************************************************************************/
/*!
Sets the display in text mode (as opposed to graphics mode)
*/
/**************************************************************************/
void Adafruit_RA8875::textMode(void)
{
/* Set text mode */
writeCommand(RA8875_MWCR0);
uint8_t temp = readData();
temp |= RA8875_MWCR0_TXTMODE; // Set bit 7
writeData(temp);
/* Select the internal (ROM) font */
writeCommand(0x21);
temp = readData();
temp &= ~((1<<7) | (1<<5)); // Clear bits 7 and 5
writeData(temp);
}
uint8_t Adafruit_RA8875::readData(void)
{
digitalWrite(_cs, LOW);
spi_begin();
SPI.transfer(RA8875_DATAREAD);
uint8_t x = SPI.transfer(0x0);
spi_end();
digitalWrite(_cs, HIGH);
return x;
}
#if defined (ARDUINO_ARCH_ARC32)
uint32_t spi_speed = 12000000;
#else
uint32_t spi_speed = 4000000;
#endif
there is no problem with RA8875 ?
Please note! The RA8875 does not tri-state the MISO pin, it should not share that pin with any other SPI device (including an SD card reader) without the use of a 74HC125 or similar
Even the cheapest logic analyzers (Saleae Logic clones can be found on Amazon from 8€) can scan 8 pins at a time and directly decode the data protocol (UART, I2C, SPI, etc).