ILI948x_t41_p - a parallel display driver for Teensy 4.1

You can find init code for the 35510 here, as well as other displays:
Thanks,

I also found other areas of information like:
Although this library only supported 16 bit bus... on things like arduino Mega...

Also the product page:
Their Arduino example code is also only setup for 16 bit Bus
However their 8051 example code has different directories for 8 bit and 16 bit.
 
Thought I would mention that @mjs513 and I have made some progress on the NT35510:

Current stuff is up at: https://github.com/KurtE/NT35510_t4x_p

At the moment it only supports 8 bit Parallel, using 16 bit color (RGB565)

I am currently testing it using the Dev Board 4.5 and I believe that @mjs513 is
testing it using a Teensy 4.1. We are both using the BuyDisplay board mentioned above.

I currently have another display ordered on Ebay that is configured for 16 bit transfers.
This will probably take a couple of weeks to arrive.

Here is the clip and the like test, showing in this case update using DMA. The Frame buffer is located in SDRAM as
it is larger than can fit into DTCM or DMAMem.
IMG_0684.jpeg


Here is showing the MTP TFT viewer of the image. Again using SDRAM to upload the whole image at once...

IMG_0685.jpeg
 
I am currently testing it using the Dev Board 4.5 and I believe that @mjs513 is
testing it using a Teensy 4.1. We are both using the BuyDisplay board mentioned above.
Yep - I am testing on a T4.1 with PSRAM. Unfortunately not having much luck when not using FB:
no FrameBuffer
1722779087074.png


with FB it works:
1722779127786.png



with that said the scrolling text function that uses read/write pixels seems to be working:
1722779202569.png


but definitely works.
 
@KurtE as soon as you have something for 16 bit bus on the NT35510 I'll test - I have mine wired up to a DBv5 already.
What bus speed are you guys testing at? Im with ±10" wires and can get it to work stably at 30Mhz. Anything below I get nothing on the screen, anything above and I get interference and artifacts.
 
@KurtE as soon as you have something for 16 bit bus on the NT35510 I'll test - I have mine wired up to a DBv5 already.
What bus speed are you guys testing at? Im with ±10" wires and can get it to work stably at 30Mhz. Anything below I get nothing on the screen, anything above and I get interference and artifacts.
Note: my EBay order says it should arrive: in about 10-17 days from now...
Yesterday was playing some with some 24 bit support. In that if the dataWidth is 24 in some cases it now converts 565 to 888 and outputs.
Not perfect, but do have some output
1722859632280.png

This is in orientation 1... Should have rotated image 180 degrees...

Does drawRect, fillRect, writeRect, fillRectVGradient
For the 4 rows... Will try adding in a few specific outputs for 24 bits, probably not all:
but at least something like: fillRect24, writeRect24, where I suspect I will be passing in the colors in 32 bit values, probably
something like: RGB8888 where I will ignore the alpha.... At least something to play with.

The code appears to be running at 20mhz, at least in this example. Probably 6" or so wires
 
I should probably split the NT... off to different topic...

But was playing yesterday with Image viewer sketch to output images in 24 bits. As I mentioned in the prevous posts, JPEGDEC has added
ability to output in RGB8888 format, which the sketch uses.
Here is a JPEG that is output

IMG_0690.jpeg

IMG_0691.jpeg


Our code that loads BMP files already only loaded BMP files with bit depth of 24, but then took each pixel coming in and
converting to RGB565. This sketch does not but instead converts to the same RGB888 format
BMP file.
IMG_0689.jpeg
 
@mjs513 - was curious to try your raytrace sketch you posted on one of the other threads:

And wondered if it would improve to have it output the image in 24 bit mode...
So I hacked up your sketch for the NT35510 and used the only 24 bit api writeRect... And got it to work:

Image is not too bad:
raytrace.png


I also on this display updated the TFT picture viewer to try to decode PNG files into RGB888 format.
I have this image on it which was sized to the size of the display.

But I tried to download one of yours that is shown on the other thread and the decoder bails...

But just doing it for the fun of it.
 

Attachments

  • TFT22_raytrace-240809a.zip
    6.1 KB · Views: 27
