Teensy 3.6 and Adafruit_RA8875

Status
Not open for further replies.

gcharles

Member
Hello I would like to ask if someone managed to use the Adafruit_RA8875 library successfully with Teensy 3.6

My project is using Sumotoy Ra8875 library but I would need to switch to Adafruit one because of the load images from SPI flash that function seems work only with Adafriut library

Thanks Charles
 
Have you tried it? I do see that the Adafruit_RA8875 library does install as part of Teensyduino install. My quick look through it I did not see anything obvious that would make it not work.

As for needing to change... Other option might be to see what logical functions you need out of the Adafruit code base and see how hard it would be to add the same functionality with Sumotoys code base.
 
Interested in what you come up with, I have not made it to the display point in my project yet but it will require a RA8875. I was planning on modifying the library to isolate the RA8875 to its own SPI bus to avoid the tri-state issue, but I need it to communicate with the SD card as well.
 
As far as I know the Adafruit_RA8875 should "just work" on Teensy 3.6.

However, the RA8875 has the tri-state MISO problem in its hardware. No software library can fix that. It can't be used on the SPI bus as other chips, unless you add a tri-state buffer.
 
In my case I cannot make Adafruit library working it might be because I am using different SPI pins , I can only make it working with the modified library Sumotoy Ra8875 using SPIN in this link by Kurt https://github.com/KurtE/RA8875

Adafruit supports only the definition of below pins

#define RA8875_INT 3
#define RA8875_CS 10
#define RA8875_RESET 9
Adafruit_RA8875 tft = Adafruit_RA8875(RA8875_CS, RA8875_RESET);

------------------------------------------------------------------------------------------------------------
https://github.com/KurtE/RA8875 - Supports full definition of the pins and below is my setup which works

#define RA8875_MISO 12
#define RA8875_MOSI 7
#define RA8875_SCK 14
#define RA8875_CS 15
#define RA8875_RESET 23//any pin or nothing!

RA8875 tft = RA8875(RA8875_CS, RA8875_RESET, RA8875_MOSI, RA8875_SCK, RA8875_MISO);
-------------------------------------------------------------------------------------------------------------------------------------
 
Have you tried it? I do see that the Adafruit_RA8875 library does install as part of Teensyduino install. My quick look through it I did not see anything obvious that would make it not work.


As for needing to change... Other option might be to see what logical functions you need out of the Adafruit code base and see how hard it would be to add the same functionality with Sumotoys code base.

In my case I cannot make Adafruit library working it might be because I am using different SPI pins , I can only make it working with the modified library Sumotoy Ra8875 using SPIN in this link by Kurt https://github.com/KurtE/RA8875

Adafruit supports only the definition of below pins

#define RA8875_INT 3
#define RA8875_CS 10
#define RA8875_RESET 9
Adafruit_RA8875 tft = Adafruit_RA8875(RA8875_CS, RA8875_RESET);

------------------------------------------------------------------------------------------------------------
https://github.com/KurtE/RA8875 - Supports full definition of the pins and below is my setup which works

#define RA8875_MISO 12
#define RA8875_MOSI 7
#define RA8875_SCK 14
#define RA8875_CS 15
#define RA8875_RESET 23//any pin or nothing!

RA8875 tft = RA8875(RA8875_CS, RA8875_RESET, RA8875_MOSI, RA8875_SCK, RA8875_MISO);
-------------------------------------------------------------------------------------------------------------------------------------
 
My guess is you might be able to use standard library (not needing SPIN), but might have to do some other stuff, before the call to init the display (don't remember if it is something like tft.begin(...) or ...

But before that and/or before any SPI.begin, you could have done something like:
Code:
SPI.setMOSI(7);
SPI.setSCK(14);
Don't have to set MISO (but could same way) as it is default...

However again I don't have this display so hard to say if it needs anything else...
 
Thanks Kurt
your input works i can use Adafruit_RA8875 by setting the MOSI & SCK in the .cpp file I added the below just before SPI.begin and confirmed also that MISO no need to set but if someone is using different pin it might be useful to set in here also.

SPI.setMOSI(7);
SPI.setSCK(14);
//SPI.setMISO(12);
SPI.begin();


Thanks , I will proceed to see if I can make the touchscreen works now
 
Status
Not open for further replies.
Back
Top