7" 800(RGB)X480 TFT-display w/ RA8875 driver

I have a 7" 800(RGB)X480 TFT-display w/ RA8875 driver, It's 4-spi interface and I need to know how to wire up and to program it with Arduino and Arduino IDE.

There are the following pins: (**Touch screen control, PIN: CON1:27~32 pin) (Con4: SPI pins)

CON1: CON4:
1 VSS 9 DB1 17 DB9 25 /INT 1 VSS
2 VDD 10 DB2 18 DB10 26 LEDC 2 VDD
3 /REST 11 DB3 19 DB11 27 TP_CLK 3 SCL
4 /RD 12 DB4 20 DB12 28 TP_CS 4 SDI
5 /WR 13 DB5 21 DB13 29 TP_DIN 5 SDO
6 /CS 14 DB6 22 DB14 30 TP_BUSY 6 /CS
7 /RS 15 DB7 23 DB15 31 TP_DOUT 7 /REST
8 DB0 16 DB8 24 /WAIT 32 TP_INT 8 NC

I would start by googling it. Adafruit makes a RA8875 driver board here. It would be a good starting place to see how they drive their board and see if yours is similar and compare the wiring.

Thank you for the answer.

This Adafruit driver board looks to work easily, but my TFT module display already has the RA8875 on board and there are more pins and named different.

As you can see the attached image.

And sorry for my English.

mpinhocode:
This Adafruit driver board looks to work easily, but my TFT module display already has the RA8875 on board and there are more pins and named different.

I think what you should do is figure out how to put the RA8875 into SPI mode. Then you can ignore the 24-pin parallel interface connector and use the Adafruit RA8875 library: GitHub - adafruit/Adafruit_RA8875: Adafruit Arduino library driver for the RA8875 TFT driver

Oh, ok... I will try this, but if anyone has any tips or solutions, please tell me...

DISPLAY7''-convertido.pdf (130 KB)