@mjs513 - was curious to try your raytrace sketch you posted on one of the other threads:
https://forum.pjrc.com/index.php?threads/ra8876-parallel-display-library-testing.75345/page-13#post-347610
And wondered if it would improve to have it output the image in 24 bit mode...
So I hacked up your sketch for the NT35510 and used the only 24 bit api writeRect... And got it to work:
Just as a follow up - gave it a try and looking good. My eye cant really tell the difference but I can't see all that well to begin with :)
 
Just as a follow up - gave it a try and looking good. My eye cant really tell the difference but I can't see all that well to begin with :)
I hear you... I was curious if one might see some differences or not, so did a quick and dirty sketch, that draws all of the color ranges
top half using color565 and bottom half 888.
C++:
#include <Teensy_Parallel_GFX.h>
#include "NT35510_t4x_p.h"

#define NT35510X NT35510
#define NT35510X_SPEED_MHZ 20

#ifdef ARDUINO_TEENSY41
#define TFT_DC 10
#define TFT_CS 8
#define TFT_RST 9
#elif defined(ARDUINO_TEENSY40)
#define TFT_DC 0
#define TFT_CS 1
#define TFT_RST 2
#elif defined(ARDUINO_TEENSY_DEVBRD4) || defined(ARDUINO_TEENSY_DEVBRD5)
extern "C" bool sdram_begin(uint8_t external_sdram_size, uint8_t clock, uint8_t useDQS);
#define TFT_DC 10
#define TFT_CS 11
#define TFT_RST 12
#else  // micromod?
#define TFT_DC 4
#define TFT_CS 5
#define TFT_RST 3
#endif
NT35510_t4x_p tft = NT35510_t4x_p(TFT_DC, TFT_CS, TFT_RST);  //(dc, cs, rst)


#ifndef BLUE
#define BLUE 0x001F
#define BLACK 0x0000
#define WHITE 0xFFFF
#define GREEN 0x07E0
#define RED 0xf800
#endif

void setup(void) {
    while (!Serial && millis() < 3000)
        ;

    Serial.println("*** start up NT35510 ***");
    tft.begin(NT35510X, NT35510X_SPEED_MHZ);
    tft.setBitDepth(24);
    tft.setRotation(1);

    tft.fillScreen(RED);
    delay(500);
    tft.fillScreen(GREEN);
    delay(500);
    tft.fillScreen(BLUE);
    delay(500);
}

void fillScreenOneColorRange(uint32_t color_start, uint32_t color_end) {
    uint8_t r, g, b;
    uint8_t rs, gs, bs, re, ge, be;
    tft.color888toRGB(color_start, rs, gs, bs);
    tft.color888toRGB(color_end, re, ge, be);
    for (uint16_t i = 0; i < 256; i++) {
        r = rs + (((uint32_t)(re - rs)) * i) / 256;
        g = gs + (((uint32_t)(ge - gs)) * i) / 256;
        b = bs + (((uint32_t)(be - bs)) * i) / 256;
        tft.fillRect(i * 3 + 16, 1, 3, 239, tft.color565(r, g, b));
        tft.fillRect24BPP(i * 3 + 16, 240, 3, 239, tft.color888(r, g, b));
    }
}

uint32_t colors[] = { tft.color888(255, 0, 0), tft.color888(0, 255, 0), tft.color888(0, 0, 255),
                      tft.color888(255, 255, 0), tft.color888(255, 0, 255), tft.color888(0, 255, 255), tft.color888(255, 255, 255) };
uint8_t color_index = 0xff;

void loop() {
    Serial.println("Press any key to continue");
    while (Serial.read() == -1) {}
    while (Serial.read() != -1) {}
    color_index++;
    if (color_index == (sizeof(colors) / sizeof(colors[0]))) color_index = 0;
    fillScreenOneColorRange(tft.color888(0, 0, 0), colors[color_index]);
}
IMG_1950.jpeg
 
I hear you... I was curious if one might see some differences or not, so did a quick and dirty sketch, that draws all of the color ranges
top half using color565 and bottom half 888.
From the image definitely looks like better !! Much smoother transition. Did give it a try here and looking good. Should give it a try with one of my other off the wall projects.
 
Results are looking great on the NT35510
Can’t wait to test the 16 bit bus version once you get your other display in @KurtE !
I might just take the 8 bit version and modify to run on a 16 bit bus/2bpp to see what I can make of it if I can find some spare time in the next day or two.

Summer time holidays over here with the kids (20 months old, and 3 years old) so spare is rare at the moment 😅
 
Back
Top