ILI9225 at a glance
Item | Value | Source |
|---|---|---|
Resolution | 176 × 220 | Linux |
Host interface in these drivers | 4-wire SPI with an RS (D/C) pin | Linux device-tree binding ( |
Register model | 8-bit index, 16-bit value | Linux driver |
Pixel format over SPI | RGB565, 2 bytes per pixel | Linux driver (16 bits per word for 0x22), LovyanGFX |
Full frame | 176 × 220 × 2 = 77,440 bytes | Calculated |
Readback | Not used by LovyanGFX ("RW pin not supported") | LovyanGFX |
We could not get a copy of the Ilitek datasheet when writing this page, so supply voltage, temperature range and SPI timing limits are not listed. Take them from the datasheet or module specification supplied with your panel.
It is not an ILI9341 with a smaller screen
Most small SPI TFT drivers, such as the ILI9341 and ST7789V, use MIPI DCS commands: 0x2A and 0x2B set the window, 0x2C writes pixels, and 0x36 (MADCTL) sets orientation. The ILI9225 uses a different, register-based scheme:
Job | ILI9341 / ST7789 (MIPI DCS) | ILI9225 |
|---|---|---|
Write pixels | | |
Column / row window | | |
Start address | Implied by the window | |
Orientation and color order | | |
Parameter size | Bytes | One 16-bit value per register |
On the ILI9225, 0x36 is a window register, not MADCTL. That is why ILI9341 code produces a blank or garbled screen. Also check the board itself: the TFT_22_ILI9225 README notes that a 2.2″ 240×320 module that looks very similar uses the ILI9341.
Writing registers over SPI
The Linux driver sends the register index as one 8-bit transfer with RS low. It then raises RS and sends the value. For pixel data in register 0x22 it switches to 16-bit SPI words. LovyanGFX does the same with an 8-bit command and 16-bit data. In practice:
- Register write: RS low, send the index byte; RS high, send the value high byte, then the low byte.
- Pixels: send index
0x22, raise RS, then stream RGB565 pixels, 2 bytes each.
Window registers: end first
Drawing a rectangle takes six register writes: four window registers, then the two GRAM address registers. The drivers we checked agree on the order:
0x36= horizontal end,0x37= horizontal start (the init code sets0x36to0x00AF= 175)0x38= vertical end,0x39= vertical start (0x00DB= 219)0x20and0x21= the first pixel to write
The TFT_22_ILI9225 header labels 0x36 as "start", but its code writes the end coordinate there. If only part of the screen updates, or pixels land in a strip, check this order first.
Initialization
The Linux driver, TFT_eSPI and LovyanGFX use the same power-on values:
- Power control:
0x11=0x0018,0x12=0x6121,0x13=0x006F,0x14=0x495F,0x10=0x0800. Wait 10 ms, set0x11=0x103B, then wait 50 ms. - Panel setup:
0x01=0x011C,0x02=0x0100,0x03=0x1030,0x08=0x0808,0x0B=0x1100,0x0F=0x0D01,0x15=0x0020. - Scroll and partial area:
0x31and0x34=0x00DB, the others 0. - Gamma
0x50–0x59. - Display on: TFT_eSPI writes
0x07=0x0012, waits 50 ms, then writes0x1017.
The gamma and power values depend on the glass. If your module came with init code, use those values.
Orientation, colors and inversion
- Rotation: the Linux driver keeps
0x01at0x011Cand changes the AM/ID bits in Entry Mode (0x03):0x1030(0°),0x1018(90°),0x1000(180°) and0x1028(270°). TFT_eSPI instead changes0x01(0x011C,0x001C,0x021C,0x031C) and switches0x03between0x30and0x38. - Red and blue swapped: the high byte of Entry Mode holds the color order. TFT_eSPI uses
0x10for BGR (its default) and0x00for RGB. - Negative image: LovyanGFX writes
0x1017to Display Control 1 (0x07) for a normal image and0x1013for an inverted one.
How fast can it redraw?
A full frame is 77,440 bytes. The times below are bits ÷ clock, with no command overhead:
SPI clock | Full frame |
|---|---|
8 MHz (TFT_22_ILI9225 on AVR) | 77 ms |
24 MHz | 26 ms |
40 MHz (TFT_22_ILI9225 on ESP32) | 15 ms |
On an Uno-class board, full-screen redraws are slow, so draw only what changes.
Driver support
- Arduino:
TFT_22_ILI9225(Library Manager), with hardware SPI defaults per platform. - TFT_eSPI:
ILI9225_DRIVER, 176 × 220 by default. - LovyanGFX:
Panel_ILI9225. - Linux: the
ili9225DRM driver (drivers/gpu/drm/tiny), with device-tree propertiesrs-gpios,reset-gpiosandrotation.
Our ILI9225G modules
Our 2″ 176×220 SPI modules list an ILI9225G driver. For example, PJ2007I01-24H10P150 has a 31.68 × 39.60 mm active area, 0.180 mm pixel pitch, 150 nit TN glass and a 6 o'clock viewing direction. The libraries above are written for the ILI9225 register set. Check your bring-up against the init code supplied with the module.
Related pages
For the 240×320 driver often confused with it, see ILI9341. For SPI wiring and bus speed, see our SPI display page.
ILI9225 init code
// Register model used by the Linux ili9225 driver, TFT_eSPI and LovyanGFX.
// RS (D/C) low: 8-bit register index; RS high: 16-bit value, high byte first.
void reg(uint8_t idx, uint16_t val) { rs_low(); spi8(idx); rs_high(); spi8(val >> 8); spi8(val & 0xFF); }
// Window x0..x1, y0..y1 (portrait 176x220). End goes in 0x36/0x38, start in 0x37/0x39.
reg(0x36, x1); reg(0x37, x0);
reg(0x38, y1); reg(0x39, y0);
reg(0x20, x0); reg(0x21, y0); // GRAM address = window start
rs_low(); spi8(0x22); rs_high(); // then stream RGB565 pixels, 2 bytes eachDisplay modules using ILI9225
ILI9225 troubleshooting & FAQ
Can I use an ILI9341 library with an ILI9225 display?
No. The ILI9341 uses MIPI DCS commands such as 0x2A, 0x2B and 0x2C to set the window and write pixels. The ILI9225 uses its own register set: an 8-bit register index followed by a 16-bit value, with the window in registers 0x36–0x39 and pixel data written to 0x22. Use a library with an ILI9225 driver, such as TFT_22_ILI9225, TFT_eSPI (ILI9225_DRIVER) or LovyanGFX (Panel_ILI9225). The library author also notes that a similar-looking 2.2″ 240×320 module uses the ILI9341, so check the resolution printed on the board.
What SPI clock does ILI9225 run at?
Libraries use quite different defaults. TFT_22_ILI9225 uses 8 MHz on AVR, 18 MHz on STM32F1, 24 MHz on other ARM boards and 40 MHz on ESP32 and ESP8266. The Linux device-tree example uses 12 MHz. If the image is corrupted, lower the clock first. We have not cited a datasheet clock limit here because we could not obtain a copy of the Ilitek datasheet to check it.
Why is my ILI9225 image mirrored, rotated or drawn in the wrong place?
Orientation is set by two registers: Driver Output Control (0x01) and Entry Mode (0x03). The Linux driver keeps 0x01 at 0x011C and changes the AM/ID bits in 0x03 (0x30, 0x18, 0x00 or 0x28 for 0°, 90°, 180° and 270°). The window registers are a common trap. All three drivers we checked write the window end to 0x36 and 0x38 and the start to 0x37 and 0x39, even where the header comments label them the other way round.