The first hint would be to read the dtasheet:
[https://www.raio.com.tw/data_raio/Datasheet/RA88%20Series/Simple_2012/RA8875_Brief_DS_V10_eng.pdf](http://"https://www.raio.com.tw/data_raio/Datasheet/RA88 Series/Simple_2012/RA8875_Brief_DS_V10_eng.pdf")

It looks like the labels on your pinout don't match the labels the manufacturer uses for the RA8875. I will be using the pin names from the datasheet.

Looks like you set the PS pin HIGH to select Serial (SPI/I2C) instead of the 8/16-bit parallel interface.

Then set the SIFS[1:0] pins to 1,0 to select 4-wire SPI.

SCL <- SCL
SDI <- MOSI
SDO -> MISO
SCS# <- SS (Slave Select)
IICA[1:0] are for I2C. Connect both to VDDP

Your pinout seems to show a 16-pin parallel interface and two SPI interfaces. The RS8875 has two SPI interfaces (Display and EEPROM). It could be that one of the two on your pinout is the Display and one is the EEPROM but it is also possible that one goes to the EEPROM and the other goes to a separate chip (like a separate Touch Screen controller) and you are expected to use the parallel interface to control the display. In that case the Adafruit library will be of little help and you might need an Arduino MEGA and a lot of programming to get the parallel interface to work.

The pin is H/L level , active low

Connect it to the processor's /rst pin, or drive it with an I/O pin

Thank you a lot for your answers.

So, one of the SPI interfaces, as you said, is going to another chip a Touch Screen Controller (TSC 20461), and I have an Arduino Mega so how to wire up and programming... I'm a beginner...

@mpinhocode

Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum.

Could you also take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.

if you would like your post moved please use the "report to moderator" option

Sorry for that, I want to colaborate with all forum's people ... thank you !!

TheMemberFormerlyKnownAsAWOL:
Connect it to the processor's /rst pin, or drive it with an I/O pin

So, how could I drive it? I don't get it, sorry...
What is the logic for this pin?

Hello again,

I figured out the full datasheet of this display and I noticed that I have to use an Arduino Due because the I/O pins are 3.3V.

HGF07063V1-LWH-LV-TP-U - TFT DISPLAY.pdf (289 KB)

It would make a lot of sense to use a Due, but 3.3V versions of some of the other boards are available, albeit at reduced clock speeds.

Life is much simpler if you just post a link to the actual item that you have bought.

Otherwise we just have to guess.

Yes, there are several libraries that will talk to an SPI RA8875.
And several that will talk to a XPT2046 Resistive Touch Controller.

David.

The image attached shows the diagram that I am using, Anyone could help me ?

/*
ROUND GAUGE EXAMPLE with ballistic! only 800x480
This example show how to create 3 round gauge that react like the real one with (almost) correct ballistic
The 3 gauges read analog values from A0,A1 & A2
It's slow since the ballistic uses delay, a better example will be posted soon
Created by S.U.M.O.T.O.Y - Max MC Costa
If you modify or get better result please let me know
*/
#include <SPI.h>
#include <RA8875.h>
#include <math.h>


volatile int16_t curVal[6] = { -1, -1, -1, -1, -1, -1};
volatile int16_t oldVal[6] = {0, 0, 0, 0, 0, 0};
const int16_t posx[6] = {63, 193, 323, 453, 583, 713};
const int16_t posy[6] = {63, 63, 63, 63, 63, 63};
const int16_t radius[6] = {63, 63, 63, 63, 63, 63};
//const uint8_t analogIn[6] = {A0, A1, A2, A3, A8, A9};
const uint16_t needleColors[6] = {RA8875_GREEN, RA8875_CYAN, RA8875_MAGENTA, RA8875_YELLOW, RA8875_LIGHT_ORANGE, RA8875_RED};
const uint8_t degreesVal[6][2] = {
  {150, 240},
  {150, 240},
  {150, 240},
  {150, 240},
  {150, 240},
  {150, 240},
};


#define RA8875_CS 10
#define RA8875_RESET 9//any pin or nothing!

RA8875 tft = RA8875(RA8875_CS, RA8875_RESET);


void setup() {
  Serial.begin(38400);
  long unsigned debug_start = millis ();
  while (!Serial && ((millis () - debug_start) <= 5000)) ;
  tft.begin(RA8875_800x480);
  for (uint8_t i = 0; i < 6; i++) {
    drawGauge(posx[i], posy[i], radius[i]);
  }
}

void loop(void) {

  for (uint8_t i = 0; i < 6; i++) {
    curVal[i] = random(255);
    drawNeedle(i, RA8875_BLACK);
  }
  delay(10);
}


void drawGauge(uint16_t x, uint16_t y, uint16_t r) {
  tft.drawCircle(x, y, r, RA8875_WHITE); //draw instrument container
  tft.roundGaugeTicker(x, y, r, 150, 390, 1.3, RA8875_WHITE); //draw major ticks
  if (r > 15) tft.roundGaugeTicker(x, y, r, 165, 375, 1.1, RA8875_WHITE); //draw minor ticks
}



void drawNeedle(uint8_t index, uint16_t bcolor) {
  uint16_t i;
  if (curVal[index] > 255) return;//curVal[index] = 255;
  if (curVal[index] <   0) return;//curVal[index] = 0;
  if (oldVal[index] != curVal[index]) {
    if (curVal[index] > oldVal[index]) {
      for (i = oldVal[index]; i <= curVal[index]; i++) {
        if (i > 0) drawPointerHelper(index, i - 1, posx[index], posy[index], radius[index], bcolor);
        drawPointerHelper(index, i, posx[index], posy[index], radius[index], needleColors[index]);
        if ((curVal[index] - oldVal[index]) < (128)) delay(1);//ballistic
      }
    }
    else {
      for (i = oldVal[index]; i > curVal[index]; i--) {
        drawPointerHelper(index, i + 1, posx[index], posy[index], radius[index], bcolor);
        drawPointerHelper(index, i, posx[index], posy[index], radius[index], needleColors[index]);
        //ballistic
        if ((oldVal[index] - curVal[index]) >= 128) {
          delay(1);
        } else {
          delay(2);
        }
      }
    }
    oldVal[index] = curVal[index];
  }//val != oldval
}

void drawPointerHelper(uint8_t index, int16_t val, uint16_t x, uint16_t y, uint16_t r, uint16_t color) {
  float dsec;
  const int16_t minValue = 0;
  const int16_t maxValue = 255;
  dsec = (((float)(uint16_t)(val - minValue) / (float)(uint16_t)(maxValue - minValue) * degreesVal[index][1]) + degreesVal[index][0]) * (PI / 180);
  uint16_t w = (uint16_t)(1 + x + (cos(dsec) * (r / 1.35)));
  uint16_t h = (uint16_t)(1 + y + (sin(dsec) * (r / 1.35)));
  tft.drawLine(x, y, w, h, color);
  tft.fillCircle(x, y, 2, color);
}

david_prentice:
Life is much simpler if you just post a link to the actual item that you have bought.

Otherwise we just have to guess.

Yes, there are several libraries that will talk to an SPI RA8875.
And several that will talk to a XPT2046 Resistive Touch Controller.

David.

Could you suggest one, please? I find one but didn't work, the display shows only a gray screen...

I bought from here a long time ago... I think they don't sell anymore http://www.china-lcdmodules.com/tft-display-modules/

And I posted here the datasheet too

HGF07063V1-LWH-LV-TP-U - TFT DISPLAY.pdf (289 KB)

I don't think much of your link. I was hoping to see a photo of the pcb.

Hey-ho. You will just have to try Adafruit_RA8875 or Sumotoy's RA8875 library.

Your SPI, RST, DC pins appear to be identifiable from printed pin numbers (from the datasheet)

I suggest that you wire the display to your Due correctly (to match the constructor)
Don't connect MISO if you have other SPI devices on the hardware SPI bus.

If you want readers to inspect your wiring, you need to provide a clear photo with different coloured wires that are pulled straight or bent neatly.

David.

Oops. It looks as if it is a 9-bit SPI interface. i.e. no Data/Command line.
Libraries were probably expecting 8-bit + D/C pin. In fact 9-bit SPI is a nightmare for AVR/Freescale but straightforward with Due.
ADS7843 (Touch controller) is much the same as XPT2046 or most other SPI Touch chips.

What do you think now?