ILI948x_t41_p - a parallel display driver for Teensy 4.1

Thanks. @KurtE mentioned that you need 8 consecutive Flexio pins. Looks at the T4 - not possible to get there from here. The T4 does not have 8 consecutive pins. The pins you have:
Note: We probably could make something that works, Not sure if it is worth it, but, suppose:
We define:
Code:
#define BUS_WIDTH 10
Note in the library currently defined as:
Code:
#define BUS_WIDTH 9

and define:
Code:
#define DISPLAY_D0 19   // FlexIO3: 0/ 19
#define DISPLAY_D1 18   // FlexIO3: 1/ 18
#define DISPLAY_D2 14   // FlexIO3: 2/ 14
#define DISPLAY_D3 15   // FlexIO3: 3/ 15
D4 BOGUS
D5 BOGUS
#define DISPLAY_D6 17   // FlexIO3: 6/ 17
#define DISPLAY_D7 16   // FlexIO3: 7/ 16
#define DISPLAY_D8 22   // FlexIO3: 8/ 22
#define DISPLAY_D9 23   // FlexIO3: 9/ 23


everywhere we do something like:
Code:
p->SHIFTBUF[_write_shifter] = ILI9488_RAMWR;
We change it to something like:
Code:
p->SHIFTBUF[_write_shifter] = ((ILI9488_RAMWR & 0xf0) << 2) | (ILI9488_RAMWR & 0x0f);

And this is for every byte output: Like when we output 16 bit colors we need to handle both the top byte and bottom byte...
 
I was going to bitshift into the shifter buffer on the T4.0, that way at least have polling support.
interrupt would work as well, but you are limited to around half the capacity of the shifter buffers as you need 16 bits length per 8 bit transmit with the bit shifting method
 
Ive got a 4” nt35510 display on the way that supports 8/16 parallel interface
Will try get it up and running with the latest version of the library once here
 
Thought I would mention, that while waiting for DB5 replacement (Thanks @defragster ), which should arrive tomorrow.

I have been back playing some with the ILI948x parallel display library, to get it to work on T4...
Which has enough flexio pins on FlexIO3 but they are not consecutive. It does have two nibbles separated by 2 flexio pins..
The code is more or less hard coded for this, but I do have most of it working now.

I pushed up a new branch on @mjs513 github:

1720705691919.png


I have not tried yet the multi-beat (async) code, that uses interrupts... No DMA on FlexIO3
 
Quick update: I have some Async update working. However there appears to be something sticky on the mode or the like... That is If I do
the updateAsync (which does by interrupts), if I try to update screen again without FB, it does not redraw...

But the other types still appear to work.

Here is part of my clean well organized desktop:
1720733460995.png


With T4.1 upper left, T4 sort of center. Micromod bottom left, and DB4.5 bottomish right

All of them updated by either DMA or Interrupt depending on which FlexIO was used.

Soon figure out why the mode issue... But first a break
 
@KurtE - you noted Yellowed image somewhere (another thread?) until you upped the SDRAM speed from 206 to 216? That would have been on DB4.0. That seems odd the timing could be that close. Would really be bad or unusable at spec 166 then?
> would that be different with the new DB voltage curve?
> does that work differently at slower MCU clock like 528 MHz?

Here is part of my clean well organized desktop:
SO many wires! What pencils are those?

Metric 0402 caps are even smaller when they are off the board where they are outlined with solder and pads and silkscreen.
 
@KurtE @mjs513 - hooked up the DB5.0 to the RA8876 and ran through all of the tests (8-bit). Everything is working except for:
Code:
"RA8876_pictureEmbed.ino"

Display T4.1 Extended card CrashReport:
  A problem occurred at (system time) 8:0:14
  Code was executing from address 0x3CDC
  CFSR: 82
        (DACCVIOL) Data Access Violation
        (MMARVALID) Accessed Address: 0x134
  Temperature inside the chip was 50.52 °C
  Startup CPU clock speed is 528MHz
  Reboot was caused by auto reboot after fault or bad interrupt detected

"writeRotatedRect_ra8876.ino"
CrashReport:
  A problem occurred at (system time) 8:9:55
  Code was executing from address 0x3C54
  CFSR: 82
        (DACCVIOL) Data Access Violation
        (MMARVALID) Accessed Address: 0x164
  Temperature inside the chip was 49.14 °C
  Startup CPU clock speed is 528MHz
  Reboot was caused by auto reboot after fault or bad interrupt detected

