0

Grandcentral M4 / Arduino IDE / RA8875 no display
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Grandcentral M4 / Arduino IDE / RA8875 no display

by Arthur321 on Sat May 01, 2021 12:28 pm

Hello,
I connect the Grandcentral M4 board to a Buydisplay 5" / RA8875 / SPI.
I run a demo test from the samples from the circuit python library succesfully with following configuration

Code: Select all | TOGGLE FULL SIZE
# Configuration for CS and RST pins:
cs_pin = digitalio.DigitalInOut(board.D10)
rst_pin = digitalio.DigitalInOut(board.D34)
int_pin = digitalio.DigitalInOut(board.D35)

# Config for display baudrate (default max is 6mhz):
BAUDRATE = 6000000
# Setup SPI bus using hardware SPI:
spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO)
# Create and setup the RA8875 display:
display = ra8875.RA8875(spi, cs=cs_pin, rst=rst_pin, baudrate=BAUDRATE)


When i try to run exactly the same configuration of wiring connection with the Arduino IDE (Adafruit RA8875 v.1.4.0 lib and older...), nothing happened (black screen)
Code: Select all | TOGGLE FULL SIZE
#include <SPI.h>
#include "Adafruit_GFX.h"
#include "Adafruit_RA8875.h"
#define RA8875_INT 35
#define RA8875_CS 10
#define RA8875_RESET 34
Adafruit_RA8875 tft = Adafruit_RA8875(RA8875_CS, RA8875_RESET);


void setup() {
Serial.begin(9600);

  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(160);
  tft.touchEnable(true); 
  tft.fillScreen(RA8875_RED);
  tft.textMode();
  tft.cursorBlink(32);
  tft.textSetCursor(100, 30);
  tft.print("Hello World");


Does anyone have any idea or solution to this problem ?

Thanks in advance for your help

Arthur

Arthur321
 
Posts: 3
Joined: Sat May 01, 2021 12:02 pm

Re: Grandcentral M4 / Arduino IDE / RA8875 no display

by blnkjns on Sun May 02, 2021 4:10 am

What happens if you wire it completely matching the demo-script?
Code: Select all | TOGGLE FULL SIZE
#define RA8875_INT 3
#define RA8875_CS 10
#define RA8875_RESET 9

Adafruit_RA8875 tft = Adafruit_RA8875(RA8875_CS, RA8875_RESET);
I would expect other pins to work, I believe the M4 can have interrupts on any pin for the Touch input, so it is kind of strange.
Do you get an error message of any kind, or serial output with a feedback message?
Did you install the depency for the Touch screen: the STMPE610 library?

blnkjns
 
Posts: 663
Joined: Fri Oct 02, 2020 3:33 am

Re: Grandcentral M4 / Arduino IDE / RA8875 no display

by Arthur321 on Mon May 03, 2021 10:22 am

Thank you for your answer, but touch functions are not my problem, even interrupt of the M4.

The problem is only the screen doesn't wake up

Anybody from Adafruit has an idea ?

Thanks

Arthur

Arthur321
 
Posts: 3
Joined: Sat May 01, 2021 12:02 pm

Re: Grandcentral M4 / Arduino IDE / RA8875 no display

by Arthur321 on Fri May 28, 2021 11:58 am

Hello,
I ordered a RA8875 Board from Adafruit to know if i'm completely stupid or not...

The library work well with the Ada board and the Buydisplay screen on M4, M0, Due, ... with Mosi, Miso, Sck, CS and an INT pin.

If i try with the buydisplay and his own RA8875, on Due and AVR boards the library work fine even if the RST pin is not connected.
If i use an M4 or M0 board, it does not work with or without RST connection.

That's all folks (i'm a bit in trouble, i'm unable to correct the library for that)

Thanks for you attention if you read me.

Arthur321
 
Posts: 3
Joined: Sat May 01, 2021 12:02 pm

Re: Grandcentral M4 / Arduino IDE / RA8875 no display

by adafruit_support_mike on Fri May 28, 2021 10:59 pm

The non-Adafruit RA8875 board may have different connections than ours, or might use a different chip variant.

Your best bet is to contact the maker and see what code they have to support the board.

adafruit_support_mike
 
Posts: 63052
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.