Ra8876

gotty101

Member
I know its a real long shot but has anyone had success with this display (https://www.buydisplay.com/spi-1280x400-7-84-ips-tft-lcd-module-with-ra8876-capacitive-touch-panel) ?
I have tried contacting buydisplay but they cant help.

The display is based on the RA8876 chip and im having trouble getting it to work (ive got RA8875 displays using sumotoys lib to work great in the past just this one if confusing me)

Ive tried the library located from this thread (https://forum.pjrc.com/threads/58565-RA8876LiteTeensy-For-Teensy-T36-and-T40)
Ive altered the Ra8876_Lite.h file changing the following blocks

Code:
#define OSC_FREQ	10  // OSC clock frequency, unit: MHz.
#define DRAM_FREQ	100  // SDRAM clock frequency, unit: MHz. 
#define CORE_FREQ	100  // Core (system) clock frequency, unit: MHz. 
#define SCAN_FREQ	50  // Panel Scan clock frequency, unit: MHz.

Code:
#define W9825G6JH

Code:
/*TFT timing configure*/
#define TFT_MODE   0  //0:SYNC_mode(SYNC+DE mode), 1: DE mode  //if sync only mode do not connect DE signal or XDE_INV = 1
#define XHSYNC_INV  0 // 0:no inversion, 1:inversion 
#define XVSYNC_INV  0 // 0:no inversion, 1:inversion 
#define XDE_INV     0 // 0:no inversion, 1:inversion 
#define XPCLK_INV  1  // 0:no inversion, 1:inversion 
#define HPW       24    //lcdHsyncPulseWidth
#define HND       160   //lcdHorizontalNonDisplay
#define HDW       400 
#define HST       160 //lcdHsyncStartPosition
#define VPW       2   //lcdVsyncPulseWidth
#define VND       10 //lcdVerticalNonDisplay
#define VDH       1280
#define VST       12  //lcdVsyncStartPosition

#define SCREEN_WIDTH 400 
#define SCREEN_HEIGHT 1280 

#define PAGE1_START_ADDR  0
#define PAGE2_START_ADDR  400*1280*2
#define PAGE3_START_ADDR  400*1280*2*2
#define PAGE4_START_ADDR  400*1280*2*3
#define PAGE5_START_ADDR  400*1280*2*4
#define PAGE6_START_ADDR  400*1280*2*5
#define PAGE7_START_ADDR  400*1280*2*6
#define PAGE8_START_ADDR  400*1280*2*7
#define PAGE9_START_ADDR  400*1280*2*8
#define PAGE10_START_ADDR  400*1280*2*9

#define PATTERN1_RAM_START_ADDR 400*1280*2*10
#define PATTERN2_RAM_START_ADDR (400*1280*2*10)+(16*16*2)
#define PATTERN3_RAM_START_ADDR (400*1280*2*10)+(16*16*2)+(16*16*2)

/*DMA picture data start address*/
#define WP1_ADDR  0
#define WP2_ADDR  400*1280*2
#define WP3_ADDR  400*1280*2*2
#define WP4_ADDR  400*1280*2*3
#define WP5_ADDR  400*1280*2*4
#define WP6_ADDR  400*1280*2*5

The teency seems to work and speak to the RA8876 but the display just stays blank. The SPI is wired up correctly and its being powered with 3.3v (reg set on the display to 3.3v), but no matter what i do the display stays black (the backlight is on)
Ive even tried RAIOs code for the arduino due (wired upto a due instead of a teency3.6 and with the same mods in the librarys header file i get the exact same result.

The serial monitor for the Due reports
Code:
RA8876 Lite
mydebug
RA8876 or RA8877 connect pass!
RA8876 or RA8877 initial Pass!
RA8876 or RA8877 Pass!




Can anyone help at all? Or should i buy another display in case i got a faulty one?

Kind Regards

Trev
 
Sorry I don't have any of these displays.

And if you had not mentioned it, I would have suggested looking at that earlier thread.

However I wonder how are you powering this display? You mentioned yours is 3.3v. The RA8875 boards I have ordered I have ordered with 5v with their own Voltage regulator.

I imagine that these draw a lot of power. Probably a lot more than a Teensy voltage regulator or most any other Micro controller has available to give it. If I read their spec document P14 for the display it takes 1050ma which is much greater than the 250ma the T4 reference card mentions as being available.

See SumoToys WIki page: https://github.com/sumotoy/RA8875/wiki/Power-Up-display-based-on-RA8875

I earlier had a 3.3v RA8875 board which I had issues worth. I finally ended up looking at the VR that is on one of my other displays and ordered a few either from Digikey or maybe even Amazon, and then soldered it onto the board, plus a couple of capacitor and removed a solder jumper and then that display worked better for me. Alternatively you could use some external 3.3v VR

Good luck
 
What demo program are you running? Is it one of the RA8876 Lite sketches? Do you have link to the Ra8876 Lite source code you are using?
When I bought the ER-TFTM101-1 10.1" from buy display I had problems with the SPI interface speed. This was something that I had to play with to get the Teensy 3.6 to work
with the RA8876 controller. It was based on lead length. My RA8876LiteTeensy library shows _MAXSPEED as 340000000. The RA8876 is capable of 50 MHz.
If you are using this library you probably need to play with this setting. That is where I started when I was having the same problem. Obviously the TFT video timings must
change to match the ER-TFTM0784-1. I checked the interfacing differences between your display and mine (In the interfacing PDF's) yours are:
1 - Number of connected ground Pins. On your display: 1,2,13.
2 - Number of VDD pins connected. On your display: 3,4.
3 - Did you order the display configured for 3.3v or 5v. Mine was 5V.
4 - Touch screens are different types and pinouts are different. Have you connected the Touch Screen pins?
5 - If using the Teensy which SPI port are you using? RA8876LiteTeensy is using SPI0.

The following define is for the same SDRAM chip on my TFT board.
#define W9825G6JH
From what I am seeing these settings:
#define OSC_FREQ 10 // OSC clock frequency, unit: MHz.
#define DRAM_FREQ 100 // SDRAM clock frequency, unit: MHz.
#define CORE_FREQ 100 // Core (system) clock frequency, unit: MHz.
#define SCAN_FREQ 50 // Panel Scan clock frequency, unit: MHz.
are different than:
#define OSC_FREQ 10 // OSC clock frequency, unit: MHz.
#define DRAM_FREQ 120 // SDRAM clock frequency, unit: MHz.
#define CORE_FREQ 120 // Core (system) clock frequency, unit: MHz.
#define SCAN_FREQ 50 // Panel Scan clock frequency, unit: MHz.
on my display. Do you have the SDRAM chip on your display?

Can you post a link to the Ra8876_Lite library you are using?
This TFT controller is a complicated to understand but has a lot of of potential.

EDIT: The SDRAM chips are different. Mine is W9812G6JH. Your define is the one above mine. Your SDRAM settings should be different.
 
Last edited:
Hi Guys thanks for the replies

Im powering the display using a 3.3v Switching Regulator, ive even tried my bench supply set to 3.3v. Like you say, they do draw a fair bit its reporting around 1amp draw with the teency and display.
The jumper on my display is set so it can be powered at 3.3v max, which works nicely with the teency 3.6 as thats 3.3v and the display only accepts 3.3v logic from that i understand.


I tried your library WWatson, on my teency 3.6, with the display hooked upto the primary SPI0 pins. Ive not linked up the touch ic yet as i thought one thing at a time, and ive got the ground and vdd connected up like you say with a 3.3v supply.

When i didnt have any success (along with messing about with the screen widths ect) i thought i would try my arduino due as i saw RAIO supply example code for the Due on their website (https://www.raio.com.tw/en/Support_RA887677.html)
So i downloaded this and wired it up to the SPI as shown on the image in their example code. Any nothing, (i had not changed the screen width at the time). So then i thought it may be screen width and timings, so i downloaded the
'8051 Interfacing and Demo Code' for that display from buydisplays website (https://www.buydisplay.com/spi-1280x400-7-84-ips-tft-lcd-module-with-ra8876-capacitive-touch-panel) and looked through the timings they where using to make sure mine matched what theirs was (i didnt alter the spi speed RAIO had it set to 4MHz in their example)
But even after doing this no joy.

With regards to the SDRAM, i think it was marked as a W9812G6KH which can run at 166MHz and cas of 3. In buydisplays example they where using the same timing settings as the W9812G6JH.

Ive not got excessivly long leads (around 10cm max currently) and there is no other devices on the SPI.


I remember my RA8875 being funny about the supply, hence trying two different supplies to rule this out. If only the RA8875 could have driven this screen.

Thanks again for your help guys

Trev
 
Burned a number of hours with a similar problem. After attempting to initialize the SDRAM, the the Status Register (STSR) would always report 0b00000001, indicating that the SDRAM had not yet finished initialization.

Almost every library I've seen (including the one that BuyDisplay provides) busy loops checking for the "SDRAM ready for access" to be set in the STSR register. See for example: https://github.com/wwatson4506/Ra88...51304ee5da1d667f8b017/src/RA8876_t3.cpp#L1005

However if you look in "8.1.1 SDRAM Initialization", it states as the final step:

Check Command register 0xE4 bit-0 and wait it becomes 1 then exit initialization.

What I have found (driving the RA8876 via 8-bit parallel interface) is that if you don't read this register, SDRAM initialization will hang. After reading from the register, the STSR shows a sane value of 0b01010100 and I can from there on drive the display as expected.

So the wait loop should be predicated on bit-0 of the 0xE4, not the related bit from STSR.

Honestly, I'm not really sure how STSR is supposed to work. After initialization is complete and I start drawing stuff, I see 0b11100000 for STSR consistently, but that suggests that SDRAM is now *not* ready, which seems to be a contradiction.

Anyway, hope this saves someone some hassle :)
 
Back
Top