# Interfacing with tft lcd(ILI9225) via SPI

As an exercise, I'm trying to make a driver for ILI9225 TFT LCD using SPI.
(This one https://www.amazon.com/HiLetgo-ILI9225-176x220-Support-Arduino/dp/B00LSG5HI0)

I consulted a datasheet of ILI9225 driver IC and found that I need to send a start signal to the IC before doing anything(Page 29~30). However, it also indicated that I need to know the ID value of the IC. Since there was no datasheet about the TFT LCD module itself, I don't know the ID value.
(ILI9225 datasheet: https://www.displayfuture.com/Display/datasheet/controller/ILI9225.pdf)

So, I searched for existing ILI9225 library but it seems that it doesn't contain the codes that send a start signal to the device. Still, it worked on my LCD module. Below is the part of the initialization codes. (Full library here: https://github.com/Nkawu/TFT_22_ILI9225)

/* Almost every library I searched was exactly same as this one */
/* SPI related code, doesn't have start signal */
startWrite();
/* Just write data to a register, no start signal either */
_writeRegister(ILI9225_POWER_CTRL1, 0x0000); // Set SAP,DSTB,STB
_writeRegister(ILI9225_POWER_CTRL2, 0x0000); // Set APON,PON,AON,VCI1EN,VC
_writeRegister(ILI9225_POWER_CTRL3, 0x0000); // Set BT,DC1,DC2,DC3
_writeRegister(ILI9225_POWER_CTRL4, 0x0000); // Set GVDD
_writeRegister(ILI9225_POWER_CTRL5, 0x0000); // Set VCOMH/VCOML voltage
endWrite();


To sum up, neither I nor the library knows how to send a start signal but still, the library works just fine. I'm really confused now. What should I do? Do I even need to send a start signal to the module?

• I'm not sure about why the library is working, but for the device ID code, you should read the 0 and 1 values in the table as being literal. Meaning the ID of this device is "01110x", where x is determined by one of the pins as described, and all other bits are fixed. In hex this is 0x1c or 0x1d. It is very common for devices like this to have IDs that are hardcoded or nearly so, especially if it would be unusual to use a bunch of them together. – Glenn Willen May 26 at 3:28