I figure it is due to the clock speed/voltage issue. So I created "Arduino/hardware" folder and installed "teensy_dev" and got the menu entries in 1.8.19 and 2.3.2. Tried compiling "graphics.ino" and got this (partial list):
Code:
/home/wwatson/Arduino/hardware/teensy-dev/avr/variants/DevBrd5/variant.c:87:7: error: 'CORE_PIN46_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN4_PORTREG'?
   87 |     {&CORE_PIN46_PORTREG, &CORE_PIN46_CONFIG, &CORE_PIN46_PADCONFIG, CORE_PIN46_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN4_PORTREG
/home/wwatson/Arduino/hardware/teensy-dev/avr/variants/DevBrd5/variant.c:87:28: error: 'CORE_PIN46_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN42_CONFIG'?
   87 |     {&CORE_PIN46_PORTREG, &CORE_PIN46_CONFIG, &CORE_PIN46_PADCONFIG, CORE_PIN46_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN42_CONFIG
/home/wwatson/Arduino/hardware/teensy-dev/avr/variants/DevBrd5/variant.c:87:48: error: 'CORE_PIN46_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN4_PADCONFIG'?
   87 |     {&CORE_PIN46_PORTREG, &CORE_PIN46_CONFIG, &CORE_PIN46_PADCONFIG, CORE_PIN46_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN4_PADCONFIG
/home/wwatson/Arduino/hardware/teensy-dev/avr/variants/DevBrd5/variant.c:87:70: error: 'CORE_PIN46_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN42_BITMASK'?
   87 |     {&CORE_PIN46_PORTREG, &CORE_PIN46_CONFIG, &CORE_PIN46_PADCONFIG, CORE_PIN46_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN42_BITMASK
/home/wwatson/Arduino/hardware/teensy-dev/avr/variants/DevBrd5/variant.c:88:7: error: 'CORE_PIN47_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN4_PORTREG'?
   88 |     {&CORE_PIN47_PORTREG, &CORE_PIN47_CONFIG, &CORE_PIN47_PADCONFIG, CORE_PIN47_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN4_PORTREG
/home/wwatson/Arduino/hardware/teensy-dev/avr/variants/DevBrd5/variant.c:88:28: error: 'CORE_PIN47_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN42_CONFIG'?
   88 |     {&CORE_PIN47_PORTREG, &CORE_PIN47_CONFIG, &CORE_PIN47_PADCONFIG, CORE_PIN47_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN42_CONFIG
/home/wwatson/Arduino/hardware/teensy-dev/avr/variants/DevBrd5/variant.c:88:48: error: 'CORE_PIN47_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN4_PADCONFIG'?
   88 |     {&CORE_PIN47_PORTREG, &CORE_PIN47_CONFIG, &CORE_PIN47_PADCONFIG, CORE_PIN47_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN4_PADCONFIG
/home/wwatson/Arduino/hardware/teensy-dev/avr/variants/DevBrd5/variant.c:88:70: error: 'CORE_PIN47_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN42_BITMASK'?
   88 |     {&CORE_PIN47_PORTREG, &CORE_PIN47_CONFIG, &CORE_PIN47_PADCONFIG, CORE_PIN47_BITMASK},
Is this due to needing to install "core_variants_override" and if so where should I install it?
Thanks...
EDIT: I was thinking it replaces the cores folder in TD...
 
@wwatson I have a years old NIB RA8876 to connect - but no idea where to start ... not even sure where to look for wiring ... 158 posts here and other threads? There is the other display thread where post #1 is by @mjs513 ? any pointers welcome.

Those errors seem like what I was getting in past days - I had to update FLEXIO library ? Not sure what else but with that and complete CORES from ZIP and the Variants installed the IDE saw the Teensy_Dev and I could build then.

Though still stalled on rebuilding OneScanCapVar (variant version with no SDRAM_t4) as the speed changes failed and gave bad results - and not gotten back to that after mailing KurtE his new board.
 
@KurtE - you noted Yellowed image somewhere (another thread?) until you upped the SDRAM speed from 206 to 216? That would have been on DB4.0. That seems odd the timing could be that close. Would really be bad or unusable at spec 166 then?
Think that was on the SDRAM thread. The yellow tint was attaching a ILI9488 to the DB5 board using either a flexio or csi camera. Had to change from 206 mhz to 221 mhz (that was with the new voltage curve as part of the @KurtE's variant). Was running the DB5 at 564Mhz. Most of the camera examples have been updated by adding sdram_begin(32, 221, 1) in the sketch.

Had a similar issue with DB4 running at 600Mhz with 166mhz sdram if you remember. But that was before the latest discussion on voltage curvers and max clock of 528Mhz
 
@KurtE - you noted Yellowed image somewhere (another thread?) until you upped the SDRAM speed from 206 to 216? That would have been on DB4.0. That seems odd the timing could be that close. Would really be bad or unusable at spec 166 then?
> would that be different with the new DB voltage curve?
> does that work differently at slower MCU clock like 528 MHz?


SO many wires! What pencils are those?

Metric 0402 caps are even smaller when they are off the board where they are outlined with solder and pads and silkscreen
Pencil - a simple mechanical pencil .07 or such bought several years ago... Use those to scribble notes.

Yes lots of wires... Each of these parallel displays take something like 16 wires.
That is why started to make some adapters... Although still a pain to solder up.

Still lots of solder joints, but makes it a lot easier to move the one display to another board, then it is to rework all of those jumpers
 
@wwatson I have a years old NIB RA8876 to connect - but no idea where to start ... not even sure where to look for wiring ... 158 posts here and other threads? There is the other display thread where post #1 is by @mjs513 ? any pointers welcome.

Those errors seem like what I was getting in past days - I had to update FLEXIO library ? Not sure what else but with that and complete CORES from ZIP and the Variants installed the IDE saw the Teensy_Dev and I could build then.

Though still stalled on rebuilding OneScanCapVar (variant version with no SDRAM_t4) as the speed changes failed and gave bad results - and not gotten back to that after mailing KurtE his new board.
Not quite sure what a "NIB RA8876" :D Is this a Buydisplay ERTFTM101-1 TFT?

Edit: Is this the thread you are referring to?
https://forum.pjrc.com/index.php?threads/teensy-4-1-beta-test.60532/page-9#post-237896
 
Last edited:
a "NIB RA8876"
New In Box ... NIB - wow 4 years ago - yes that same 7" display never used yet ...
It is the same BuyDisplay TFT M070 that KurtE pictured showing that silkscreened on the back.

@KurtE - the pencil has decent looking grip ... I just got some stick BIC 0.7mm. Got a new .7mm pen that is too fat - so got .5mm diff brand pilot Precise ... had uniball but the ink stop flowing and that if a pain ... anyhow a .7mm lead writes about the same line as a .5mm pen.

@dogbone posted schematics - I didn't move them to the repo ...
 
New In Box ... NIB - wow 4 years ago - yes that same 7" display never used yet ...
It is the same BuyDisplay TFT M070 that KurtE pictured showing that silkscreened on the back.
The one I purchased back then was configured for SPI 4 wire. The product download pdf shows what the jumpers are for different configurations
 
Seems the bottom version marker was the same TFTM070-6 V1.1 in one image I saw go by.
I didn't get any DOCS for it - not sure I can find the page again -
oh - PDF comes up with the -6 added: https://www.buydisplay.com/download/manual/ER-TFTM070-6_Datasheet.pdf
Here's my board New In Box - four years later:
1720757374160.png


That's some half the battle - @KurtE did you assemble one of your board to work with the DB5?
Hope your Qwiic connectors arrived - I could have dropped some in but I only ordered a couple with the Rezo order and didn't find the ones SFun sent me years ago.
 
I see a -6 V2.0 here p #142 : https://forum.pjrc.com/index.php?th...splay-driver-for-teensy-4-1.72660/post-345304

here p #1159 the older -6 V1.1 is shown: https://forum.pjrc.com/index.php?threads/call-to-arms-teensy-sdram-true.73898/post-344292

That is two diff models - wondering if they connect and act the same. Would the board sent here build and work with the V1.1?

A picture of the adapter board for DB5 or manual wire diagram to that RA8876 would be welcome.

@KurtE - not seeing any update on your DB5 since it left Seattle ... hope you can get it before Monday
 
That's some half the battle - @KurtE did you assemble one of your board to work with the DB5?
Hope your Qwiic connectors arrived - I could have dropped some in but I only ordered a couple with the Rezo order and didn't find the ones SFun sent me years ago.
Maybe should continue some of this to other threads, But ...

Yes I assembled one. Most of it was working, before the DB5 stopped working. Pictures and the like, shown in the thread starting at about:

However I screwed up on the RA8876 hookup part of the board. In particular, the orientation of the connector pins was such that the connector would need to be soldered to the bottom of the board. like my other RA8876 board, which won't work in this case: I did order some adapters to swap rows from OSHPark... Mentioned at:
As I posted in other area, I screwed up the connector to the RA8876 on the shield. The two columns of pins are swapped.
Also while trying this out, my DB5, decide to head south...

Note: I did a quick and dirty pin column swap adapter board:
View attachment 35029
Which I ordered a set of 3 from OSHPark with supper swift ($11.50)...
As always, no promises.
It is sent out to fabrication... Probably here within a week.

As I suspected and verified from your picture, your display is configured for SPI.
1720787832010.png

1720787917319.png

More information on the RA8876 stuff is on the thread:
I now have the picture viewer working on both of them again:
1720456635139.png


SPI - top right, FlexIO bottom left
The SPI one is using a Teensy 4.1 board I made several years ago... This is the 2nd version, that can be used for this display or for the 4.3 inch
RA8875 which had the same pinout... (5" was different).
1720788578023.png


Pinouts and how to use yours? SPI? or Parallel?
SPI is reasonably simple other than counting pins on the display, here is showing what that adapter board did.
More complicated than needed, as I it had jumpers (Shunts) to connect up most connections, to allow me
to experiment with different SPI or Wire or... Plus some connections are different for touch between
boards...
1720789693583.png

As for hook up for Parallel: a little more complex in that more depends on which board you wish to connect to:
You need to connect up (VSS-GND, VDD=5v, RD, WR, CS, RS(DC), maybe BL_Control, and then 8(or 16) data wires
(pins 15-30 on display), ... As per where they go on the different Processors, depends...
There is a header file part of the current library, that sets up default pins depending on T41, MMOD, ...
T4 is not supported in that library yet, still getting it to work in this library for ILI948x...

We are working on some better adapters for these, but...
 
We are working on some better adapters for these, but...
One adapter that we have that we have been testing with makes use of @Paul 3 t4.1 board.
This is an image of @KurtE's setup with the adapter
1720791689901.png


this is of just the adapter on the board:

1720791723733.png


Probably will make one for the RA886 to a T4 and another one for the SPI versions. Really hate all the wires and especially when changing setups
 
Quick update: I now have it working I think reasonably well on T4...

Created PR back to main...
@mjs513 - you want to take a look, before I or you merge?

Note: I did rerun the kurts... test on it, T4.1 and MMOD.
 
I got my 3.97" NT35510 display in, 8/16 bit parallel, 800*480 resolution at 16bpp.
Which branch of @mjs513 fork should I use? gfx_flexio ?
Do I need @KurtE new FlexIO library?
And does DMA work on 16 bit bus? or is only 8 bit supported?
 
I got my 3.97" NT35510 display in, 8/16 bit parallel, 800*480 resolution at 16bpp.
Which branch of @mjs513 fork should I use? gfx_flexio ?
Do I need @KurtE new FlexIO library?
And does DMA work on 16 bit bus? or is only 8 bit supported?
Sounds like fun, I have never played with an NT35510 display. So don't know very much about them.
I do see that BuyDisplay has them. Is that the one you have?
Or does someone else make a display that uses that chip?

So far the ILI948x Parallel Library code probably only supports 8 bit mode. Mostly because most of the displays I have
only support that. Although I do have a couple of the BuyDisplay ones that can be configured for 16.

I was also curious about the HX8357D display I have from Adafruit... So I did some quick hacks today. I copied the init table from our HX8357 (SPI library), and setup an enum value for the display and then if that value passed in to the begin...

At first I got nothing, then figured out I needed to unsolder a jumper on back of display.
1721678395749.png

Not perfect, but better than I expected...
 
Back
Top