Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 3 1 2 3 LastLast
Results 1 to 25 of 58

Thread: ILI948x_t41_p - a parallel display driver for Teensy 4.1

  1. #1
    Senior Member
    Join Date
    Oct 2019
    Posts
    450

    ILI948x_t41_p - a parallel display driver for Teensy 4.1

    Happy to share my 2nd library, this time for the Teensy 4.1

    It's a parallel display driver that works (currently) with the ILI9488 over an 8 bit bus. I will bring a 16 bit bus support as well, when I find the spare time for it.

    The library uses FlexIO3 as it has enough contiguous pins for an 8/16 bit bus.
    Only downside is there is no DMA support for a full async trasnfer.

    There are two main transfer methods:
    1. Regular blocking transfer
    2. Semi Async transfer that will push 32 bytes of data at a time using an interrupt from FlexIO


    I've tested this with lvgl and a simple c array image and it works great! A full screen transfer (480*320 @ 16 bit color) takes between 9-15 milliseconds depending on bus speed.

    Here's a link to the repo on GitHub
    https://github.com/david-res/ILI948x_t41_p


    Shoutout to @beermat for providing me with the original parallel driver for the T4.1 and a big shoutout to @easone for helping me out with FlexIO!

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    11,781
    Sounds like fun. You might also try it sometime on the Micromod, as on FlexIO2 you have the FlexIO pins (0-12 and 16-17)
    And on FlexIO2 you have DMA.

    **FlexIO 2**
    Code:
        6,       7,    8,    9,  10,    11,   12,   13,   32,   40,   41,   42,   43,   44,   45,
        10,     17,   16,   11,  0,      2,    1,    3,   12,    4,    5,    6,    7,    8,    9,
        0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,
    Ranges 0-12, 16-17

  3. #3
    Senior Member
    Join Date
    Oct 2019
    Posts
    450
    I already have a library for the MM using FlexIO2 & DMA:
    https://github.com/david-res/ILI948x_t4_mm

    The T4.1 I made for a forum member that was looking for a parallel interface on the T4.1

  4. #4
    Senior Member
    Join Date
    Mar 2017
    Location
    Ireland
    Posts
    101
    Have this working on an ILI9486 with the below modification to the initialisation sequence. I found that with my particular display, only baud 30mhz would function as anything else would result in display corruption. Probably the length the 20+cm wires are the cause. Using pushPixels16bitAsync() would cause the image to jitter across the display, which again, is probably down to the length of the wiring. Will give this a try on an S6D04D1 240x432, see how that fairs.

    (Using CS:11, RS:13 & RST:12)

    Code:
    PROGMEM static const uint8_t initCommands[] = 
    {
    	0xF2, 9, 0x18, 0xA3, 0x12, 0x02, 0xB2, 0x12, 0xFF, 0x10, 0x00,
            0xF8, 2, 0x21, 0x04,
    
    	ILI9488_PWCTR1,     2, 0x0d, 0x0d,              // Power Control 1
    	ILI9488_PWCTR2,     2, 0x00, 0x41,              // Power Control 2
    	ILI9488_PWCTR3,     1, 0x00,                    // Power Control 3 (For Normal Mode)
    	
    	ILI9488_VMCTR1,     3, 0x00, 0x12, 0x80,        // VCOM control
    	ILI9488_INVCTR,     1, 0x02,                    // Display Inversion Control
    	ILI9488_DFUNCTR,    3, 0x00, 0x02, 0x3B,	    // Display Function Control  RGB/MCU Interface Control
    	ILI9488_ETMOD,      1, 0x07,                    // Entry Mode Set
    	
    	// Gamma Setting	   
    	ILI9488_PGAMCTRL, 15, 0x0F, 0x1F, 0x1C, 0x0C, 0x0F, 0x08, 0x48, 0x98, 0x37, 0x0A, 0x13, 0x04, 0x11, 0x0D, 0x00,
            ILI9488_NGAMCTRL, 15, 0x0F, 0x32, 0x2E, 0x0B, 0x0D, 0x05, 0x47, 0x75, 0x37, 0x06, 0x10, 0x03, 0x24, 0x20, 0x00,
    
    	// Other commands  
    	ILI9488_MADCTL,     1, 0x48,                    // Memory Access Control : 0x48 is equivalent to _rotation = 0
    	ILI9488_COLMOD,     1, 0x55,                    // Set bit depth to 16-bit (RGB565)
    
    	0
    };

  5. #5
    Senior Member
    Join Date
    Oct 2019
    Posts
    450
    @MichaeMC I’m glad you’re using it and that it’s working (mostly)
    I have 9488s from three different vendors here, and each one requires slightly different init code to function properly.

    Would love to hear impressions and feedback. If there is anything broken or off feel free to open a GitHub issue

  6. #6
    Member
    Join Date
    Feb 2017
    Location
    Chicago, IL
    Posts
    62
    Quote Originally Posted by Rezo View Post
    Shoutout to @beermat for providing me with the original parallel driver for the T4.1 and a big shoutout to @easone for helping me out with FlexIO!
    Glad to see this is still alive and kicking!

  7. #7
    Senior Member
    Join Date
    Mar 2017
    Location
    Ireland
    Posts
    101
    Just an update. I now have this working at 120mhz (_baud_div of 2) using 6cm soldered wiring. Oddly, all jittering and corruption disappeared after 30mhz.

  8. #8
    Senior Member
    Join Date
    Oct 2019
    Posts
    450
    You’re running the bus speed at 120mhz?! Wow!
    My ILI9488 can’t cope with more than 30mhz and I have a PCB with short 1-2cm traces ��

    What kind of frame rate are you getting? Also what are you building?

  9. #9
    Senior Member
    Join Date
    Mar 2017
    Location
    Ireland
    Posts
    101
    Quote Originally Posted by Rezo View Post
    Youíre running the bus speed at 120mhz?! Wow!
    My ILI9488 canít cope with more than 30mhz and I have a PCB with short 1-2cm traces ��

    What kind of frame rate are you getting? Also what are you building?
    I'm not confident whether or not Flex is actively operating at that speed, as pushPixels16bit() shows no difference is call time between ~40 and 120mhz. That is, a consistent 15ms per full frame. However; using a 480mhz clock, if I read correctly, through Flex->setClockSettings(3, 0, 0), shows a ~4ms drop in full frame transmit time. This also required an increase in divider from 2 to 4.

    pushPixels16bitAsync() is still a slide show at any speed.

    What I'm building is a Synth pedal controller for the Source Audio C4 Synth. There will actually be 2 displays; 2'nd display, a 128x64 OLED, will always display current preset, with the larger display the configuration panel. Something similar in concept to what JZ created here: https://forum.pjrc.com/threads/72589...ing-Soundfonts

  10. #10
    Senior Member
    Join Date
    Mar 2017
    Location
    Ireland
    Posts
    101
    Here is an 8bit FlexIO driver for an S6D04D1 controller, as found in 432x240 (~16:9) IPS displays from Aliexpress:
    FlexIO_S6D04D1_170523.zip
    This code is mostly Rezo's (&co.) above and Roomtek's work from this thread: https://forum.pjrc.com/threads/47899...r-next-project.

    There is an addition of one wire required - the Backlight. This defaults to pin 13 (I'm using 33) with a brightness set to 30 using PWM.

  11. #11
    Senior Member
    Join Date
    Mar 2017
    Location
    Ireland
    Posts
    101
    Here is a FlexIO driver, in 8bit mode, for the ILI9806/G 854x480 IPS displays as found on Aliexpress. Using the Teensy 4.1 at default speeds, it's able to drive this display @ 9.7fps

    ILI9806_060623.zip

  12. #12
    Senior Member
    Join Date
    Oct 2019
    Posts
    450
    Quote Originally Posted by MichaelMC View Post
    Here is a FlexIO driver, in 8bit mode, for the ILI9806/G 854x480 IPS displays as found on Aliexpress. Using the Teensy 4.1 at default speeds, it's able to drive this display @ 9.7fps

    ILI9806_060623.zip
    This sound like a low frame rate.. what color depth are you running at? And what bus speed?
    At 16 bit color depth and 30Mhz bus speed (8 bits) you should be getting up to 36fps
    If you double the bus width you can get up to 70ish fps @30Mhz

  13. #13
    Senior Member
    Join Date
    Mar 2017
    Location
    Ireland
    Posts
    101
    Quote Originally Posted by Rezo View Post
    This sound like a low frame rate.. what color depth are you running at? And what bus speed?
    At 16 bit color depth and 30Mhz bus speed (8 bits) you should be getting up to 36fps
    If you double the bus width you can get up to 70ish fps @30Mhz
    Apologies, I was a little vague with that, your assessment is correct. What I should have stated was that I'm driving the display (16bpp) via USB from a desktop computer. ~9.7 is about right for the bandwidth available (~8MByte per sec with a theoretical of 12MByte per sec).

    I saw your message about adding 16bit support. When that's added, I'll be trying that out with the two other 800x480 displays here waiting to be wired up (an RM68120 and R61529).

  14. #14
    Senior Member
    Join Date
    Oct 2019
    Posts
    450
    Quote Originally Posted by MichaelMC View Post
    I saw your message about adding 16bit support. When that's added, I'll be trying that out with the two other 800x480 displays here waiting to be wired up (an RM68120 and R61529).
    I'll be getting on that pretty soon, and update once it's pushed to git

    BTW the R61529 is 320*480, and I have init code for that if you need it.

  15. #15
    Senior Member
    Join Date
    Mar 2017
    Location
    Ireland
    Posts
    101
    Quote Originally Posted by Rezo View Post
    BTW the R61529 is 320*480, and I have init code for that if you need it.
    Figures. I was supposed to have ordered a number of the larger panels, each with a different, controller for testing.

    If you can fire up the init code that'll be great, it'll save some time, whilst I get back on Ali to order the correct display.

  16. #16
    Senior Member
    Join Date
    Oct 2019
    Posts
    450
    Quote Originally Posted by MichaelMC View Post
    Figures. I was supposed to have ordered a number of the larger panels, each with a different, controller for testing.

    If you can fire up the init code that'll be great, it'll save some time, whilst I get back on Ali to order the correct display.
    You can find it here:
    https://github.com/david-res/ILI948x...4_mm_defines.h

    It's in an older init format, so you will need to apply some manual work to get it going. And it's a bit of a mess. But it worked well back when I was using the R61529

  17. #17
    Senior Member
    Join Date
    Mar 2017
    Location
    Ireland
    Posts
    101
    Quote Originally Posted by Rezo View Post
    You can find it here:
    https://github.com/david-res/ILI948x...4_mm_defines.h

    It's in an older init format, so you will need to apply some manual work to get it going. And it's a bit of a mess. But it worked well back when I was using the R61529
    Cheers, It working perfectly.

    To save others the bother of reformatting, here it is:

    Code:
    PROGMEM static const setting_table_t power_on_setting_table[] = {
    	{R61529_RESET,     0, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 100},
    	{R61529_SLPOUT,    0, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 20},
    	{R61529_DISLYON,   0, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 120},
    	{R61529_MCAP,      1, {0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 2},
    	{R61529_BLCTRL1,  20, {0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_BLCTRL2,   4, {0x01, 0x00, 0xFF, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_FMAIS,     5, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 2},
    	{R61529_DISMODE,   1, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_PANDSET,   8, {0x04, 0xDF, 0x40, 0x10, 0x00, 0x01, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_DTSNM,     5, {0x07, 0x27, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_SGDTSET,   4, {0x57, 0x00, 0x05, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_DPIPCTL,   1, {0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	
    	{R61529_GAMSETA,  24, {0x03, 0x12, 0x1A, 0x24, 0x32, 0x4B, 0x3B, 0x29, 0x1F, 0x18, 0x12, 0x04, 0x03, 0x12, 0x1A, 0x24, 0x32, 0x4B, 0x3B, 0x29, 0x1F, 0x18, 0x12, 0x04}, 0},
    	{R61529_GAMSETB,  24, {0x03, 0x12, 0x1A, 0x24, 0x32, 0x4B, 0x3B, 0x29, 0x1F, 0x18, 0x12, 0x04, 0x03, 0x12, 0x1A, 0x24, 0x32, 0x4B, 0x3B, 0x29, 0x1F, 0x18, 0x12, 0x04}, 0},
    	{R61529_GAMSETC,  24, {0x03, 0x12, 0x1A, 0x24, 0x32, 0x4B, 0x3B, 0x29, 0x1F, 0x18, 0x12, 0x04, 0x03, 0x12, 0x1A, 0x24, 0x32, 0x4B, 0x3B, 0x29, 0x1F, 0x18, 0x12, 0x04}, 0},
    	
    	{R61529_PSCPSET,  16, {0x99, 0x06, 0x08, 0x20, 0x29, 0x04, 0x01, 0x00, 0x08, 0x01, 0x00, 0x06, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_VCOMSET,   4, {0x00, 0x20, 0x20, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_NVMACTL,   4, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_DDBWCTL,   6, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_NVMLCTL,   1, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_SETPIXF,   1, {0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_CASET,     4, {0x00, 0x00, 0x01, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_PASET,     4, {0x00, 0x00, 0x01, 0xDF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}
    };

  18. #18
    Senior Member
    Join Date
    Oct 2019
    Posts
    450
    Quote Originally Posted by MichaelMC View Post
    Cheers, It working perfectly.

    To save others the bother of reformatting, here it is:

    Code:
    PROGMEM static const setting_table_t power_on_setting_table[] = {
    	{R61529_RESET,     0, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 100},
    	{R61529_SLPOUT,    0, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 20},
    	{R61529_DISLYON,   0, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 120},
    	{R61529_MCAP,      1, {0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 2},
    	{R61529_BLCTRL1,  20, {0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_BLCTRL2,   4, {0x01, 0x00, 0xFF, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_FMAIS,     5, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 2},
    	{R61529_DISMODE,   1, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_PANDSET,   8, {0x04, 0xDF, 0x40, 0x10, 0x00, 0x01, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_DTSNM,     5, {0x07, 0x27, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_SGDTSET,   4, {0x57, 0x00, 0x05, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_DPIPCTL,   1, {0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	
    	{R61529_GAMSETA,  24, {0x03, 0x12, 0x1A, 0x24, 0x32, 0x4B, 0x3B, 0x29, 0x1F, 0x18, 0x12, 0x04, 0x03, 0x12, 0x1A, 0x24, 0x32, 0x4B, 0x3B, 0x29, 0x1F, 0x18, 0x12, 0x04}, 0},
    	{R61529_GAMSETB,  24, {0x03, 0x12, 0x1A, 0x24, 0x32, 0x4B, 0x3B, 0x29, 0x1F, 0x18, 0x12, 0x04, 0x03, 0x12, 0x1A, 0x24, 0x32, 0x4B, 0x3B, 0x29, 0x1F, 0x18, 0x12, 0x04}, 0},
    	{R61529_GAMSETC,  24, {0x03, 0x12, 0x1A, 0x24, 0x32, 0x4B, 0x3B, 0x29, 0x1F, 0x18, 0x12, 0x04, 0x03, 0x12, 0x1A, 0x24, 0x32, 0x4B, 0x3B, 0x29, 0x1F, 0x18, 0x12, 0x04}, 0},
    	
    	{R61529_PSCPSET,  16, {0x99, 0x06, 0x08, 0x20, 0x29, 0x04, 0x01, 0x00, 0x08, 0x01, 0x00, 0x06, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_VCOMSET,   4, {0x00, 0x20, 0x20, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_NVMACTL,   4, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_DDBWCTL,   6, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_NVMLCTL,   1, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_SETPIXF,   1, {0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_CASET,     4, {0x00, 0x00, 0x01, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{R61529_PASET,     4, {0x00, 0x00, 0x01, 0xDF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}
    };
    This is great!!
    Can you share the defines for the commands?

    Actually, any other display that you have in this format - I want to make a fairly big change to the constructor and add a pointe to the init commands, so that you can configure it for any display basically:
    Code:
    ILI948x_t41_p::ILI948x_t41_p(uint8_t* display_init, int8_t dc, int8_t cs, int8_t rst)
    which can be used like so:
    Code:
    ILI948x_t41_p lcd = ILI948x_t41_p(R61529, 10, 11, 12);
    I also plan to add the 16 bit support soon, which will be done with a define in the .h file

  19. #19
    Senior Member
    Join Date
    Mar 2017
    Location
    Ireland
    Posts
    101
    Somethings to consider:
    16bit Register access, Backlight pin support and a different classname.

    RM68120, along with the NT35516, are two popular panel drivers (for large displays) which use 16bits for registers, eg; MADCTRL = 0x3600 then 0x3601, thus require 16bit methods, which is unsupported. If this is added, then I can produce support for this.

    All but one of my displays have a backlight PWM pin. How about adding a BL pin option next to Chip Select and co?

    "ILI948x_t41_p lcd = ILI948x_t41_p(R61529, ...) ". IMO, I don't believe naming the class "ILI948x" whilst driving something entirely different is going to work; It doesn't look great. How about something ambiguous. eg; PARDRV8_t41 lcd = PARDRV8_t41(R61529, ...) ", 8 for 8bit registers, as things currently are, or 16 for 16bit regs'.

    ILI9806G, 480x854
    Be mindful that MADCTL is 0xB9, despite what the datasheet will tell you - not 0x36.
    Code:
    PROGMEM static const setting_table_t power_on_setting_table[] = {
    	{ILI9806_EXTCCSET,3, {0xFF, 0x98, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{ILI9806_GIP1,   21, {0x03, 0x0F, 0x63, 0x69, 0x01, 0x01, 0x1B, 0x11, 0x70, 0x73, 0xFF, 0xFF, 0x08, 0x09, 0x05, 0x00, 0xEE, 0xE2, 0x01, 0x00, 0xC1}, 0}, // magic stuff happens here
    	{ILI9806_GIP2,    8, {0x01, 0x23, 0x45, 0x67, 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{ILI9806_GIP3,    9, {0x00, 0x22, 0x27, 0x6A, 0xBC, 0xD8, 0x92, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{ILI9806_VCCTRL1, 1, {0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, // VCOM Control 1
    	{ILI9806_VOLTMSET,3, {0x7F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{ILI9806_PCTRL1,  3, {0xE3, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, // Power Control 1
    	{ILI9806_LVGLVSET,1, {0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, // LVGL Voltage Setting
    	{ILI9806_ENGSET,  6, {0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, // Engineering Setting
    	{ILI9806_DVDDVSET,1, {0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, // DVDD Voltage Setting
    	{ILI9806_DINVCTRL,3, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, // Display Inversion Control
    	{ILI9806_PRSSET,  1, {ILI9806_R480x854, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, // Panel Resolution Selection Set 480x854 resolution
    	{ILI9806_FRCTRL1, 3, {0x00, 0x10, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, // Frame Rate Control 1
    	{ILI9806_PTCTRL1, 3, {0x29, 0x8A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, // Panel Timing Control 1
    	{ILI9806_PTCTRL2, 4, {0x40, 0xD2, 0x50, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, // Panel Timing Control 2
    	{ILI9806_PCTRL2,  4, {0x17, 0X85, 0x85, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, // Power Control 2
    	{ILI9806_PGCTRL, 16, {0x00, 0x0C, 0x15, 0x0D, 0x0F, 0x0C, 0x07, 0x05, 0x07, 0x0B, 0x10, 0x10, 0x0D, 0x17, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, // Positive Gamma Control
    	{ILI9806_NGCTRL, 16, {0x00, 0x0D, 0x15, 0x0E, 0x10, 0x0D, 0x08, 0x06, 0x07, 0x0C, 0x11, 0x11, 0x0E, 0x17, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, // Negative Gamma Correction
    	{ILI9806_TREFLON, 1, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, // Tearing Effect Line ON
    	{ILI9806_MADCTL,  1, {ILI9806_IXFORMAT, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 30},
    	{ILI9806_VSCROLLS,1, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{ILI9806_CASET,   1, {0x00, 0x00, 0x03, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{ILI9806_PASET,   1, {0x00, 0x00, 0x01, 0xDF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
    	{ILI9806_IPIXFOR, 1, {0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 30},
    	{ILI9806_SLPOUT,  0, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 120}, // Exit Sleep 
    	{ILI9806_DISLYON, 0, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 50}   // Display On 
    };
    
    #define ILI9806_R480x864	0x80
    #define ILI9806_R480x854	0x81
    #define ILI9806_R480x640	0x82
    #define ILI9806_R480x720	0x84
    
    
    #define ILI9806_NOP			0x00	// No Op, also reset write state (acording to PDF)
    #define ILI9806_SOFTRST		0x01	// Software reset
    #define ILI9806_SLPOUT		0x11	// Sleep out (Exit sleep)
    #define ILI9806_DISLYON		0x29	// Display ON
    #define ILI9806_CASET       0x2A	// Column Address Set 
    #define ILI9806_PASET       0x2B	// Page Address Set 
    #define ILI9806_RAMWR       0x2C	// Memory Write 
    #define ILI9806_RAMRD       0x2E	// Memory Read
    #define ILI9806_TREFLON		0x35	// Tearing Effect Line ON 
    #define ILI9806_VSCROLLS	0x37	// Vertical Scrolling Start Address
    #define ILI9806_IPIXFOR		0x3A	// Interface Pixel Format
    #define ILI9806_FRCTRL1		0xB1	// Frame Rate Control 1
    #define ILI9806_FRCTRL2		0xB2	// Frame Rate Control 2
    #define ILI9806_DINVCTRL	0xB4	// Display Inversion Control	
    #define ILI9806_MADCTL		0xB9	// PANELCTRL.  doesn't respond to 0x36 dispite pdf indicating so
    #define ILI9806_GIP1		0xBC	// GIP 1
    #define ILI9806_GIP2		0xBD	// GIP 2
    #define ILI9806_GIP3		0xBE	// GIP 3
    #define ILI9806_PCTRL1		0xC0	// Power Control 1
    #define ILI9806_PCTRL2		0xC1	// Power Control 2
    #define ILI9806_VCCTRL1		0xC7	// VCOM Control 1
    #define ILI9806_BLCTRL1		0xC8	// Backlight Control 2
    #define ILI9806_ENGSET		0xDF	// Engineering Setting
    #define ILI9806_PGCTRL		0xE0	// Positive Gamma Control
    #define ILI9806_NGCTRL		0xE1	// Negative Gamma Control
    #define ILI9806_VOLTMSET	0xED	// VGMP / VGMN / VGSP / VGSN Voltage Measurement Set
    #define ILI9806_PTCTRL1		0xF1	// Panel Timing Control 1
    #define ILI9806_PTCTRL2		0xF2	// Panel Timing Control 2
    #define ILI9806_DVDDVSET	0xF3	// DVDD Voltage Setting
    #define ILI9806_PRSSET		0xF7	// Panel Resolution Selection Set
    #define ILI9806_LVGLVSET	0xFC	// LVGL Voltage Setting
    #define ILI9806_EXTCCSET	0xFF
    
    #define MADCTL_RGB 0x00  // Red-Green-Blue pixel order
    #define MADCTL_GS  0x01
    #define MADCTL_SS  0x02
    #define MADCTL_MH  0x04  // LCD refresh right to left
    #define MADCTL_BGR 0x08  // Blue-Green-Red pixel order
    #define MADCTL_ML  0x10  // LCD refresh Bottom to top
    #define MADCTL_MV  0x20  // Row/Column exchange
    #define MADCTL_MX  0x40  // Right to left
    #define MADCTL_MY  0x80  // Bottom to top
    S6D04D1, 432x240
    Code:
    PROGMEM static const setting_table_t power_on_setting_table[] = {
        {S6D04D1_PWRCTL,   7, {0x80, 0x00, 0x00, 0x0B, 0x33, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
        {S6D04D1_VCMCTL,   5, {0x6E, 0x6E, 0x7F, 0x7F, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
        {S6D04D1_SRCCTL,   5, {0x12, 0x00, 0x03, 0xF0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
        {S6D04D1_SLPOUT,   0, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 120},
        {S6D04D1_MADCTL,   1, {0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
        {S6D04D1_COLMOD,   1, {0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 30},
        {S6D04D1_DISCTL,  11, {0x14, 0x14, 0x03, 0x03, 0x04, 0x03, 0x04, 0x10, 0x04, 0x14, 0x14, 0x00, 0x00, 0x00, 0x00}, 0},
        {S6D04D1_GATECTL,  2, {0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
        {S6D04D1_WRDISBV,  1, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, //BRIGHTNESS
        {S6D04D1_WRCABCMB, 1, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
        {S6D04D1_MIECTL1,  3, {0x80, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
        {S6D04D1_BCMODE,   1, {0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
        {S6D04D1_MIECTL2,  3, {0x20, 0x01, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
        {S6D04D1_MIDCTL3,  2, {0x7C, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},
        {S6D04D1_DISPON,   0, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 50},
    };
    
    
    #define S6D04D1_PWRCTL		0xF3
    #define S6D04D1_VCMCTL		0xF4
    #define S6D04D1_SRCCTL		0xF5
    #define S6D04D1_SLPOUT		0x11
    #define S6D04D1_MADCTL		0x36
    #define S6D04D1_COLMOD		0x3A
    #define S6D04D1_DISCTL		0xF2
    #define S6D04D1_IFCTL		0xF6
    #define S6D04D1_GATECTL		0xFD
    #define S6D04D1_CASET		0x2A
    #define S6D04D1_PASET		0x2B
    #define S6D04D1_RAMWR		0x2C
    #define S6D04D1_RAMRD		0x2E
    #define S6D04D1_DISPON		0x29
    #define S6D04D1_DISPOFF		0x28
    #define S6D04D1_SLPIN		0x10
                    	
    #define S6D04D1_RPGAMCTL	0xF7
    #define S6D04D1_WRDISBV		0x51
    #define S6D04D1_WRCABCMB	0x5E
    #define S6D04D1_MIECTL1		0xCA
    #define S6D04D1_BCMODE		0xCB
    #define S6D04D1_MIECTL2		0xCC
    #define S6D04D1_MIDCTL3		0xCD
    #define S6D04D1_RNGAMCTL	0xF8
    #define S6D04D1_GPGAMCTL	0xF9
    #define S6D04D1_GNGAMCTL	0xFA
    #define S6D04D1_BPGAMCTL	0xFB
    #define S6D04D1_BNGAMCTL	0xFC
    #define S6D04D1_DCON		0xD9
    #define S6D04D1_WRPWD		0xF0
    #define S6D04D1_EDSTEST		0xFF
    #define S6D04D1_TEON		0x35
    #define S6D04D1_MDDICTL1	0xE0
    #define S6D04D1_WRCTRLD		0x53
    #define S6D04D1_WRCABC		0x55
    Currently working on this:
    LG4572B, 480x800, may also work on the LG4573.
    Code:
    PROGMEM static const setting_table_t power_on_setting_table[] = {
    	{0xC0, 			2, {0x01, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},		// Internal Oscillator Setting
    	{0x20,			0, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, 	// Display Inversion Off
    	{0x36,			1, {0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},		// Memory Access Control
    	{0x3a,			1, {0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},		// Interface Pixel Format
    	{0x35,			1, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},		// Tearing Effect Line On
    	{0xb1,			3, {0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},		// RGB Interface Setting
    	{0xb2,			2, {0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},		// Panel Characteristics Setting
    	{0xb3,			1, {0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},		// Panel Drive Setting
    	{0xb4,			1, {0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},		// Display Mode Control
    	{0xb5,			5, {0x10, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0}, 	// Display Control 1
    	{0xb6,			6, {0x0b, 0x0f, 0x3c, 0x13, 0x13, 0xe8, 0x00, 0x00, 0x00, 0x00}, 0},		// Display Control 2
    	{0xb7,			5, {0x46, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},		// Display Control 3
    	{0xc0,			2, {0x01, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0},		// Internal Oscillator Setting
    	{0xc3,			5, {0x07, 0x03, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00}, 40},	// Power Control 3
    	{0xc4,			6, {0x12, 0x24, 0x12, 0x12, 0x02, 0x6b, 0x00, 0x00, 0x00, 0x00}, 20},	// Power Control 4
    	{0xc5,			1, {0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 10},	// Power Control 5
    	{0xc6,			2, {0x41, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 10},	// Power Control 6
    	{0xd0,			9, {0x01, 0x26, 0x71, 0x16, 0x04, 0x03, 0x51, 0x15, 0x04, 0x00}, 0},		// Set Positive Gamma Curve for Red
    	{0xd1,			9, {0x01, 0x26, 0x71, 0x16, 0x04, 0x03, 0x51, 0x15, 0x04, 0x00}, 0},		// Set Negative Gamma Curve for Red
    	{0xd2,			9, {0x01, 0x26, 0x71, 0x16, 0x04, 0x03, 0x51, 0x15, 0x04, 0x00}, 0},		// Set Positive Gamma Curve for Green
    	{0xd3,			9, {0x01, 0x26, 0x71, 0x16, 0x04, 0x03, 0x51, 0x15, 0x04, 0x00}, 0},		// Set Negative Gamma Curve for Green
    	{0xd4,			9, {0x01, 0x26, 0x71, 0x16, 0x04, 0x03, 0x51, 0x15, 0x04, 0x00}, 0},		// Set Positive Gamma Curve for Blue
    	{0xd5,			9, {0x01, 0x26, 0x71, 0x16, 0x04, 0x03, 0x51, 0x15, 0x04, 0x00}, 0},		// Set Negative Gamma Curve for Blue
    	
    	{0x11,			0, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 100}, 
    	{0x29,			0, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 10}
    };

  20. #20
    Senior Member
    Join Date
    Mar 2017
    Location
    Ireland
    Posts
    101
    And for R61529:

    Code:
    #define R61529_TFTWIDTH   	480		// R61529 TFT width in default rotation
    #define R61529_TFTHEIGHT  	320		// R61529 TFT height in default rotation 
    
    
    
    #define R61529_NOP		0x00	// No Op, also reset write state (acording to PDF)
    #define R61529_RESET		0x01	// Software reset
    #define R61529_SLPOUT		0x11	// Sleep out (Exit sleep)
    #define R61529_DISLYON		0x29	// Display ON
    #define R61529_CASET		0x2A	// Column Address Set 
    #define R61529_PASET		0x2B	// Page Address Set 
    #define R61529_RAMWR		0x2C	// Memory Write 
    #define R61529_RAMRD		0x2E	// Memory Read
    #define R61529_MADCTL		0x36	// Memory Address Control
    #define R61529_SETPIXF		0x3A	// Set Pixel Format
    #define R61529_MCAP		0xB0	// Manufacturer Command Access Protect
    #define R61529_BLCTRL1		0xB8	// Backlight Control 1
    #define R61529_BLCTRL2		0xB9	// Backlight Control 2
    #define R61529_BLCTRL3		0xBA	// Backlight Control 3
    #define R61529_FMAIS		0xB3	// Frame Memory Access and Interface Setting
    #define R61529_DISMODE		0xB4	// Display Mode
    #define R61529_PANDSET		0xC0	// Panel Driving Setting;
    #define R61529_DTSNM		0xC1	// Display Timing Setting for Normal Mode
    #define R61529_SGDTSET		0xC4	// Source/Gate Driving Timing Setting
    #define R61529_DPIPCTL		0xC6	// DPI polarity control
    #define R61529_GAMSETA		0xC8	// Gamma Setting A Set
    #define R61529_GAMSETB		0xC9	// Gamma Setting B Set
    #define R61529_GAMSETC		0xCA	// Gamma Setting C Set
    #define R61529_PSCPSET		0xD0	// Power Setting Charge Pump Setting
    #define R61529_VCOMSET		0xD1	// VCOM Setting
    #define R61529_NVMACTL		0xE0	// NVM Access Control
    #define R61529_DDBWCTL		0xE1	// Set DDB Write Control
    #define R61529_NVMLCTL		0xE2	// NVM Load Control
    
    
    #define MADCTL_RGB 0x00  // Red-Green-Blue pixel order
    #define MADCTL_GS  0x01
    #define MADCTL_SS  0x02
    #define MADCTL_MH  0x04  // LCD refresh right to left
    #define MADCTL_BGR 0x08  // Blue-Green-Red pixel order
    #define MADCTL_ML  0x10  // LCD refresh Bottom to top
    #define MADCTL_MV  0x20  // Row/Column exchange
    #define MADCTL_MX  0x40  // Right to left
    #define MADCTL_MY  0x80  // Bottom to top

  21. #21
    Senior Member
    Join Date
    Oct 2019
    Posts
    450
    @Michael_MC thanks so much! Will try add them in tonight!

    I've just made a big change as I mentioned before
    You can now set the bus width to 16 bits in the top of the .h file, and the constructor now needs a display type passed as the first argument (currently only ILI9488_DISP is supported, but will add all the above later today)
    Can you have a jab at it and let me know if it works?

    Also, I agree with your comments above - would you like to contibute to the library by making those changes yourself? I'm happy to work on it with you as I don't have the capacity these days to fully sit on this (life commitments and two small kids)

  22. #22
    Senior Member
    Join Date
    Oct 2019
    Posts
    450
    And with the above mentioned, perhaps lets create a new repo for a new generic library that supports many displays
    I have ordered the RM68120 for myself to play around with..

    I have a custom Teensy MM board here with all 32 FlexIO2 /LCDIF pins broken out, so looking forward to seeing how it performs on a wider bus with DMA.
    Also have a new board in design with SDRAM on it - that will take some work to get it to work, but will allow dual frame buffers for faster rendering

  23. #23
    Senior Member
    Join Date
    Mar 2017
    Location
    Ireland
    Posts
    101
    I've just made a big change as I mentioned before
    You can now set the bus width to 16 bits in the top of the .h file, and the constructor now needs a display type passed as the first argument (currently only ILI9488_DISP is supported, but will add all the above later today)
    It first glance it looks great, but it'll be a few days before I get to test everything, plus I've more items arriving that'll need wired and tested also.



    And with the above mentioned, perhaps lets create a new repo for a new generic library that supports many displays
    Agreed. Need to come up with something name that can be ubiquitous, IMO, whilst not tied to something particular, and not straying from the original intent. That is; using FlexIo to drive parallel displays.

    I have a custom Teensy MM board here with all 32 FlexIO2 /LCDIF pins broken out, so looking forward to seeing how it performs on a wider bus with DMA.
    Also have a new board in design with SDRAM on it - that will take some work to get it to work, but will allow dual frame buffers for faster rendering
    Will be interesting to know this performs. Many of the larger displays boards also support RGB888 whilst having the h/v sync lines broken out and available. Full 24bit colour @ 60fps perhaps? That's only around 70MB per second memory bandwidth; wee buns for the Teensy.


    Incidentally, Of all the controllers I've available here, the R61529 is by far the worst performing, requiring extra short cabling of a few cm, and only seems to operate without glitching at low speeds.

  24. #24
    Senior Member
    Join Date
    Oct 2019
    Posts
    450
    Agreed. Need to come up with something name that can be ubiquitous, IMO, whilst not tied to something particular, and not straying from the original intent. That is; using FlexIo to drive parallel displays.
    How about uLCDt41 ?


    Will be interesting to know this performs. Many of the larger displays boards also support RGB888 whilst having the h/v sync lines broken out and available. Full 24bit colour @ 60fps perhaps? That's only around 70MB per second memory bandwidth; wee buns for the Teensy.
    Yeah, I'm looking forward to playing with higher res display with RGB888

    Incidentally, Of all the controllers I've available here, the R61529 is by far the worst performing, requiring extra short cabling of a few cm, and only seems to operate without glitching at low speeds.
    I can agree on this. That's why my go to display for 320*480 is the ILI9488
    It's so common and plenty of code around to fine tune it

  25. #25
    Senior Member
    Join Date
    Mar 2017
    Location
    Ireland
    Posts
    101
    I've been checking this out over the past two days without any success. First with the RM68120, the 16bit register controller, shows no signs of life; not a pixel. But this display might actually be RGB888 only as there is confusion as to whether or not the IM's are connected.
    This morning it's been the turn of R61529, something known to function. With BUS_WIDTH of 16 as before, it will display the image in a sort of Blue hue, that is: all of Blue with a little Green, with Red completely missing. Ie; the lower 8 bits of RGB565 are processed with the upper 8bits completely missing.
    Without access to a logic analyzer, I'm unable to confirm whether or not the upper 8 bits are functioning. Both displays are wired according to the front page of the github with board IM's set accordingly. Both Teensy's (I have four 4.1's) have one PSRAM installed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •