Thanks for testing the lib - now I guess for text@mjs513 - I have the library working on the dev 4.0 board. Excuse the poor picture quality. It is actually green and uniform. I could blame it on the phone but it's probably me![]()
When I was developing my VGA_4BIT_T4 library I had to do the same thing with text and fonts. I based a lot of the text and graphics on the uVGA library and the VGA_T4 library which was also based on uVGA. Hopefully it is simpler than dealing with 4 bits per pixelThanks for testing the lib - now I guess for textand its never me
![]()
![]()
Pretty much its going to be a copy/paste/edit operation from ILI9488_t3 lib. So just going to take time - lots of bits and pieces with what we did textWhen I was developing my VGA_4BIT_T4 library I had to do the same thing with text and fonts. I based a lot of the text and graphics on the uVGA library and the VGA_T4 library which was also based on uVGA. Hopefully it is simpler than dealing with 4 bits per pixel@jmarsh helped alot with that. I can also start playing with it...
as probably only deal with 16 bit pixels, where with spi stuff, we had 8 16 24 bit pixelsPretty much it’s going to be a copy/paste/edit operation from ILI9488_t3 lib. So just going to take time - lots of bits and pieces with what we did text![]()
Benchmark Time (microseconds)
Screen fill 122895
Text 9721
Lines 292506
Horiz/Vert Lines 10925
Circles (filled) 94321
Circles (outline) 140213
Rectangles (outline) 6730
Rectangles (filled) 297103
Triangles (outline) 56165
Triangles (filled) 122857
Rounded rects (outline) 44643
Rounded rects (filled) 342493
Done!
Bus speed: 16 Mhz Div: 20
ILI9486 Initialized
Manufacturer ID: 0x54
Module Version ID: 0x80
Module ID: 0x66
Display Power Mode: 0x9C
MADCTL Mode: 0x48
Pixel Format: 0x55
Image Format: 0x00
Signal Mode: 0x00
Self Diagnostic: OK (0xC0)
Device Information: 548066
Device Status: A4530400
Order: BGR
interface pixel format: 16 bit
Make that two...This is what we are playing with now - at least one of them.
I think it’s worth defining a struct that will hold the init commands and the various command values for the variants, such as the pixel format value, rotation register values etc.@Rezo
Just to add to what @KurtE said, since I am using the BuyDisplay ILI9488 versus the Arduino board which looks like its a ILI9486.
We finally got the ILI9488 buydisplay working like shown he the Arduino Display image by reading 3 bytes of data (r,g,b) vs 2 bytes need for the ILI9486.
The one difference we are seeing is the pixel format is 16 bit for both devices but the pixel format (0x3A) is a bit different:
Arduino ILI9486 - Pixel Format: 0x55
while
BuyDisplay ILI9488 - Pixel Format: 0x05
even though both are set in the sketch as setBitDepth(16)
This is what we are playing with now - at least one of them.
Yes, it would be nice to convert all of that code that is setup for each of the displays into a table each. It might make it a lot easier to detect things like what is different between ILI9488 and ILI9486... At some point maybe someone will do so. How far does someone wish to take it...I think it’s worth defining a struct that will hold the init commands and the various command values for the variants, such as the pixel format value, rotation register values etc.
Use a pointer in the begin function to load the display config.
This would make it much easier and flexible to add support for more displays in the future.
What do you think?
Note: The are FLEXIO 2 pins on the Micromod The flexio pins shown in ()
* pin 10 - WR (0)
* pin 12 - RD (1)
* pin 40 - D0 (4)
* pin 41 - D1 (5)
* pin 42 - D2 (6)
* pin 43 - D3 (7)
* pin 44 - D4 (8)
* pin 45 - D5 (9)
* pin 6 - D6 (10)
* pin 9 - D7 (11)
**FlexIO 2**
```
Arduino PIN: 6, 7, 8, 9, 10, 11, 12, 13, 32, 40, 41, 42, 43, 44, 45,
FlexIO pin: 10, 17, 16, 11, 0, 2, 1, 3, 12, 4, 5, 6, 7, 8, 9,
```
Ranges 0-12, 16-17
Looks like someone did itYes, it would be nice to convert all of that code that is setup for each of the displays into a table each. It might make it a lot easier to detect things like what is different between ILI9488 and ILI9486... At some point maybe someone will do so. How far does someone wish to take it...
Great Stuff:converted the init_commands to use tables so easy enough to add a new device without having to go through all the commandvalue setup.
Note: I have started to play with this: I have a branch in @mjs513 fork:Likewise at some point, I might be more interested in reducing how hard coded some parts are on things like pin numbers. That is
The majority of the pins are hard coded to:
tft.setFlexIOPins(7, 8);
tft.setFlexIOPins(7, 8, 40);
tft.setFlexIOPins(7, 8, 40, 41, 42, 43, 44, 45, 6, 9);
Pre-Shipment
Origin Post is Preparing Shipment
Processed Through Facility
SHENZHEN EMS, CHINA
June 7, 2024, 3:22 am
This is similar to way we do it with the cameras as well.Note: These must be called before you call the begin method on the display object
Mine is showing the same thing but if you translate the chinese to english from the 17allinonr link looks like its in the airlines possesion now:I do have a few more displays coming soon. An Amazon one: tomorrow and two BuyDisplays which I don't have any clue how long
it might take... I also have a BuyDisplay RA8876 that I am also waiting for. So far it has been sitting for over a week in the state:
Bus speed: 30 Mhz Div: 8
ILI9486 Initialized
Text 430
Screen fill 2592
Lines 4847
Horiz/Vert Lines 1092
Rectangles (outline) 413
Rectangles (filled) 6436
Circles (filled) 2558
Circles (outline) 1827
Triangles (outline) 932
Triangles (filled) 2105
Rounded rects (outline) 838
Rounded rects (filled) 12433
Done!
Great stuff, I am playing with it and looks like most things compile. I have tried to reenable the frame buffering in the fb and clip test and the screen is not changing color... Will debug. Maybe easier to restart it from another copy of that sketch, which I did not hack on...Just pushed up a new branch to the Teensy_gfx library that starts support for frame buffering, https://github.com/mjs513/Teensy_Parallel_GFX/tree/framebuffer_wip.
Hopefully it will get closer to this. I probably won't have it automatically changing how many bits to output. Currently workingI think this brings us closed to one library that supports all boards, be able to automatically detect which instance to use as well.
Eg 8-bit with DMA on a MicroMod using FlexIO2
16-bit with interrupts on a T4.1 using FlexIO3
Up to 24 bits with DMA on a Devboard v4.0++ using FlexIO2
tft.drawRect(100, 100, 100, 100, RED);
FASTRUN void ILI948x_t4_mm::FlexIO_Config_SnglBeat_Read() {
if (flex_config == CONFIG_SNGLREAD) return;
flex_config = CONFIG_SNGLREAD;
...