Using 320x480 panels with the GD library

There are a lot of 320x480 (HVGA) LCD panels based on the ILI9488 controller. This panel was originally used by smartphones a few years ago, which explains its abundance and unusual "portrait" aspect ratio. For example the ME810A-HV35R module from Bridgetek has an ILI9488 controller, together with an FT810 for running the graphics and touch.

The ILI9488 can run in lots of modes, but requires a short startup sequence to get it into RGB mode. Once in RGB mode the display can be driven by the FT810 with the GD library.

In addition to the usual RGB and SYNC signals, the 320x480 panels also have control signals for communicating with the ILI9488:

CSX chip select, active low
DCX data/command select
SCL clock, rising edge
SDA data in to ILI9488
SDO data out from ILI9488
M0 protocol select
M1 protocol select
M2 protocol select

The ILI9488 datasheet calls this "4-line SPI" protocol. To enable it, tie M0, M1 and M2 to VCC.

The Arduino sketch to do the full setup is here:

The definitions for the signals are at the top of the file - adjust as required for your layout. Here is the hookup list for the ME810A-HV35R module:

arduino pin name ME810A-HV35R pin description
8   2 FT810 select, active low
6 CSX 8 ILI9488 select, active low
5 DCX 7 data/command select
13 SCL 1 clock, rising edge
11 SDA 4 data in to ILI9488
12 SDO 3 data out from ILI9488

Note that the Bridgetek module has extra circuits to allow SDO to share the MISO signal with the FT810, this may not be the case in other designs, so use another pin for SDO if necessary.

A single function gd_ili9488_init() sets up the FT810 and the ILI9488. It also reports the ILI9488 register contents, as confirmation that communication is happening. So you should see:

GD init                               starting FT810 setup
Setting video timing for ILI9488      set FT810 regs for HVGA timing
ID: 7C                                confirms that FT810 is running

ID1: 54                               these are fixed ID regs
ID2: 80
ID3: 66
DISPLAY_POWERMODE: 8                  these are in power-up state
                                      (ILI9488 is configured for RGB mode)

ID1: 54                               ID registers are same
ID2: 80
ID3: 66
DISPLAY_POWERMODE: 9C                 regs now configured for RGB mode

The sketch just displays "hello world" - you can extend it for your application.


Note that this panel uses 3.3V levels - which is why I'm using a 3.3V Arduino Pro in my setup above

The best way to confirm communications is to remove all the FT810 setup code, and just get the ILI9488 register dump to work. When this shows the ID register correctly

Tie the panel reset pin high, or to system reset

ILI9488 signal RDX is unused, should be tied to GND