ILI948x_t41_p - a parallel display driver for Teensy 4.1

Where do you have the RD pin wired to?
I didn’t add read support at the time, so I tied it to 3.3v
You can also wire to a free FlexIO pin and just keep it high
 
Where do you have the RD pin wired to?
I didn’t add read support at the time, so I tied it to 3.3v
You can also wire to a free FlexIO pin and just keep it high
Your notes said wire it to 3.3v. I can give it another try in the morning if you have another thoughts
 
Your notes said wire it to 3.3v. I can give it another try in the morning if you have another thoughts
Perfect!
Can you confirm that in the setup() function you are calling setBitDepth(16) and SetRotation(x) etc?

I will have to solder up an FPC to one of my spare boards and wire an ILI9488 up to my MM to test this as well.
Last commit I did on the library worked great on the 9486 test board (which is now dead - can sat on it and cracked the screen), but I did not test the ILI9488 init code on it
 
Perfect!
Can you confirm that in the setup() function you are calling setBitDepth(16) and SetRotation(x) etc?
I can confirm that bitdepth was NOT SET. Rotation was. I am using the example in the library.

Note. Trying this on the Buydisplay display
 
setBitDepth() is crucial. Some of the init codes set it by default, some don't

I don't seem to have enough parts to put together a test display right now - will have to order one of AliExpress - will take a few weeks at most.
 
setBitDepth() is crucial. Some of the init codes set it by default, some don't

I don't seem to have enough parts to put together a test display right now - will have to order one of AliExpress - will take a few weeks at most.
I did set it as a test using the buydisplay and still only blank screen - did order one from buydisplay but as you said that will take a few weeks to get here . In the mean time I did order from amazon the other uno shield as well. That will get here tomorrow. So no worries - now back to PXP and Camera testing
 
I did set it as a test using the buydisplay and still only blank screen - did order one from buydisplay but as you said that will take a few weeks to get here . In the mean time I did order from amazon the other uno shield as well. That will get here tomorrow. So no worries - now back to PXP and Camera testing
So you decided not to unsolder something like 9 (19, R21-28) resistors and one jumper(3), plus then solder one resistor(20) and one jumper(6)

Ditto... I have not ordered a new one yet, although I do have the one from Amazon also arriving tomorrow.
 
So you decided not to unsolder something like 9 (19, R21-28) resistors and one jumper(3), plus then solder one resistor(20) and one jumper(6)

Ditto... I have not ordered a new one yet, although I do have the one from Amazon also arriving tomorrow.
Getting too old to solder and resolder those small parts. Easier just to order one already set up :)
 
@Rezo
Received one Arduino style parallel display last night. Hooked it up this morning and it seems to be working.
unnamed.jpg


Currently working on more changes to PXP so this on back burner for now. Then see how it works with PXP
 
Getting too old to solder and resolder those small parts
Marginal improvement - still some time and fudging ... but @Dogbone06 pointed out a brand/family of Air solder he uses that was a handy improvement swapping those 'TINY' CAPS on the DevBoard. Awesome for removal - and works well with solder paste putting SMD parts on too.

This variant delivered here now at $50 https://www.amazon.com/gp/product/B0C7Q2GSTR - and includes a fresh combined temp controlled iron too with multiple tips.
 
Marginal improvement - still some time and fudging ... but @Dogbone06 pointed out a brand/family of Air solder he uses that was a handy improvement swapping those 'TINY' CAPS on the DevBoard. Awesome for removal - and works well with solder paste putting SMD parts on too.

