Questions? Call us: +1 760-918-6722

RGB Interface with DE


I'm trying to use the display with the RGB interface with DE (not the VSYNC mode).

I'm using the 4-wire 8-bit SPI mode with IM3-1 to 1 and IM0 to 0.

So far I have not been able to get valid picture.

If I do a hard reset, Soft Reset (0x01), Sleep Out (0x11) and Display ON (0x29) the display shows every other line black and white.

If I set F6h to 0x01, 0x00, 0x06 then I get only one line of video. the reset of the display looks like garbage (whatever seems to be in RAM memory).

My timings are as follow: hactive = 240, hfront porch = 10, hsync width = 10, hbackporch = 20 ; vactive = 320, vfront porch = 4, vsyncwidth = 2, vbackporch = 2. Pixel clock = 6.35MHz. This should match the default settings for 70Hz. Are those correct? polarity for syncs is negative and de is positive.

Every other attempt to change registers ended up either with white screen or whithe / black lines or first line of video + garbage.

In register F6, what is the difference between DM and RM? what should I set for those?

In register B0, what is the Bypass? Should I set it to 0 or 1? I tried setting it to 1 but the display stays white...

Do you have an exemple sequence the would enable RGB mode with data enable? I tried the example sequences provided in the download section without any luck.



engineering_seacomp's picture
October 3, 2019

In RGB Mode, if you set to any of the serial inputs, it defaults to DE mode.  To get it going, timing doesn't really matter if signals are correct.  Please slow down the referesh rate to about 

Please see reset timing in ILI9341 datasheet section 15.4 for proper reset sequence.

4-Wire 8-bit Serial Data Interface II

4-wire 8-bit Serial Data Interface II is the correct mode to use based on the microprocessor pins I see available. It is the mode that is closest to standard SPI port operation with a few minor exceptions. Take a look at the ILI9341 driver IC datasheet you can download from the 2.2" display page on our website. Paragraph 7.1.8 on page 33 describes the serial interface timing for the SPI pins. Page 35 has a useful timing diagram for the 4-line Serial Interface Protocol.

Note that the WR pin becomes the D/CX signal in serial mode. CS is used to initiate a data transfer by pulling it low. At the end of the data transfer, pull the CS pin high to complete the transaction. The timing diagram indicates that you can pull the CS pin high in between the command byte and data bytes within a transfer, but it is unlikely you will need to do this if the display is the only device on the SPI bus. Just leave it low during the entire transaction to keep things simple.

The D/CX pin tell the ILI9341 that the current byte is either command or data. Pull the D/CX pin low when the current byte is a command, and pull high when it is data. The timing diagram indicates you only really need to set D/CX on the last bit of a byte, but it is much simpler to just leave it high or low during the entire byte.

Here are the pin connections needed:

Pin Symbol Display Connections


3 IM1 +3volts VCC

4 IM2 +3volts VCC

5 IM3 +3volts VCC

6 Reset Resets ILI9341. Pull low momentarily after power-on to reset chip.

7-28 GND

29 SDO 4 wire MISO (SPI master input)

30 SDI 4 wire MOSI (SPI master output)


32 SCL 4 wire spi SCK

33 WR 4 wire spi DC/X (Pull low for command bytehigh for data byte)

34 CS 4 wire spi chip select. Pull low to start a data transaction. Pull high when transaction is finished.

35 FMARK Not connected

36 VCC +3volts VCC


38 LEDA +5 volts

39 LEDK1 120 ohm to GND

40 LEDK2 120 ohm to GND

41 LEDK3 120 ohm to GND

42-45 NC Not connected

Note: Best to use PWM for backlight control. But for prototype the LED backlight anode pin needs to be driven by a 5 Volt supply and each individual LED cathode needs a current limiting resistor. You can use a lower anode voltage than 5V, but you will need to calculate a new resistor value. The backlight LED voltage drop is about 3.2 Volts and varies with temperature.

SPI Interaces

3-line Serial Interface

See ILI9341 datasheet sections 7.1.8-7.1.10, 7.6.1 and 19.3.3

4-line Serial Interface

See ILI9341 datasheet sections 7.1.8-7.1.10, 7.6.2 and 19.3.4

engineering_seacomp's picture
October 3, 2019


It is possible that the HSYNC and VSYNC pin are swapped. VSYNC pin is actually pin 7 and HSYNC pin is pin 8.  Please try this.

Alex's picture
January 3, 2020


I am having the same problem with RGB DE Mode not behaving correctly... Could you confirm that there is an error on the Display DS and the HSYNC/VSYNC Pins are to be swapped ( so, 7 = VSYNC, 8 = HSYNC )...? This would confirm why I can only see a single top line updated in the display...

Kind Regards


Alex's picture
January 3, 2020


I am having troubles too with RGB DE Mode, which behaves in a weird way even if all signals/registers are tested and correct as per Controller DS...

Could you confirm that thaere is a problem with VSYN/HSYNC signals to be swapped...?

Kind Regards


engineering_seacomp's picture
January 7, 2020

Hi Alex,


The datasheet was updated on Nov 4 2019 to address this.


I appolgizge for the typo.