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

SDT028ATFT 16-bit RGB Minimal Initialization Code

The following is the minimal initialization code required to configure the ILI9341 on board the SDT028ATFT module for 16-bit RGB. Please note that you will need to supply the WriteParameter and WriteCommand functions to write data over the 3-wire 9-bit Interface-I SPI interface.

void ILI9341Init(void)
{
//Hardware reset
DisplayResetOn();
DelayMs(200);
DisplayResetOff();
DelayMs(200);
//Software Reset
WriteCommand(0x01);
DelayMs(200);
//RGB
WriteCommand(0xB0);
WriteParameter(0xC0);
//Interface control
WriteCommand(0xF6);
WriteParameter(0x01);
WriteParameter(0x01);
WriteParameter(0x06);
//Pixel format
WriteCommand(0x3A);
WriteParameter(0x56);
// Memory Access Control
WriteCommand(0x36);
WriteParameter(0x48);
// Row-Col Exch, BGR color direction
// Sleep Out
WriteCommand(0x11);
DelayMs(200);
//Display On
WriteCommand(0x29);
}