This variant delivered here now at $50 https://www.amazon.com/gp/product/B0C7Q2GSTR - and includes a fresh combined temp controlled iron too with multiple tips.
These are made by Bakon (https://www.bakon.cc/) in China, a pretty high quality company. I've bought several directly from them, truly works a charm and the tips they provide are the best I've tried. Lots of solder tips out there are garbage.

So I can highly recommend this for anyone who wants a good solder station for a low price!
 
Marginal improvement - still some time and fudging ... but @Dogbone06 pointed out a brand/family of Air solder he uses that was a handy improvement swapping those 'TINY' CAPS on the DevBoard. Awesome for removal - and works well with solder paste putting SMD parts on too.
These are made by Bakon (https://www.bakon.cc/) in China, a pretty high quality company. I've bought several directly from them, truly works a charm and the tips they provide are the best I've tried. Lots of solder tips out there are garbage.

So I can highly recommend this for anyone who wants a good solder station for a low price!
Well I actually have a Aoyue hot air gun and soldering station: https://www.amazon.com/gp/product/B006FA481G/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 and a https://www.amazon.com/gp/product/B000KSPXZE/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

With that said no clue how to use them. Last time I tried I made a mess and gave up. Really have found a good set of beginners instructions on how to use them.
 
These are made by Bakon (https://www.bakon.cc/) in China, a pretty high quality company. I've bought several directly from them, truly works a charm and the tips they provide are the best I've tried. Lots of solder tips out there are garbage.

So I can highly recommend this for anyone who wants a good solder station for a low price!
oops editing: I have one like:


It is sitting over at other building.
With that said no clue how to use them. Last time I tried I made a mess and gave up. Really have found a good set of beginners instructions on how to use them.
Ditto...

And as I am probably not getting younger nor my eyes and hands getting better.... I am finding I sort of resist doing a lot of soldering. Especially for parts I can barely see 😆
 
@Rezo
Been hacking away at your library - basically copying stuff from the existing ILI9488 and trying it out. Right now got some stuff working. Forwarned - really had to hack to get it to work with the push function - probably not the best way to do it


Code:
Lines                    354370
Horiz/Vert Lines         405487
Circles (filled)         1049293
Circles (outline)        167739
Rectangles (outline)     221104
Rectangles (filled)      352340
Triangles (outline)      98723
Triangles (filled)       3738139
Rounded rects (outline)  210234
Rounded rects (filled)   4201596

only thing not really working like the graphics test sketch are the filled rounded rects. But that is something for another day.

EDIT:
with a 9488 on a mm with spi
Rich (BB code):
Benchmark                Time (microseconds)
Screen fill              615251
Text                     10915
Lines                    154798
Horiz/Vert Lines         51142
Rectangles (outline)     28386
Rectangles (filled)      1487087
Circles (filled)         177501
Circles (outline)        103593
Triangles (outline)      33562
Triangles (filled)       487144
Rounded rects (outline)  54398
Rounded rects (filled)   1626225
 
Last edited:
Finally getting caught up with you guys:) I ordered one of these Arduino displays:
ILI948x_pinout.jpg

and tested it with the MM using @Rezo ILI9486/ILI9488 library. At first it just displayed a white screen and looking at the .h file there were defines for both types of controllers. Set it to the ILI9486 and the screen popped up with:
MM_ILI9486_3_5.jpg


Should be getting the Hiletgo 3.5" version tomorrow...
Need better glasses;)
 
Just created a new branch in my fork of the library with the changes I have so far. If you are interested in playing along:

Also I added a new branch in my PXP with @KurtE's and my changes along with a ILI9488p example:

https://github.com/mjs513/T4_PXP/tree/pxp_fixes_kurte

Cheers

PS. Forgot to mention was able to run at 30Mhz with 6in wires on the MM board I have.
 
Last edited:
Ok at it again with the lib. Instead of incorporating all the graphic functions directly I decided to link in the AdafruitGFX library. Getting lazy in old age. Anyway saw a little improvement at 24Mhz:
Code:
ILI9486 Initialized
Benchmark                Time (microseconds)
Screen fill              133200
Text                     20942
Lines                    356470
Horiz/Vert Lines         408021
Circles (filled)         893530
Circles (outline)        169149
Rectangles (outline)     222505
Rectangles (filled)      352451
Triangles (outline)      99298
Triangles (filled)       3760474
Rounded rects (outline)  211702
Rounded rects (filled)   3136330

If interested I put that in a separate branch: https://github.com/mjs513/ILI948x_t4_mm/tree/graphics_adafruitGFX
 
I wonder why there is such a decrease in render+write time compared to SPI

If I take the exact same LVGL app and run one over SPI and one over 8080 - the latter is 10x faster visually (and in write time too)

I know FlexIO SHIFTBUF can take a while to clear the transfer bit, but THAT long?
 
I wonder why there is such a decrease in render+write time compared to SPI

If I take the exact same LVGL app and run one over SPI and one over 8080 - the latter is 10x faster visually (and in write time too)

I know FlexIO SHIFTBUF can take a while to clear the transfer bit, but THAT long?
Well my guess is I messed up on how I did write16BitColor function works. Right now its set up as a modification to your push16bit function works:

Code:
FASTRUN void ILI948x_t4_mm::write16BitColor(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, const uint16_t * pcolors, uint16_t count)
{
  while(WR_DMATransferDone == false)
  {
    //Wait for any DMA transfers to complete
  }
  //uint32_t area = (x2-x1+1)*(y2-y1+1);
  uint32_t area = count;
  if (!((_lastx1 == x1) && (_lastx2 == x2) && (_lasty1 == y1) && (_lasty2 == y2))) {
  setAddrWindow( x1, y1, x2, y2);
     _lastx1 = x1;  _lastx2 = x2;  _lasty1 = y1;  _lasty2 = y2;
  }
  SglBeatWR_nPrm_16(ILI9488_RAMWR, pcolors, area);
}

If you notice fill rectangles are fast. But all the other functions rely on drawPixels. So maybe something in there is the issue compared to way its done with the SPI version. Going to look more today.

also I forgot to mention Text works but does not work as it should - same for fills (other than rect). Maybe something is how setaddr works.
 
A bit more info as I wake up and start looking. One of things that @KurtE does is define a continuation command and a last command:
Code:
    void writedata16_cont(uint16_t d) __attribute__((always_inline)) {
        maybeUpdateTCR(_tcr_dc_not_assert | LPSPI_TCR_FRAMESZ(15) | LPSPI_TCR_CONT);
        _pimxrt_spi->TDR = d;
        _pending_rx_count++;    //
        waitFifoNotFull();
    }

    void writedata16_last(uint16_t d) __attribute__((always_inline)) {
        maybeUpdateTCR(_tcr_dc_not_assert | LPSPI_TCR_FRAMESZ(15));
        _pimxrt_spi->TDR = d;
//        _pimxrt_spi->SR = LPSPI_SR_WCF | LPSPI_SR_FCF | LPSPI_SR_TCF;
        _pending_rx_count++;    //
        waitTransmitComplete();
    }

maybe something like that can be done.
 
Ok all - managed to get some things sped up but still issued rounded fills of rect's and rect fills???
Code:
Screen fill              133319
Lines                    355400
Horiz/Vert Lines         11284
Circles (filled)         95931
Circles (outline)        168032
Rectangles (outline)     6961
Rectangles (filled)      353046
Triangles (outline)      67087
Triangles (filled)       128698
Rounded rects (outline)  44855
Rounded rects (filled)   398191
Done!

Moved away from linking to gfx. So back to: https://github.com/mjs513/ILI948x_t4_mm/tree/ili9488p_graphics
 
Just as a quick update with some observations:
1. When doing fill screens the fill lines look like they are filling on a diagonal versus just top down like with SPI.
2. Fill Rectangle:
IMG_1236.jpg


3. Fill rounded rectagles
IMG_1237.jpg


not sure setAddr is working the same way with writing to the screen.
 
Ok pushed the change that fixes fill rectangles so now works as it should. Now to decided if I want to add text.

Code:
Benchmark                Time (microseconds)
Screen fill              129740
Lines                    294814
Horiz/Vert Lines         10940
Circles (filled)         93865
Circles (outline)        139980
Rectangles (outline)     6729
Rectangles (filled)      333857
Triangles (outline)      56094
Triangles (filled)       122755
Rounded rects (outline)  44480
Rounded rects (filled)   378916
Done!

as compared to SPI

Code:
Benchmark                Time (microseconds)
Screen fill              615251
Text                     10915
Lines                    154798
Horiz/Vert Lines         51142
Rectangles (outline)     28386
Rectangles (filled)      1487087
Circles (filled)         177501
Circles (outline)        103593
Triangles (outline)      33562
Triangles (filled)       487144
Rounded rects (outline)  54398
Rounded rects (filled)   1626225

So now significantly faster.
 
@mjs513 great work!
Are you using DMA on the parallel display or just blocking method?
Blocking. When tested before todays changes didn't seem to make much difference. Easy enough to give it a try though - stay tuned
 
Back
Top