Interfacing Adafruit RA8875 800x480 SPI with Touchscreen driver with arduino Due

Hi,

I am having issues in interfacing adafruit RA8875 Spi driver with arduino due.
I have checked all connections multiple times but no use. The buildtest exapmle of Adafruit_RA8875 library is still giving output like
--------------------------
RA8875 start -
255 -
RA8875 Not Found! -
--------------------------

I have tried using SPI pins and ICSP pins as well, but still i am not able to interface my tft successfully. I am sharing you guys all the connection details
and the program i am running. Kindly help me if anybody has prior interfaced 7 inch tft using RA8875- 800x480 driver with arduino due. any assistance regarding this issue will be highly appreciated.

// Connect SCLK to DUE SPI-3  (Hardware SPI clock)
// Connect MISO to DUE SPI-1  (Hardware SPI MISO)
// Connect MOSI to DUE SPI-4 (Hardware SPI MOSI)
// Connect INT to DUE Digital #3
// Connect CS to DUE Digital #10

// Connect RESET to DUE Digital #9


#include <SPI.h>
#include "Adafruit_GFX.h"
#include "Adafruit_RA8875.h"



#define RA8875_INT 3
#define RA8875_CS 10
#define RA8875_RESET 9

Adafruit_RA8875 tft = Adafruit_RA8875(RA8875_CS, RA8875_RESET);
uint16_t tx, ty;

void setup()
{
 Serial.begin(9600);
 Serial.println("RA8875 start");

 /* Initialize the display using 'RA8875_480x80', 'RA8875_480x128', 'RA8875_480x272' or 'RA8875_800x480' */
 if (!tft.begin(RA8875_800x480)) {
   Serial.println("RA8875 Not Found!");
   while (1);
 }

 Serial.println("Found RA8875");

 tft.displayOn(true);
 tft.GPIOX(true);      // Enable TFT - display enable tied to GPIOX
 tft.PWM1config(true, RA8875_PWM_CLK_DIV1024); // PWM output for backlight
 tft.PWM1out(255);

 // With hardware accelleration this is instant
 tft.fillScreen(RA8875_WHITE);

 // 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);

 tft.fillRect(11, 11, 398, 198, RA8875_BLUE);
 tft.drawRect(10, 10, 400, 200, RA8875_GREEN);
 tft.fillRoundRect(200, 10, 200, 100, 10, RA8875_RED);
 tft.drawPixel(10,10,RA8875_BLACK);
 tft.drawPixel(11,11,RA8875_BLACK);
 tft.drawLine(10, 10, 200, 100, RA8875_RED);
 tft.drawTriangle(200, 15, 250, 100, 150, 125, RA8875_BLACK);
 tft.fillTriangle(200, 16, 249, 99, 151, 124, RA8875_YELLOW);
 tft.drawEllipse(300, 100, 100, 40, RA8875_BLACK);
 tft.fillEllipse(300, 100, 98, 38, RA8875_GREEN);
 // Argument 5 (curvePart) is a 2-bit value to control each corner (select 0, 1, 2, or 3)
 tft.drawCurve(50, 100, 80, 40, 2, RA8875_BLACK);
 tft.fillCurve(50, 100, 78, 38, 2, RA8875_WHITE);

 pinMode(RA8875_INT, INPUT);
 digitalWrite(RA8875_INT, HIGH);

 tft.touchEnable(true);

 Serial.print("Status: "); Serial.println(tft.readStatus(), HEX);
 Serial.println("Waiting for touch events ...");
}

void loop()
{
 float xScale = 1024.0F/tft.width();
 float yScale = 1024.0F/tft.height();

 /* Wait around for touch events */
 if (! digitalRead(RA8875_INT))
 {
   if (tft.touched())
   {
     Serial.print("Touch: ");
     tft.touchRead(&tx, &ty);
     Serial.print(tx); Serial.print(", "); Serial.println(ty);
     /* Draw a circle */
     tft.fillCircle((uint16_t)(tx/xScale), (uint16_t)(ty/yScale), 4, RA8875_WHITE);
   }
 }
}

Read the first topic, "How to use this Forum", and use the advice given. That will increase the chances of receiving useful answers.

Hi,

I was already using all my knowledge, i thought this forum would also be helpful in gaining more knowledge. Well, thanks for your advice.Surely, I will follow your words.However, I am on it for about a week but still I am not able to diagnose the issue. Furthermore,I have been working for more than 3 years on different platforms , I have used FPGAs, PLCs, PIC microcontrollers and arduino as well, as it's not like that I am working for first time.However, It's true that I am using this forum for first time so, for sure I will read the first topic as you have mentioned.

Kind Regards

Read the advice to gain more knowledge.
Use code tags to post code. Wiring diagrams are often very helpful for us.

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