0

RA8875 on GrandCentral not working
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

RA8875 on GrandCentral not working

by ykolly on Mon Mar 22, 2021 12:52 pm

Hello,
I have a Grandcentral M4 and a 7" display from buydisplay on SPI.
Basicaly the code was running on Arduino DUE and it work perfectly.
As well on Grandcentral it work with same connections if i use it with Circuitpython!
The same code on Grandcentral is not working (basic code)
Could someone tell me where i make a mistake ? I tried for a while and start to be crazy.

Thanks in advance for your suggestion

Yann

Code: Select all | TOGGLE FULL SIZE
#include <SPI.h>
#include "Adafruit_GFX.h"
#include "Adafruit_RA8875.h"
#define RA8875_CS 53
#define RA8875_RESET 22
Adafruit_RA8875 tft = Adafruit_RA8875(RA8875_CS, RA8875_RESET);

void setup() {
 Serial.begin(9600);
  while(!Serial){}
  pinMode(53, OUTPUT);
  Serial.println("RA8875 start");
  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.fillScreen(RA8875_BLACK);
  tft.textMode();
  tft.textSetCursor(150, 100);
  tft.textEnlarge(3);
  tft.textTransparent(RA8875_WHITE);
  tft.print("System Ready");
  Serial.println("System Ready");
 
}

void loop() {}


ykolly
 
Posts: 13
Joined: Tue Apr 02, 2019 2:40 pm

Re: RA8875 on GrandCentral not working

by adafruit_support_carter on Mon Mar 22, 2021 1:04 pm

Are you opening the Serial Monitor to get past this infinite loop?
Code: Select all | TOGGLE FULL SIZE
  while(!Serial){}

adafruit_support_carter
 
Posts: 20355
Joined: Tue Nov 29, 2016 2:45 pm

Re: RA8875 on GrandCentral not working

by ykolly on Mon Mar 22, 2021 1:52 pm

adafruit_support_carter wrote:Are you opening the Serial Monitor to get past this infinite loop?
Code: Select all | TOGGLE FULL SIZE
  while(!Serial){}


There is no feedback in serial monitor without this loop

ykolly
 
Posts: 13
Joined: Tue Apr 02, 2019 2:40 pm

Re: RA8875 on GrandCentral not working

by adafruit_support_carter on Mon Mar 22, 2021 1:54 pm

So you are opening a Serial Monitor when running this code?

adafruit_support_carter
 
Posts: 20355
Joined: Tue Nov 29, 2016 2:45 pm

Re: RA8875 on GrandCentral not working

by ykolly on Mon Mar 22, 2021 1:59 pm

adafruit_support_carter wrote:So you are opening a Serial Monitor when running this code?


Yes and even i remove this line i got nothing

ykolly
 
Posts: 13
Joined: Tue Apr 02, 2019 2:40 pm

Re: RA8875 on GrandCentral not working

by adafruit_support_carter on Mon Mar 22, 2021 2:50 pm

OK, just making sure you weren't getting trapped by that blocking loop. It happens a lot.

Not sure why the display is not working. Since it works with CircuitPython you at least know the hardware combo works. So hopefully it's just a matter of figuring out the correct setting on the Arduino side for your display.

adafruit_support_carter
 
Posts: 20355
Joined: Tue Nov 29, 2016 2:45 pm

Re: RA8875 on GrandCentral not working

by ykolly on Mon Mar 22, 2021 3:52 pm

adafruit_support_carter wrote:OK, just making sure you weren't getting trapped by that blocking loop. It happens a lot.

Not sure why the display is not working. Since it works with CircuitPython you at least know the hardware combo works. So hopefully it's just a matter of figuring out the correct setting on the Arduino side for your display.


Do you think it could be the spi speed ?

ykolly
 
Posts: 13
Joined: Tue Apr 02, 2019 2:40 pm

Re: RA8875 on GrandCentral not working

by adafruit_support_carter on Mon Mar 22, 2021 4:01 pm

Possibly. Since you're switching from a DUE to a GrandCentral, it will be using a different Arduino core. And in the case of CircuitPython, it may be setting a different default speed than Arduino.

adafruit_support_carter
 
Posts: 20355
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.