Skip to main content
Unfortunately, portal is currently in readonly mode. You cannot post answers or questions.



Driving multiple DT0242CTFT displays code sample

Hi All,

I am trying to drive multiple DT024CTFTs over SPI (ILI9341) and am running into issues so am wondering if there any code samples available that shows how to effectively do this?

I can drive the single display no problem but when extending to two displays, the performance slows down and eventually crashes.

I am currently using an stm32f767 nucleo board with a 216MHz clock that has multiple SPI controllers so I am assuming I should have enough bandwidth?

I am open to using other MCUs if there are solutions available?



Library supporting DT024CTFT code sample

There's sample code posted on DT024CTFT webpage and it references numerous other C source and header files.  Are these available and if so, where?  I did a quick Google search and didn't find something that looks like Microchip Graphics Library with the references in the code sample.

Ilitek ILI9341 Initialization Code

Note that you'll need to configure the IM pins for 8-bit interface:

//************* Reset LCD Driver ****************// LCD_nRESET = 1; delayms(1); // Delay 1ms LCD_nRESET = 0; delayms(10); // Delay 10ms // This delay time is necessary LCD_nRESET = 1; delayms(120); // Delay 120 ms //Start initial Sequence write_cmd(0x01); //software reset delay(5); write_cmd(0x28); // display off //------------power control------------------------------ write_cmd(0xc0); //power control write_data16(0x00,0x26); write_cmd(0xc1); //power control write_data16(0x00,0x11); write_cmd(0xc5); //vcom control write_data16(0x00,0x5c);//35 write_data16(0x00,0x4c);//3E write_cmd(0xc7); //vcom control write_data16(0x00,0x94); //------------memory access control------------------------ write_cmd(0x36); // memory access control write_data16(0x00,0x48); //0048 my,mx,mv,ml,BGR,mh,0.0 write_cmd(0x3a); // pixel format set write_data16(0x00,0x55);//16bit /pixel //----------------- frame rate------------------------------ write_cmd(0xb1); // frame rate... (More)

DT024DTFT landscape rotation


We are using the DT024DTFT interfacing with Linux for some of our products. We use it via the Parallel "RGB interface" and in landscape mode (rotated 90/270 degrees). To do the rotation, we set B5=1 in the MADCTL register of the ILI9341 and set the correct values for Column/Page addresses, among other timing configurations (as stated in the ILI9341 datasheet).

We have seen that when sending 320x240 in the RGB interface, the driver is skipping to update the last third of the H pixels, as seen in the picture:

When we send a 320x320 resolution, then the last third... (More)