ILI9320 [ETC]

非晶硅薄膜晶体管液晶显示器单片机驱动240RGBx320分辨率和26万色;
ILI9320
型号: ILI9320
厂家: ETC    ETC
描述:

非晶硅薄膜晶体管液晶显示器单片机驱动240RGBx320分辨率和26万色

晶体 显示器 晶体管 驱动
文件: 总34页 (文件大小:549K)
中文:  中文翻译
下载:  下载PDF数据表文档文件
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
ILI9320  
a-Si TFT LCD Single Chip Driver with  
240RGBx320 Resolution and 262K color  
Application Notes  
Version: Preliminary V0.92  
Date: April., 21rd 2007  
深圳市圣邦达电子有限公司  
.深圳 龙华  
Tel.86-755-83723989; Fax.86-755-61351350  
www.sbdsemi.cn  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网站www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
1. Application FPC Circuit  
1.1. CPT 2.4& 2.8Panel  
J1  
GLASS  
ILI9320 for CPT QVGA 2.2"/2.4"/2.8" Panel  
ALL the VGL pins  
R2  
open  
must be shorted  
together.  
the VCOM pins  
be shorted  
ALL  
mus  
C14  
C15  
t
ether.  
tog  
ALL the VCOM pins  
must be shorted  
D 1  
ALL the VGL pins  
must be shorted  
together.  
M3 M2 M1 M0  
Interface Selection  
i80-18bit interface  
together.  
On the default setting, the  
internal resistor is used  
1
1
0
0
0
0
0
0
0
1
1
1
1
0
1
0
1
i80-9bit interface  
i80-16bit interface  
i80-8bit interface  
SPI interface  
for the OSC and external  
resistor can be removed.  
1
0
ID  
TP1  
VGH  
TP2  
VGL  
TP3  
TP4  
TP5  
TP6  
VCOM  
VCOMH  
VCOML  
VREG1OUT  
TP7  
TP8  
TP9  
TP10  
TP11  
VCL  
TP12  
TP13  
GND  
VCC  
VC  
I
VCI1  
VD  
D
FMARK  
J2  
J3  
CON 40  
深圳市圣邦达电子有限公司 电话:086-0755-83723989 传真:086-0755-61351350  
公司网站www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
本资料来源来自互联网,一切版权归都属原设计公司,如有与法律相抵触之处,请及时联系我们,我们会及时修改更正。  
Page 2 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网站www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
1.1.1. CPT 2.4Initial Code  
void ILI9320_CPT24_Initial(void)  
{
// VCI=2.8V  
//************* Reset LCD Driver ****************//  
LCD_nRESET = 1;  
delayms(1); // Delay 1ms  
LCD_nRESET = 0;  
// This delay time is necessary  
delayms(10); // Delay 10ms  
LCD_nRESET = 1;  
delayms(50); // Delay 50 ms  
//************* Start Initial Sequence **********//  
LCD_CtrlWrite_ILI9320(0x00E5,0x8000);  
LCD_CtrlWrite_ILI9320(0x0000,0x0001);  
LCD_CtrlWrite_ILI9320(0x0001,0x0100);  
LCD_CtrlWrite_ILI9320(0x0002,0x0700);  
LCD_CtrlWrite_ILI9320(0x0003,0x1030);  
LCD_CtrlWrite_ILI9320(0x0004,0x0000);  
// Set the Vcore voltage and this setting is must.  
// Start internal OSC.  
// set SS and SM bit  
// set 1 line inversion  
// set GRAM write direction and BGR=1.  
// Resize register  
LCD_CtrlWrite_ILI9320(0x0008,0x0202);  
LCD_CtrlWrite_ILI9320(0x0009, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000A, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000C, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000D, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000F, 0x0000);  
// set the back porch and front porch  
// set non-display area refresh cycle ISC[3:0]  
// FMARK function  
// RGB interface setting  
// Frame marker Position  
// RGB interface polarity  
//*************Power On sequence ****************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0007);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013,0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// R11h=0x0031 at VCI=3.3V DC1[2:0], DC0[2:0], VC[2:0]  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0010,0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011,0x0037);  
delayms(50);  
LCD_CtrlWrite_ILI9320(0x0012,0x013C);  
delayms(50);  
// R12h=0x0138 at VCI=3.3V VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013,0x1C00);  
LCD_CtrlWrite_ILI9320(0x0029,0x000E);  
delayms(50);  
// R13h=0x1800 at VCI=3.3V VDV[4:0] for VCOM amplitude  
// R29h=0x0008 at VCI=3.3V VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0020,0x0000);  
LCD_CtrlWrite_ILI9320(0x0021,0x0000);  
// GRAM horizontal Address  
// GRAM Vertical Address  
// ----------- Adjust the Gamma Curve ----------//  
LCD_CtrlWrite_ILI9320(0x0030, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0031, 0x0505);  
LCD_CtrlWrite_ILI9320(0x0032,0x0004);  
LCD_CtrlWrite_ILI9320(0x0035,0x0006);  
LCD_CtrlWrite_ILI9320(0x0036, 0x0707);  
LCD_CtrlWrite_ILI9320(0x0037, 0x0105);  
LCD_CtrlWrite_ILI9320(0x0038, 0x0002);  
LCD_CtrlWrite_ILI9320(0x0039,0x0707);  
LCD_CtrlWrite_ILI9320(0x003C,0x0704);  
LCD_CtrlWrite_ILI9320(0x003D,0x0807);  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 3 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn  
EMAIL yangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
//------------------ Set GRAM area ---------------//  
LCD_CtrlWrite_ILI9320(0x0050, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0051, 0x00EF);  
LCD_CtrlWrite_ILI9320(0x0052, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0053,0x013F);  
// Horizontal GRAM Start Address  
// Horizontal GRAM End Address  
// Vertical GRAM Start Address  
// Vertical GRAM Start Address  
LCD_CtrlWrite_ILI9320(0x0060,0x2700);  
LCD_CtrlWrite_ILI9320(0x0061,0x0001);  
LCD_CtrlWrite_ILI9320(0x006A,0x0000);  
// Gate Scan Line  
// NDL,VLE, REV  
// set scrolling line  
//-------------- Partial Display Control ---------//  
LCD_CtrlWrite_ILI9320(0x0080, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0081, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0082, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0083, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0084, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0085,0x0000);  
//-------------- Panel Control -------------------//  
LCD_CtrlWrite_ILI9320(0x0090, 0x0010);  
LCD_CtrlWrite_ILI9320(0x0092, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0093, 0x0003);  
LCD_CtrlWrite_ILI9320(0x0095, 0x0110);  
LCD_CtrlWrite_ILI9320(0x0097, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0098, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0007,0x0173);  
// 262K color and display ON  
}
void LCD_ExitSleep_ILI9320(void)  
{
//*************Power On sequence ******************//  
LCD_CtrlWrite_ILI9320(0x0010,0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// R11h=0x0031 at VCI=3.3V DC1[2:0], DC0[2:0], VC[2:0]  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0010, 0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011,0x0037);  
delayms(50);  
LCD_CtrlWrite_ILI9320(0x0012, 0x013C);  
delayms(50);  
// R12h=0x0138 at VCI=3.3V VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013, 0x1C00);  
LCD_CtrlWrite_ILI9320(0x0029, 0x000E);  
delayms(50);  
// R13h=0x1800 at VCI=3.3V VDV[4:0] for VCOM amplitude  
// R29h=0x0008 at VCI=3.3V VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
}
// 262K color and display ON  
void LCD_EnterSleep_ILI9320(void)  
{
// display OFF  
LCD_CtrlWrite_ILI9320(0x0007,0x0000);  
//************* Power OFF sequence **************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
LCD_CtrlWrite_ILI9320(0x0010,0x0002);  
}
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 4 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
13543266942 13642365547  
1.1.2. CPT 2.8Initial Code  
void ILI9320_CPT28_Initial(void)  
{
// VCI=2.8V  
//************* Reset LCD Driver ****************//  
LCD_nRESET = 1;  
delayms(1); // Delay 1ms  
LCD_nRESET = 0;  
delayms(10); // Delay 10ms  
LCD_nRESET = 1;  
delayms(50); // Delay 50 ms  
//************* Start Initial Sequence **********//  
LCD_CtrlWrite_ILI9320(0x00E5,0x8000);  
LCD_CtrlWrite_ILI9320(0x0000,0x0001);  
LCD_CtrlWrite_ILI9320(0x0001,0x0100);  
LCD_CtrlWrite_ILI9320(0x0002,0x0700);  
LCD_CtrlWrite_ILI9320(0x0003,0x1030);  
LCD_CtrlWrite_ILI9320(0x0004,0x0000);  
// Set the internal vcore voltage  
// Start internal OSC.  
// set SS and SM bit  
// set 1 line inversion  
// set GRAM write direction and BGR=1.  
// Resize register  
LCD_CtrlWrite_ILI9320(0x0008,0x0202);  
LCD_CtrlWrite_ILI9320(0x0009, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000A, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000C, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000D, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000F, 0x0000);  
// set the back porch and front porch  
// set non-display area refresh cycle ISC[3:0]  
// FMARK function  
// RGB interface setting  
// Frame marker Position  
// RGB interface polarity  
//*************Power On sequence ****************//  
LCD_CtrlWrite_ILI9320(0x0010,0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0007);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013,0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
LCD_CtrlWrite_ILI9320(0x0010,0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011,0x0037);  
delayms(50);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0012,0x013A);  
delayms(50);  
// VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013,0x1600);  
LCD_CtrlWrite_ILI9320(0x0029,0x000C);  
delayms(50);  
// VDV[4:0] for VCOM amplitude  
// VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0020,0x0000);  
LCD_CtrlWrite_ILI9320(0x0021,0x0000);  
// GRAM horizontal Address  
// GRAM Vertical Address  
// ----------- Adjust the Gamma Curve ----------//  
LCD_CtrlWrite_ILI9320(0x0030, 0x0504);  
LCD_CtrlWrite_ILI9320(0x0031, 0x0703);  
LCD_CtrlWrite_ILI9320(0x0032, 0x0702);  
LCD_CtrlWrite_ILI9320(0x0035, 0x0101);  
LCD_CtrlWrite_ILI9320(0x0036, 0x0A1F);  
LCD_CtrlWrite_ILI9320(0x0037, 0x0504);  
LCD_CtrlWrite_ILI9320(0x0038, 0x0003);  
LCD_CtrlWrite_ILI9320(0x0039, 0x0706);  
LCD_CtrlWrite_ILI9320(0x003C, 0x0707);  
LCD_CtrlWrite_ILI9320(0x003D,0x091F);  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 5 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
//------------------ Set GRAM area ---------------//  
LCD_CtrlWrite_ILI9320(0x0050, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0051, 0x00EF);  
LCD_CtrlWrite_ILI9320(0x0052, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0053,0x013F);  
// Horizontal GRAM Start Address  
// Horizontal GRAM End Address  
// Vertical GRAM Start Address  
// Vertical GRAM Start Address  
LCD_CtrlWrite_ILI9320(0x0060,0x2700);  
LCD_CtrlWrite_ILI9320(0x0061,0x0001);  
LCD_CtrlWrite_ILI9320(0x006A,0x0000);  
// Gate Scan Line  
// NDL,VLE, REV  
// set scrolling line  
//-------------- Partial Display Control ---------//  
LCD_CtrlWrite_ILI9320(0x0080, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0081, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0082, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0083, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0084, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0085,0x0000);  
//-------------- Panel Control -------------------//  
LCD_CtrlWrite_ILI9320(0x0090, 0x0010);  
LCD_CtrlWrite_ILI9320(0x0092, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0093, 0x0003);  
LCD_CtrlWrite_ILI9320(0x0095, 0x0110);  
LCD_CtrlWrite_ILI9320(0x0097, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0098,0x0000);  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
}
// 262K color and display ON  
void LCD_ExitSleep_ILI9320(void)  
{
//*************Power On sequence ******************//  
LCD_CtrlWrite_ILI9320(0x0010,0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0010, 0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011,0x0037);  
delayms(50);  
LCD_CtrlWrite_ILI9320(0x0012, 0x013A);  
delayms(50);  
// VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013, 0x1600);  
LCD_CtrlWrite_ILI9320(0x0029, 0x000C);  
delayms(50);  
//VDV[4:0] for VCOM amplitude  
//VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
}
// 262K color and display ON  
void LCD_EnterSleep_ILI9320(void)  
{
// display OFF  
LCD_CtrlWrite_ILI9320(0x0007,0x0000);  
//************* Power OFF sequence **************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
LCD_CtrlWrite_ILI9320(0x0010,0x0002);  
}
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 6 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn  
EMAIL yangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
1.2. CPT3.2Panel  
J1  
GLASS  
ILI9320 for CPT QVGA 3.2" Panel  
R2  
ALL the VCOM pins  
must be shorted  
ALL the VGL pins  
open  
gether.  
to  
C14  
C15  
must be shorted  
together.  
ALL the VCOM pins  
must be shorted  
D1  
ALL the  
L pins  
M3 M2 M1 M0  
Interface Selection  
i80-18bit interface  
together.  
On the default setting, the  
1
1
0
0
0
0
0
0
0
1
1
1
1
0
1
0
1
must be orted  
together.  
internal resistor is used  
for the OSC and external  
resistor can be removed.  
i80-9bit interface  
i80-16bit interface  
i80-8bit interface  
1
0
ID  
SPI interface  
TP1  
VGH  
TP2  
VGL  
TP3  
TP4  
TP5  
TP6  
VCOM  
VCOMH  
VCOML  
VREG1OUT  
TP7  
TP8  
TP9  
TP10  
TP11  
TP12  
FMARK  
TP13  
GND  
VCC  
VCI  
VCI  
1
VDD  
VCL  
J2  
J3  
CON40  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 7 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn  
EMAIL yangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
1.2.1. CPT 3.2Initial Code  
void ILI9320_CPT32_Initial(void)  
{
// VCI=2.8V  
//************* Reset LCD Driver ****************//  
LCD_nRESET = 1;  
delayms(1); // Delay 1ms  
LCD_nRESET = 0;  
delayms(10); // Delay 10ms  
LCD_nRESET = 1;  
delayms(50); // Delay 50 ms  
//************* Start Initial Sequence **********//  
LCD_CtrlWrite_ILI9320(0x00E5, 0x8000);  
LCD_CtrlWrite_ILI9320(0x0000, 0x0001);  
LCD_CtrlWrite_ILI9320(0x0001, 0x0100);  
LCD_CtrlWrite_ILI9320(0x0002, 0x0700);  
LCD_CtrlWrite_ILI9320(0x0003, 0x1030);  
LCD_CtrlWrite_ILI9320(0x0004, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0008, 0x0202);  
LCD_CtrlWrite_ILI9320(0x0009, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000A, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000C, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000D, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000F, 0x0000);  
// Set the internal vcore voltage  
// Start internal OSC.  
// set SS and SM bit  
// set 1 line inversion  
// set GRAM write direction and BGR=1.  
// Resize register  
// set the back porch and front porch  
// set non-display area refresh cycle ISC[3:0]  
// FMARK function  
// RGB interface setting  
// Frame marker Position  
// RGB interface polarity  
//*************Power On sequence ****************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0007);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
LCD_CtrlWrite_ILI9320(0x0010, 0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0147);  
delayms(50);  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0012, 0x013C);  
// VREG1OUT voltage  
delayms(50);  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013, 0x0E00);  
LCD_CtrlWrite_ILI9320(0x0029, 0x0009);  
delayms(50);  
// VDV[4:0] for VCOM amplitude  
// VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0020, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0021, 0x0000);  
// GRAM horizontal Address  
// GRAM Vertical Address  
// ----------- Adjust the Gamma Curve ----------//  
LCD_CtrlWrite_ILI9320(0x0030, 0x0207);  
LCD_CtrlWrite_ILI9320(0x0031, 0x0505);  
LCD_CtrlWrite_ILI9320(0x0032, 0x0102);  
LCD_CtrlWrite_ILI9320(0x0035, 0x0006);  
LCD_CtrlWrite_ILI9320(0x0036, 0x0606);  
LCD_CtrlWrite_ILI9320(0x0037, 0x0707);  
LCD_CtrlWrite_ILI9320(0x0038, 0x0506);  
LCD_CtrlWrite_ILI9320(0x0039, 0x0407);  
LCD_CtrlWrite_ILI9320(0x003C, 0x0106);  
LCD_CtrlWrite_ILI9320(0x003D, 0x0601);  
//------------------ Set GRAM area ---------------//  
LCD_CtrlWrite_ILI9320(0x0050, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0051, 0x00EF);  
LCD_CtrlWrite_ILI9320(0x0052, 0x0000);  
// Horizontal GRAM Start Address  
// Horizontal GRAM End Address  
// Vertical GRAM Start Address  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 8 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
LCD_CtrlWrite_ILI9320(0x0053, 0x013F);  
// Vertical GRAM Start Address  
LCD_CtrlWrite_ILI9320(0x0060, 0x2700);  
LCD_CtrlWrite_ILI9320(0x0061, 0x0001);  
LCD_CtrlWrite_ILI9320(0x006A, 0x0000);  
// Gate Scan Line  
// NDL,VLE, REV  
// set scrolling line  
//-------------- Partial Display Control ---------//  
LCD_CtrlWrite_ILI9320(0x0080, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0081, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0082, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0083, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0084, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0085, 0x0000);  
//-------------- Panel Control -------------------//  
LCD_CtrlWrite_ILI9320(0x0090, 0x0010);  
LCD_CtrlWrite_ILI9320(0x0092, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0093, 0x0003);  
LCD_CtrlWrite_ILI9320(0x0095, 0x0110);  
LCD_CtrlWrite_ILI9320(0x0097, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0098, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
// 262K color and display ON  
}
void LCD_ExitSleep_ILI9320(void)  
{
//*************Power On sequence ******************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
LCD_CtrlWrite_ILI9320(0x0010, 0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0147);  
delayms(50);  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0012, 0x013C);  
delayms(50);  
// VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013, 0x0E00);  
LCD_CtrlWrite_ILI9320(0x0029, 0x0009);  
delayms(50);  
// VDV[4:0] for VCOM amplitude  
// VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
// 262K color and display ON  
}
void LCD_EnterSleep_ILI9320(void)  
{
LCD_CtrlWrite_ILI9320(0x0007, 0x0000);  
//************* Power OFF sequence **************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// display OFF  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
LCD_CtrlWrite_ILI9320(0x0010, 0x0002);  
}
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 9 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn  
EMAIL yangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
1.3. CMO 2.2& CMO 2.4& CMO 2.8Panel  
U1  
ILI9320 for CMO Panel (CPU Interface)  
C3  
C2  
C6  
C7  
C9  
C8  
C10  
C11  
C12  
C1  
CC44  
C5  
C13  
D1  
IM3  
0
IM0  
0
Interface  
16-bit i80-interface  
C14  
C
15  
1
0
0
8-bit i80-interface  
18-bit i80-interface  
1
1
1
9-bit i80-interface  
When the RGB interface is used to transfer  
the display data, the SPI interface is  
necessary for the registers setting.  
LED B/ L1  
Note:  
1. When the RGB interface is not used, please shorted the VSYNC, HSYNC, DOTCLK  
and ENABLE to IOVCC or GND.  
2. When the SPI interface is not used, the SDI is shorted to IOVCC or GND, and  
let SDO as open.  
3. The Schottky barrier diode shall be added for VGL and VGH pins.  
4. If the voltage of interface is 1.8V, the IOVCC is connected to 1.8V and the  
VCC/VCI can be shorted together.  
TP1  
TP2  
TP3  
TP4  
TP5  
TP6  
TP7  
VCL  
TP8  
CPUInterface  
VCOM  
VGH  
VGL  
DDVDH  
VCI1  
VREG1OUT  
FMARK  
J1  
U1  
ILI9320 for CMO Panel (RGB Interface)  
C3  
C2  
C1  
C6  
C7  
C9  
C8  
C10  
C11  
C1 2  
CC44  
C5  
C13  
When the RGB interface is used  
to transfer the display data,  
the SPI interface is necessary  
D1  
for the registers setting.  
C14  
C
15  
LED B/L1  
Note:  
1. When the RGB interface is not used, please shorted the VSYNC, HSYNC, DOTCLK  
and ENABLE to IOVCC or GND.  
2. When the SPI interface is not used, the SDI is shorted to IOVCC or GND, and  
let SDO as open.  
3. The Schottky barrier diode shall be added for VGL and VGH pins.  
4. If the voltage of interface is 1.8V, the IOVCC is connected to 1.8V and the  
VCC/VCI can be shorted together.  
RGB Interface  
TP1  
TP2  
TP3  
TP4  
TP5  
TP6  
TP7  
VCL  
TP8  
J1  
VCOM  
VGH  
VGL  
DDVDH  
VCI1  
VREG1OUT  
FMARK  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 10 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网站www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
1.3.1. CMO 2.2initial code  
void ILI9320_CMO22_Initial(void)  
{
// VCI=2.8V  
//************* Reset LCD Driver ****************//  
LCD_nRESET = 1;  
delayms(1); // Delay 1ms  
LCD_nRESET = 0;  
// This delay is necessary  
delayms(10); // Delay 10ms  
LCD_nRESET = 1;  
delayms(50); // Delay 50 ms  
//************* Start Initial Sequence **********//  
LCD_CtrlWrite_ILI9320(0x00E5,0x8000);  
LCD_CtrlWrite_ILI9320(0x0000, 0x0001);  
LCD_CtrlWrite_ILI9320(0x0001, 0x0100);  
LCD_CtrlWrite_ILI9320(0x0002, 0x0700);  
LCD_CtrlWrite_ILI9320(0x0003, 0x0030);  
LCD_CtrlWrite_ILI9320(0x0004,0x0000);  
// Set the Vcore voltage and this setting is must.  
// Start internal OSC.  
// set SS and SM bit  
// set 1 line inversion  
// set GRAM write direction and BGR=0.  
// Resize register  
LCD_CtrlWrite_ILI9320(0x0008,0x0202);  
LCD_CtrlWrite_ILI9320(0x0009, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000A, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000C, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000D, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000F, 0x0000);  
// set the back porch and front porch  
// set non-display area refresh cycle ISC[3:0]  
// FMARK function  
// RGB interface setting  
// Frame marker Position  
// RGB interface polarity  
//*************Power On sequence ****************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0007);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013,0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0010,0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011,0x0037);  
delayms(50);  
LCD_CtrlWrite_ILI9320(0x0012,0x013E);  
delayms(50);  
// VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013,0x1C00);  
LCD_CtrlWrite_ILI9320(0x0029,0x0007);  
delayms(50);  
// VDV[4:0] for VCOM amplitude  
// VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0020,0x0000);  
LCD_CtrlWrite_ILI9320(0x0021,0x0000);  
// GRAM horizontal Address  
// GRAM Vertical Address  
// ----------- Adjust the Gamma Curve ----------//  
LCD_CtrlWrite_ILI9320(0x0030, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0031, 0x0207);  
LCD_CtrlWrite_ILI9320(0x0032,0x0707);  
LCD_CtrlWrite_ILI9320(0x0035,0x0203);  
LCD_CtrlWrite_ILI9320(0x0036, 0x0609);  
LCD_CtrlWrite_ILI9320(0x0037, 0x0707);  
LCD_CtrlWrite_ILI9320(0x0038, 0x0400);  
LCD_CtrlWrite_ILI9320(0x0039, 0x0707);  
LCD_CtrlWrite_ILI9320(0x003C, 0x0500);  
LCD_CtrlWrite_ILI9320(0x003D,0x1807);  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 11 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
13543266942 13642365547  
//------------------ Set GRAM area ---------------//  
LCD_CtrlWrite_ILI9320(0x0050, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0051, 0x00EF);  
LCD_CtrlWrite_ILI9320(0x0052, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0053,0x013F);  
// Horizontal GRAM Start Address  
// Horizontal GRAM End Address  
// Vertical GRAM Start Address  
// Vertical GRAM Start Address  
LCD_CtrlWrite_ILI9320(0x0060,0x2700);  
LCD_CtrlWrite_ILI9320(0x0061,0x0001);  
LCD_CtrlWrite_ILI9320(0x006A,0x0000);  
// Gate Scan Line  
// NDL,VLE, REV  
// set scrolling line  
//-------------- Partial Display Control ---------//  
LCD_CtrlWrite_ILI9320(0x0080, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0081, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0082, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0083, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0084, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0085,0x0000);  
//-------------- Panel Control -------------------//  
LCD_CtrlWrite_ILI9320(0x0090, 0x0010);  
LCD_CtrlWrite_ILI9320(0x0092, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0093, 0x0003);  
LCD_CtrlWrite_ILI9320(0x0095, 0x0110);  
LCD_CtrlWrite_ILI9320(0x0097, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0098, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0007,0x0173);  
// 262K color and display ON  
}
void LCD_ExitSleep_ILI9320(void)  
{
//*************Power On sequence ******************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011,0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0010, 0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011,0x0037);  
delayms(50);  
LCD_CtrlWrite_ILI9320(0x0012, 0x013E);  
delayms(50);  
// VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013, 0x1C00);  
LCD_CtrlWrite_ILI9320(0x0029, 0x0007);  
delayms(50);  
// VDV[4:0] for VCOM amplitude  
// VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
}
// 262K color and display ON  
void LCD_EnterSleep_ILI9320(void)  
{
// display OFF  
LCD_CtrlWrite_ILI9320(0x0007,0x0000);  
//************* Power OFF sequence **************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
LCD_CtrlWrite_ILI9320(0x0010,0x0002);  
}
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 12 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
13543266942 13642365547  
1.3.1. CMO 2.4initial code  
void ILI9320_CMO24_Initial(void)  
{
// VCI=2.8V  
//************* Reset LCD Driver ****************//  
LCD_nRESET = 1;  
delayms(1); // Delay 1ms  
LCD_nRESET = 0;  
// This delay time is necessary  
delayms(10); // Delay 10ms  
LCD_nRESET = 1;  
delayms(50); // Delay 50 ms  
//************* Start Initial Sequence **********//  
LCD_CtrlWrite_ILI9320(0x00E5, 0x8000);  
LCD_CtrlWrite_ILI9320(0x0000, 0x0001);  
LCD_CtrlWrite_ILI9320(0x0001, 0x0100);  
LCD_CtrlWrite_ILI9320(0x0002, 0x0700);  
LCD_CtrlWrite_ILI9320(0x0003, 0x1030);  
LCD_CtrlWrite_ILI9320(0x0004,0x0000);  
// Set the internal vcore voltage  
// Start internal OSC.  
// set SS and SM bit  
// set 1 line inversion  
// set GRAM write direction and BGR=1.  
// Resize register  
LCD_CtrlWrite_ILI9320(0x0008,0x0202);  
LCD_CtrlWrite_ILI9320(0x0009, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000A, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000C, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000D, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000F, 0x0000);  
// set the back porch and front porch  
// set non-display area refresh cycle ISC[3:0]  
// FMARK function  
// RGB interface setting  
// Frame marker Position  
// RGB interface polarity  
//*************Power On sequence ****************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013,0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
LCD_CtrlWrite_ILI9320(0x0010,0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011,0x0037);  
delayms(50);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0012,0x013B);  
delayms(50);  
// VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013,0x1900);  
LCD_CtrlWrite_ILI9320(0x0029,0x0007);  
delayms(50);  
// VDV[4:0] for VCOM amplitude  
// VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0020,0x0000);  
LCD_CtrlWrite_ILI9320(0x0021,0x0000);  
// GRAM horizontal Address  
// GRAM Vertical Address  
// ----------- Adjust the Gamma Curve ----------//  
LCD_CtrlWrite_ILI9320(0x0030, 0x0007);  
LCD_CtrlWrite_ILI9320(0x0031, 0x0504);  
LCD_CtrlWrite_ILI9320(0x0032, 0x0703);  
LCD_CtrlWrite_ILI9320(0x0035, 0x0002);  
LCD_CtrlWrite_ILI9320(0x0036, 0x0707);  
LCD_CtrlWrite_ILI9320(0x0037, 0x0406);  
LCD_CtrlWrite_ILI9320(0x0038, 0x0006);  
LCD_CtrlWrite_ILI9320(0x0039, 0x0404);  
LCD_CtrlWrite_ILI9320(0x003C, 0x0700);  
LCD_CtrlWrite_ILI9320(0x003D,0x0A08);  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 13 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
13543266942 13642365547  
//------------------ Set GRAM area ---------------//  
LCD_CtrlWrite_ILI9320(0x0050, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0051, 0x00EF);  
LCD_CtrlWrite_ILI9320(0x0052, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0053,0x013F);  
// Horizontal GRAM Start Address  
// Horizontal GRAM End Address  
// Vertical GRAM Start Address  
// Vertical GRAM Start Address  
LCD_CtrlWrite_ILI9320(0x0060,0x2700);  
LCD_CtrlWrite_ILI9320(0x0061,0x0001);  
LCD_CtrlWrite_ILI9320(0x006A,0x0000);  
// Gate Scan Line  
// NDL,VLE, REV  
// set scrolling line  
//-------------- Partial Display Control ---------//  
LCD_CtrlWrite_ILI9320(0x0080, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0081, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0082, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0083, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0084, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0085,0x0000);  
//-------------- Panel Control -------------------//  
LCD_CtrlWrite_ILI9320(0x0090, 0x0010);  
LCD_CtrlWrite_ILI9320(0x0092, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0093, 0x0003);  
LCD_CtrlWrite_ILI9320(0x0095, 0x0110);  
LCD_CtrlWrite_ILI9320(0x0097, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0098,0x0000);  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
// 262K color and display ON  
}
void LCD_ExitSleep_ILI9320(void)  
{
//*************Power On sequence ******************//  
LCD_CtrlWrite_ILI9320(0x0010,0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// R11h=0x0031 at VCI=3.3V DC1[2:0], DC0[2:0], VC[2:0]  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0010, 0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011,0x0037);  
delayms(50);  
LCD_CtrlWrite_ILI9320(0x0012, 0x013B);  
delayms(50);  
// R12h=0x0138 at VCI=3.3V VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013, 0x1900);  
LCD_CtrlWrite_ILI9320(0x0029, 0x0007);  
delayms(50);  
// R13h=0x1800 at VCI=3.3V VDV[4:0] for VCOM amplitude  
// R29h=0x0008 at VCI=3.3V VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
}
// 262K color and display ON  
void LCD_EnterSleep_ILI9320(void)  
{
// display OFF  
LCD_CtrlWrite_ILI9320(0x0007,0x0000);  
//************* Power OFF sequence **************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
LCD_CtrlWrite_ILI9320(0x0010,0x0002);  
}
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 14 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
13543266942 13642365547  
1.3.2. CMO 2.8initial code  
void ILI9320_CMO28_Initial(void)  
{
// VCI=2.8V  
//************* Reset LCD Driver ****************//  
LCD_nRESET = 1;  
// Delay 1ms  
// Delay 10ms  
// Delay 50 ms  
delayms(1)  
;
LCD_nRESET = 0;  
delayms(10);  
// This delay is necessary  
LCD_nRESET = 1;  
delayms(50)  
;
//************* Start Initial Sequence **********//  
LCD_CtrlWrite_ILI9320(0x00E5,0x8000);  
LCD_CtrlWrite_ILI9320(0x0000, 0x0001);  
LCD_CtrlWrite_ILI9320(0x0001, 0x0100);  
LCD_CtrlWrite_ILI9320(0x0002, 0x0700);  
LCD_CtrlWrite_ILI9320(0x0003, 0x0030);  
LCD_CtrlWrite_ILI9320(0x0004,0x0000);  
// Set the Vcore voltage and this setting is must.  
// Start internal OSC.  
// set SS and SM bit  
// set 1 line inversion  
// set GRAM write direction and BGR=0.  
// Resize register  
LCD_CtrlWrite_ILI9320(0x0008,0x0202);  
LCD_CtrlWrite_ILI9320(0x0009, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000A, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000C, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000D, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000F, 0x0000);  
// set the back porch and front porch  
// set non-display area refresh cycle ISC[3:0]  
// FMARK function  
// RGB interface setting  
// Frame marker Position  
// RGB interface polarity  
//*************Power On sequence ****************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0007);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013,0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0010,0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011,0x0037);  
delayms(50);  
LCD_CtrlWrite_ILI9320(0x0012,0x013E);  
delayms(50);  
// VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013,0x1C00);  
LCD_CtrlWrite_ILI9320(0x0029,0x000C);  
delayms(50);  
// VDV[4:0] for VCOM amplitude  
// VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0020,0x0000);  
LCD_CtrlWrite_ILI9320(0x0021,0x0000);  
// GRAM horizontal Address  
// GRAM Vertical Address  
// ----------- Adjust the Gamma Curve ----------//  
LCD_CtrlWrite_ILI9320(0x0030, 0x0007);  
LCD_CtrlWrite_ILI9320(0x0031, 0x0403);  
LCD_CtrlWrite_ILI9320(0x0032, 0x0404);  
LCD_CtrlWrite_ILI9320(0x0035, 0x0002);  
LCD_CtrlWrite_ILI9320(0x0036, 0x0707);  
LCD_CtrlWrite_ILI9320(0x0037, 0x0606);  
LCD_CtrlWrite_ILI9320(0x0038, 0x0106);  
LCD_CtrlWrite_ILI9320(0x0039, 0x0007);  
LCD_CtrlWrite_ILI9320(0x003C, 0x0700);  
LCD_CtrlWrite_ILI9320(0x003D,0x0707);  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 15 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网站www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
//------------------ Set GRAM area ---------------//  
LCD_CtrlWrite_ILI9320(0x0050, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0051, 0x00EF);  
LCD_CtrlWrite_ILI9320(0x0052, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0053,0x013F);  
// Horizontal GRAM Start Address  
// Horizontal GRAM End Address  
// Vertical GRAM Start Address  
// Vertical GRAM Start Address  
LCD_CtrlWrite_ILI9320(0x0060,0x2700);  
LCD_CtrlWrite_ILI9320(0x0061,0x0001);  
LCD_CtrlWrite_ILI9320(0x006A,0x0000);  
// Gate Scan Line  
// NDL,VLE, REV  
// set scrolling line  
//-------------- Partial Display Control ---------//  
LCD_CtrlWrite_ILI9320(0x0080, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0081, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0082, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0083, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0084, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0085,0x0000);  
//-------------- Panel Control -------------------//  
LCD_CtrlWrite_ILI9320(0x0090, 0x0010);  
LCD_CtrlWrite_ILI9320(0x0092, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0093, 0x0003);  
LCD_CtrlWrite_ILI9320(0x0095, 0x0110);  
LCD_CtrlWrite_ILI9320(0x0097, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0098, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0007,0x0173);  
// 262K color and display ON  
}
void LCD_ExitSleep_ILI9320(void)  
{
//*************Power On sequence ******************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011,0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0010, 0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011,0x0037);  
delayms(50);  
LCD_CtrlWrite_ILI9320(0x0012, 0x013E);  
delayms(50);  
// VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013, 0x1E00);  
LCD_CtrlWrite_ILI9320(0x0029, 0x000C);  
delayms(50);  
// VDV[4:0] for VCOM amplitude  
// VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
}
// 262K color and display ON  
void LCD_EnterSleep_ILI9320(void)  
{
// display OFF  
LCD_CtrlWrite_ILI9320(0x0007,0x0000);  
//************* Power OFF sequence **************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
LCD_CtrlWrite_ILI9320(0x0010,0x0002);  
}
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 16 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
13543266942 13642365547  
1.4. LPL2.2& LPL 2.4Panel  
ILI9320 for LPL QVGA Panel  
U1  
ILI9320 f or LPL Panel  
T1  
ALL the VCOM pins  
ed  
must be short  
together.  
When the RGB interface is not  
used, the HSYNC, VSYNC, DOTCLK,  
and ENABLE are shorted to GND.  
ALL the VCOM pins  
must be shorted  
together.  
D 1  
M3 M2 M1 M0  
Interface Selection  
i80-18bit interface  
1
0
1
0
1
0
1
1
i80-9bit interface  
0
0
0
0
1
1
0
1
i80-16bit interface  
i80-8bit interface  
0
1
0
ID  
SPI interface  
TP1  
VGH  
TP2  
VGL  
TP3  
TP4  
TP5  
TP6  
VCOM  
VCOMH  
VCOML  
VR EG1OUT  
TP7  
TP8  
TP9  
TP10  
TP11  
VCL  
TP12  
FMARK  
TP13  
GND  
VCC  
VCI  
VCI  
1
VD D  
J1  
J2  
CON 40  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 17 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
1.4.1. LPL 2.2initial code  
void ILI9320_LPL22_Initial(void)  
{
// VCI=2.8V  
//************* Reset LCD Driver ****************//  
LCD_nRESET = 1;  
delayms(1); // Delay 1ms  
LCD_nRESET = 0;  
delayms(10); // Delay 10ms  
LCD_nRESET = 1;  
delayms(50); // Delay 50 ms  
//************* Start Initial Sequence **********//  
LCD_CtrlWrite_ILI9320(0x00E5, 0x8000);  
LCD_CtrlWrite_ILI9320(0x0000, 0x0001);  
LCD_CtrlWrite_ILI9320(0x0001, 0x0100);  
LCD_CtrlWrite_ILI9320(0x0002, 0x0700);  
LCD_CtrlWrite_ILI9320(0x0003, 0x1030);  
LCD_CtrlWrite_ILI9320(0x0004, 0x0000);  
// Set the internal vcore voltage  
// Start internal OSC.  
// set SS and SM bit  
// set 1 line inversion  
// set GRAM write direction and BGR=1.  
// Resize register  
LCD_CtrlWrite_ILI9320(0x0008, 0x0202);  
LCD_CtrlWrite_ILI9320(0x0009, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000A, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000C, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000D, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000F, 0x0000);  
// set the back porch and front porch  
// set non-display area refresh cycle ISC[3:0]  
// FMARK function  
// RGB interface setting  
// Frame marker Position  
// RGB interface polarity  
//*************Power On sequence ****************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0007);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
LCD_CtrlWrite_ILI9320(0x0010, 0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0137);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
delayms(50);  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0012, 0x013B);  
// VREG1OUT voltage  
delayms(50);  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013, 0x0E00);  
LCD_CtrlWrite_ILI9320(0x0029, 0x000F);  
delayms(50);  
// VDV[4:0] for VCOM amplitude  
// VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0020, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0021, 0x0000);  
// GRAM horizontal Address  
// GRAM Vertical Address  
// ----------- Adjust the Gamma Curve ----------//  
LCD_CtrlWrite_ILI9320(0x0030, 0x0307);  
LCD_CtrlWrite_ILI9320(0x0031, 0x0507);  
LCD_CtrlWrite_ILI9320(0x0032, 0x0500);  
LCD_CtrlWrite_ILI9320(0x0035, 0x0304);  
LCD_CtrlWrite_ILI9320(0x0036, 0x0007);  
LCD_CtrlWrite_ILI9320(0x0037, 0x0707);  
LCD_CtrlWrite_ILI9320(0x0038, 0x0007);  
LCD_CtrlWrite_ILI9320(0x0039, 0x0007);  
LCD_CtrlWrite_ILI9320(0x003C, 0x0600);  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 18 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
13543266942 13642365547  
LCD_CtrlWrite_ILI9320(0x003D, 0x0700);  
//------------------ Set GRAM area ---------------//  
LCD_CtrlWrite_ILI9320(0x0050, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0051, 0x00EF);  
LCD_CtrlWrite_ILI9320(0x0052, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0053, 0x013F);  
// Horizontal GRAM Start Address  
// Horizontal GRAM End Address  
// Vertical GRAM Start Address  
// Vertical GRAM Start Address  
LCD_CtrlWrite_ILI9320(0x0060, 0x2700);  
LCD_CtrlWrite_ILI9320(0x0061, 0x0001);  
LCD_CtrlWrite_ILI9320(0x006A, 0x0000);  
// Gate Scan Line  
// NDL,VLE, REV  
// set scrolling line  
//-------------- Partial Display Control ---------//  
LCD_CtrlWrite_ILI9320(0x0080, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0081, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0082, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0083, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0084, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0085, 0x0000);  
//-------------- Panel Control -------------------//  
LCD_CtrlWrite_ILI9320(0x0090, 0x0010);  
LCD_CtrlWrite_ILI9320(0x0092, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0093, 0x0003);  
LCD_CtrlWrite_ILI9320(0x0095, 0x0110);  
LCD_CtrlWrite_ILI9320(0x0097, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0098, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
// 262K color and display ON  
}
void LCD_ExitSleep_ILI9320(void)  
{
//*************Power On sequence ******************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
LCD_CtrlWrite_ILI9320(0x0010, 0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0137);  
delayms(50);  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0012, 0x013B);  
delayms(50);  
// VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013, 0x0E00);  
LCD_CtrlWrite_ILI9320(0x0029, 0x000F);  
delayms(50);  
// VDV[4:0] for VCOM amplitude  
// VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
// 262K color and display ON  
}
void LCD_EnterSleep_ILI9320(void)  
{
LCD_CtrlWrite_ILI9320(0x0007, 0x0000);  
// display OFF  
//************* Power OFF sequence **************//  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 19 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
LCD_CtrlWrite_ILI9320(0x0010, 0x0002);  
}
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 20 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
1.4.2. LPL 2.4initial code  
void ILI9320_LPL24_Initial(void)  
{
// VCI=2.8V  
//************* Reset LCD Driver ****************//  
LCD_nRESET = 1;  
delayms(1); // Delay 1ms  
LCD_nRESET = 0;  
delayms(10); // Delay 10ms  
LCD_nRESET = 1;  
delayms(50); // Delay 50 ms  
//************* Start Initial Sequence **********//  
LCD_CtrlWrite_ILI9320(0x00E5, 0x8000); // Set the internal vcore voltage  
// Start internal OSC.  
LCD_CtrlWrite_ILI9320(0x0000, 0x0001);  
LCD_CtrlWrite_ILI9320(0x0001, 0x0100);  
LCD_CtrlWrite_ILI9320(0x0002, 0x0700);  
LCD_CtrlWrite_ILI9320(0x0003, 0x1030);  
LCD_CtrlWrite_ILI9320(0x0004, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0008, 0x0202);  
LCD_CtrlWrite_ILI9320(0x0009, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000A, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000C, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000D, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000F, 0x0000);  
// set SS and SM bit  
// set 1 line inversion  
// set GRAM write direction and BGR=1.  
// Resize register  
// set the back porch and front porch  
// set non-display area refresh cycle ISC[3:0]  
// FMARK function  
// RGB interface setting  
// Frame marker Position  
// RGB interface polarity  
//*************Power On sequence ****************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0007);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
delayms(200); // Dis-charge capacitor power voltage  
LCD_CtrlWrite_ILI9320(0x0010, 0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0137);  
delayms(50); // Delay 50ms  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
LCD_CtrlWrite_ILI9320(0x0012, 0x013C);  
delayms(50); // Delay 50ms  
// VDV[4:0] for VCOM amplitude  
// VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0013, 0x1600);  
LCD_CtrlWrite_ILI9320(0x0029, 0x0007);  
delayms(50);  
LCD_CtrlWrite_ILI9320(0x0020, 0x0000);  
// GRAM horizontal Address  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 21 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn  
EMAIL yangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
LCD_CtrlWrite_ILI9320(0x0021, 0x0000); // GRAM Vertical Address  
// ----------- Adjust the Gamma Curve ----------//  
LCD_CtrlWrite_ILI9320(0x0030, 0x0007);  
LCD_CtrlWrite_ILI9320(0x0031, 0x0403);  
LCD_CtrlWrite_ILI9320(0x0032, 0x0400);  
LCD_CtrlWrite_ILI9320(0x0035, 0x0003);  
LCD_CtrlWrite_ILI9320(0x0036, 0x0007);  
LCD_CtrlWrite_ILI9320(0x0037, 0x0606);  
LCD_CtrlWrite_ILI9320(0x0038, 0x0106);  
LCD_CtrlWrite_ILI9320(0x0039, 0x0007);  
LCD_CtrlWrite_ILI9320(0x003C, 0x0700);  
LCD_CtrlWrite_ILI9320(0x003D, 0x0700);  
//------------------ Set GRAM area ---------------//  
LCD_CtrlWrite_ILI9320(0x0050, 0x0000); // Horizontal GRAM Start Address  
LCD_CtrlWrite_ILI9320(0x0051, 0x00EF); // Horizontal GRAM End Address  
LCD_CtrlWrite_ILI9320(0x0052, 0x0000); // Vertical GRAM Start Address  
LCD_CtrlWrite_ILI9320(0x0053, 0x013F); // Vertical GRAM Start Address  
LCD_CtrlWrite_ILI9320(0x0060, 0x2700); // Gate Scan Line  
LCD_CtrlWrite_ILI9320(0x0061, 0x0001); // NDL,VLE, REV  
LCD_CtrlWrite_ILI9320(0x006A, 0x0000); // set scrolling line  
//-------------- Partial Display Control ---------//  
LCD_CtrlWrite_ILI9320(0x0080, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0081, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0082, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0083, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0084, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0085, 0x0000);  
//-------------- Panel Control -------------------//  
LCD_CtrlWrite_ILI9320(0x0090, 0x0010);  
LCD_CtrlWrite_ILI9320(0x0092, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0093, 0x0003);  
LCD_CtrlWrite_ILI9320(0x0095, 0x0110);  
LCD_CtrlWrite_ILI9320(0x0097, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0098, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173); // 262K color and display ON  
}
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 22 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
void LCD_ExitSleep_ILI9320(void)  
{
//*************Power On sequence ******************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000); // SAP, BT[3:0], AP, DSTB, SLP  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000); // DC1[2:0], DC0[2:0], VC[2:0]  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000); // VREG1OUT voltage  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000); // VDV[4:0] for VCOM amplitude  
delayms(200); // Dis-charge capacitor power voltage  
LCD_CtrlWrite_ILI9320(0x0010, 0x17B0); // SAP, BT[3:0], AP, DSTB, SLP, STB  
LCD_CtrlWrite_ILI9320(0x0011, 0x0137); // DC1[2:0], DC0[2:0], VC[2:0]  
delayms(50); // Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0012, 0x013C); // VREG1OUT voltage  
delayms(50); // Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013, 0x1600); //VDV[4:0] for VCOM amplitude  
LCD_CtrlWrite_ILI9320(0x0029, 0x0000); //VCM[4:0] for VCOMH  
delayms(50);  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173); // 262K color and display ON  
}
void LCD_EnterSleep_ILI9320(void)  
{
LCD_CtrlWrite_ILI9320(0x0007, 0x0000); // display OFF  
//************* Power OFF sequence **************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000); // SAP, BT[3:0], APE, AP, DSTB, SLP  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000); // DC1[2:0], DC0[2:0], VC[2:0]  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000); // VREG1OUT voltage  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000); // VDV[4:0] for VCOM amplitude  
delayms(200); // Dis-charge capacitor power voltage  
LCD_CtrlWrite_ILI9320(0x0010, 0x0002); // SAP, BT[3:0], APE, AP, DSTB, SLP  
}
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 23 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
1.5. Hannstar 2.4Panel  
U1  
HSD 2. 4" QVGA f or ILI9320  
D1  
C6  
C7  
0
C11 C1  
C4  
C5  
2
C13  
C1  
C9  
C8  
1uF/6V  
1uF/ 6V  
All VCOM pins must be  
1uF/6V  
gether.  
shorted to  
IM3  
0
IM0  
0
Interface  
16-bit i80-interface  
VCI  
1
0
1
1
8-bit i80-interface  
0
1
18-bit i80-interface  
9-bit i80-interface  
When the RGB interface is used to transfer  
the display data, the SPI interface is  
necessary for the registers setting.  
LED B/ L1  
Note:  
1. When the RGB interface is not used, please shorted the VSYNC, HSYNC, DOTCLK  
and ENABLE to GND.  
2. When the SPI interface is not used, the SDI is shorted to GND and let SDO as open.  
3. The Schottky barrier diode shall be added for VGL pin.  
4. If the voltage of interface is 1.8V, the IOVCC is connected to 1.8V and the  
VCC/VCI connect to 2.8V.  
TP1  
TP2  
TP3  
TP4  
TP5  
TP6  
TP7  
VCL  
TP8  
CPUInterface  
VCOM  
VGH  
VGL  
DDVDH  
VCI1  
VREG1OUT  
FMARK  
J1  
Hannstar 3.2Panel  
ILI9320 for HSD QVGA 3.2" Panel  
U1  
HSD 3.2" QVGA  
f or ILI 9320  
C 6  
C 7  
ALL the VCOM pins  
must be shorted  
together.  
D1  
On the default setting, the  
internal resistor is used  
OM pins  
V
ALL the  
must be sorted  
together.  
for the OSC and external  
resistor can be removed.  
ALL the VGL pins  
must be shorted  
together.  
M3 M2 M1 M0  
Interface Selection  
i80-18bit interface  
1
1
0
0
1
1
0
1
i80-9bit interface  
i80-16bit interface  
i80-8bit interface  
SPI interface  
0
0
0
1
1
1
0
0
1
ID  
0
0
TP1  
VGH  
TP2  
VGL  
TP5  
TP3  
TP4  
TP6  
VCOMH  
V C OML  
VCOM  
VREG1OUT  
TP11  
VCL  
TP7  
TP8  
TP9  
TP10  
TP12  
FMARK  
TP13  
GND  
VCC  
VCI  
VCI  
1
VD D  
J1  
J2  
CON40  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 24 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
HSD 2.4initial code  
void ILI9320_HSD24_Initial(void)  
{
// VCI=2.8V  
//************* Reset LCD Driver ****************//  
LCD_nRESET = 1;  
delayms(1); // Delay 1ms  
LCD_nRESET = 0;  
// This delay time is necessary  
delayms(10); // Delay 10ms  
LCD_nRESET = 1;  
delayms(50); // Delay 50 ms  
//************* Start Initial Sequence **********//  
LCD_CtrlWrite_ILI9320(0x00E5,0x8000);  
LCD_CtrlWrite_ILI9320(0x0000, 0x0001);  
LCD_CtrlWrite_ILI9320(0x0001, 0x0100);  
LCD_CtrlWrite_ILI9320(0x0002, 0x0700);  
LCD_CtrlWrite_ILI9320(0x0003, 0x1030);  
LCD_CtrlWrite_ILI9320(0x0004,0x0000);  
// Set the internal vcore voltage  
// Start internal OSC.  
// set SS and SM bit  
// set 1 line inversion  
// set GRAM write direction and BGR=1.  
// Resize register  
LCD_CtrlWrite_ILI9320(0x0008,0x0202);  
LCD_CtrlWrite_ILI9320(0x0009, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000A, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000C, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000D, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000F, 0x0000);  
// set the back porch and front porch  
// set non-display area refresh cycle ISC[3:0]  
// FMARK function  
// RGB interface setting  
// Frame marker Position  
// RGB interface polarity  
//*************Power On sequence ****************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013,0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
LCD_CtrlWrite_ILI9320(0x0010,0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011,0x0037);  
delayms(50);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0012,0x013A);  
delayms(50);  
// VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013,0x1C00);  
LCD_CtrlWrite_ILI9320(0x0029,0x000A);  
delayms(50);  
// VDV[4:0] for VCOM amplitude  
// VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0020,0x0000);  
LCD_CtrlWrite_ILI9320(0x0021,0x0000);  
// GRAM horizontal Address  
// GRAM Vertical Address  
// ----------- Adjust the Gamma Curve ----------//  
LCD_CtrlWrite_ILI9320(0x0030, 0x0007);  
LCD_CtrlWrite_ILI9320(0x0031, 0x0203);  
LCD_CtrlWrite_ILI9320(0x0032,0x0001);  
LCD_CtrlWrite_ILI9320(0x0035,0x0007);  
LCD_CtrlWrite_ILI9320(0x0036, 0x0407);  
LCD_CtrlWrite_ILI9320(0x0037, 0x0607);  
LCD_CtrlWrite_ILI9320(0x0038, 0x0106);  
LCD_CtrlWrite_ILI9320(0x0039,0x0007);  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 25 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
LCD_CtrlWrite_ILI9320(0x003C,0x0007);  
LCD_CtrlWrite_ILI9320(0x003D,0x001E);  
//------------------ Set GRAM area ---------------//  
LCD_CtrlWrite_ILI9320(0x0050, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0051, 0x00EF);  
LCD_CtrlWrite_ILI9320(0x0052, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0053,0x013F);  
// Horizontal GRAM Start Address  
// Horizontal GRAM End Address  
// Vertical GRAM Start Address  
// Vertical GRAM Start Address  
LCD_CtrlWrite_ILI9320(0x0060,0x2700);  
LCD_CtrlWrite_ILI9320(0x0061,0x0001);  
LCD_CtrlWrite_ILI9320(0x006A,0x0000);  
// Gate Scan Line  
// NDL,VLE, REV  
// set scrolling line  
//-------------- Partial Display Control ---------//  
LCD_CtrlWrite_ILI9320(0x0080, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0081, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0082, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0083, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0084, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0085,0x0000);  
//-------------- Panel Control -------------------//  
LCD_CtrlWrite_ILI9320(0x0090, 0x0010);  
LCD_CtrlWrite_ILI9320(0x0092, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0093, 0x0003);  
LCD_CtrlWrite_ILI9320(0x0095, 0x0110);  
LCD_CtrlWrite_ILI9320(0x0097, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0098,0x0000);  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
// 262K color and display ON  
}
void LCD_ExitSleep_ILI9320(void)  
{
//*************Power On sequence ******************//  
LCD_CtrlWrite_ILI9320(0x0010,0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// R11h=0x0031 at VCI=3.3V DC1[2:0], DC0[2:0], VC[2:0]  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0010, 0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011,0x0037);  
delayms(50);  
LCD_CtrlWrite_ILI9320(0x0012, 0x013A);  
delayms(50);  
// R12h=0x0138 at VCI=3.3V VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013, 0x1C00);  
LCD_CtrlWrite_ILI9320(0x0029, 0x000A);  
delayms(50);  
// R13h=0x1800 at VCI=3.3V VDV[4:0] for VCOM amplitude  
// R29h=0x0008 at VCI=3.3V VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
}
// 262K color and display ON  
void LCD_EnterSleep_ILI9320(void)  
{
// display OFF  
LCD_CtrlWrite_ILI9320(0x0007,0x0000);  
//************* Power OFF sequence **************//  
LCD_CtrlWrite_ILI9320(0x0010,0x0000);  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 26 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
LCD_CtrlWrite_ILI9320(0x0011,0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
LCD_CtrlWrite_ILI9320(0x0010,0x0002);  
}
HSD 3.2initial code  
void ILI9320_HSD32_Initial(void)  
{
// VCI=2.8V  
//************* Reset LCD Driver ****************//  
LCD_nRESET = 1;  
delayms(1); // Delay 1ms  
LCD_nRESET = 0;  
// This delay time is necessary  
delayms(10); // Delay 10ms  
LCD_nRESET = 1;  
delayms(50); // Delay 50 ms  
//************* Start Initial Sequence **********//  
LCD_CtrlWrite_ILI9320(0x00E5,0x8000);  
LCD_CtrlWrite_ILI9320(0x0000, 0x0001);  
LCD_CtrlWrite_ILI9320(0x0001, 0x0100);  
LCD_CtrlWrite_ILI9320(0x0002, 0x0700);  
LCD_CtrlWrite_ILI9320(0x0003, 0x1030);  
LCD_CtrlWrite_ILI9320(0x0004,0x0000);  
// Set the internal vcore voltage  
// Start internal OSC.  
// set SS and SM bit  
// set 1 line inversion  
// set GRAM write direction and BGR=1.  
// Resize register  
LCD_CtrlWrite_ILI9320(0x0008,0x0202);  
LCD_CtrlWrite_ILI9320(0x0009, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000A, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000C, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000D, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000F, 0x0000);  
// set the back porch and front porch  
// set non-display area refresh cycle ISC[3:0]  
// FMARK function  
// RGB interface setting  
// Frame marker Position  
// RGB interface polarity  
//*************Power On sequence ****************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013,0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
LCD_CtrlWrite_ILI9320(0x0010,0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011,0x0037);  
delayms(50);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0012,0x013B);  
delayms(50);  
// VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013,0x1800);  
LCD_CtrlWrite_ILI9320(0x0029,0x000F);  
delayms(50);  
// VDV[4:0] for VCOM amplitude  
// VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0020,0x0000);  
LCD_CtrlWrite_ILI9320(0x0021,0x0000);  
// GRAM horizontal Address  
// GRAM Vertical Address  
// ----------- Adjust the Gamma Curve ----------//  
LCD_CtrlWrite_ILI9320(0x0030,0x0000);  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 27 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
LCD_CtrlWrite_ILI9320(0x0031,0x0007);  
LCD_CtrlWrite_ILI9320(0x0032,0x0103);  
LCD_CtrlWrite_ILI9320(0x0035,0x0407);  
LCD_CtrlWrite_ILI9320(0x0036, 0x090F);  
LCD_CtrlWrite_ILI9320(0x0037, 0x0404);  
LCD_CtrlWrite_ILI9320(0x0038, 0x0400);  
LCD_CtrlWrite_ILI9320(0x0039,0x0404);  
LCD_CtrlWrite_ILI9320(0x003C,0x0000);  
LCD_CtrlWrite_ILI9320(0x003D,0x0400);  
//------------------ Set GRAM area ---------------//  
LCD_CtrlWrite_ILI9320(0x0050, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0051, 0x00EF);  
LCD_CtrlWrite_ILI9320(0x0052, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0053,0x013F);  
// Horizontal GRAM Start Address  
// Horizontal GRAM End Address  
// Vertical GRAM Start Address  
// Vertical GRAM Start Address  
LCD_CtrlWrite_ILI9320(0x0060,0x2700);  
LCD_CtrlWrite_ILI9320(0x0061,0x0001);  
LCD_CtrlWrite_ILI9320(0x006A,0x0000);  
// Gate Scan Line  
// NDL,VLE, REV  
// set scrolling line  
//-------------- Partial Display Control ---------//  
LCD_CtrlWrite_ILI9320(0x0080, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0081, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0082, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0083, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0084, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0085,0x0000);  
//-------------- Panel Control -------------------//  
LCD_CtrlWrite_ILI9320(0x0090, 0x0010);  
LCD_CtrlWrite_ILI9320(0x0092, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0093, 0x0003);  
LCD_CtrlWrite_ILI9320(0x0095, 0x0110);  
LCD_CtrlWrite_ILI9320(0x0097, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0098,0x0000);  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
// 262K color and display ON  
}
void LCD_ExitSleep_ILI9320(void)  
{
//*************Power On sequence ******************//  
LCD_CtrlWrite_ILI9320(0x0010,0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0010, 0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011,0x0037);  
delayms(50);  
LCD_CtrlWrite_ILI9320(0x0012, 0x013B);  
delayms(50);  
// VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013, 0x1800);  
LCD_CtrlWrite_ILI9320(0x0029, 0x000F);  
delayms(50);  
// VDV[4:0] for VCOM amplitude  
// VCM[4:0] for VCOMH  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 28 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
// 262K color and display ON  
}
void LCD_EnterSleep_ILI9320(void)  
{
// display OFF  
LCD_CtrlWrite_ILI9320(0x0007,0x0000);  
//************* Power OFF sequence **************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
LCD_CtrlWrite_ILI9320(0x0010,0x0002);  
}
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 29 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
1.6. AUO 2.6& 2.8Panel  
U1  
ILI9320_AUO2.6&2.8  
0
C1  
C12  
D1  
C
C2  
C6  
C7  
C8  
3
C9  
C11  
C13  
C1  
C4  
C4  
C5  
C14  
C15  
IM3  
0
IM0  
0
Interface  
16-bit i80-interface  
0
1
1
1
8-bit i80-interface  
0
1
18-bit i80-interface  
9-bit i80-interface  
When the RGB interface is used to transfer  
the display data, the SPI interface is  
necessary for the registers setting.  
LED B/L1  
Note:  
1. When the RGB interface is not used, please shorted the VSYNC, HSYNC, DOTCLK  
and ENABLE to IOVCC or GND.  
2. When the SPI interface is not used, the SDI is shorted to IOVCC or GND, and  
let SDO as open.  
3. The Schottky barrier diode shall be added for VGL and VGH pins.  
4. If the voltage of interface is 1.8V, the IOVCC is connected to 1.8V and the  
VCC/VCI can be shorted together.  
TP1  
TP2  
TP3  
VGL  
TP4  
TP5  
TP6  
TP7  
VCL  
TP8  
CPU Interface  
VCOM  
VGH  
DDVDH  
VCI1  
VR EG1OUT  
FMAR K  
J1  
AUO 2.4Panel  
U1  
ILI9320_AUO2.4  
0
C1  
C12  
D1  
C
3
C6  
C7  
C8  
C11  
C13  
C1 C2  
C
C4  
C5  
C14  
C15  
IM3  
0
IM0  
0
Interface  
16-bit i80-interface  
1
8-bit i80-interface  
0
1
0
1
18-bit i80-interface  
9-bit i80-interface  
1
When the RGB interface is used to transfer  
the display data, the SPI interface is  
necessary for the registers setting.  
LED B/L1  
Note:  
1. When the RGB interface is not used, please shorted the VSYNC, HSYNC, DOTCLK  
and ENABLE to IOVCC or GND.  
2. When the SPI interface is not used, the SDI is shorted to IOVCC or GND, and  
let SDO as open.  
3. The Schottky barrier diode shall be added for VGL and VGH pins.  
4. If the voltage of interface is 1.8V, the IOVCC is connected to 1.8V and the  
VCC/VCI can be shorted together.  
TP1  
TP2  
TP3  
VGL  
TP4  
TP5  
TP6  
TP7  
VCL  
TP8  
CPU Interface  
VCOM  
VGH  
DDVDH  
VCI1  
VR EG1OUT  
FMAR K  
J1  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 30 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
1.7. PVI2.22.8Panel  
ILI9320_PVI 2.  
2
R1  
120  
Note:  
1. When the RGB interface is not used, please shorted the VSYNC, HSYNC, DOTCLK  
and ENABLE to IOVCC or GND.  
2. When the SPI interface is not used, the SDI is shorted to IOVCC or GND, and  
let SDO as open.  
3. The Schottky barrier diode shall be added for VGL and VGH pins.  
4. If the voltage of interface is 1.8V, the IOVCC is connected to 1.8V and the  
VCC/VCI can be shorted together.  
TP1  
TP2  
VGH  
TP3  
TP4  
TP5  
VCI  
TP6  
TP7  
VCL  
TP8  
VCOM  
VGL  
DDVDH  
1
VREG1OUT  
FM AR K  
J4  
Connector 36  
PVI2.4Panel  
U1  
PVI 2.4" QVGA for ILI9320  
R1  
120K  
C12  
C13  
C14  
C15  
C8  
C9  
D1  
C1  
C2  
C3 C4  
C5  
C6  
C7  
1uF/6V  
1uF/6V  
1uF/6V  
1uF/6V 1uF/6V 1uF/6V  
All VCOM pins must  
shorted together.  
be  
IM3  
0
IM0  
0
Interface  
16-bit i80-interface  
1
0
1
1
8-bit i80-interface  
0
1
18-bit i80-interface  
9-bit i80-interface  
When the RGB interface is used to transfer  
the display data, the SPI interface is  
necessary for the registers setting.  
LED B/L1  
Note:  
1. When the RGB interface is not used, please shorted the VSYNC, HSYNC, DOTCLK  
and ENABLE to GND.  
2. When the SPI interface is not used, the SDI is shorted to GND and let SDO as open.  
3. The Schottky barrier diode shall be added for VGL pin.  
4. If the voltage of interface is 1.8V, the IOVCC is connected to 1.8V and the  
VCC/VCI connect  
to 2.8V.  
TP1  
TP2  
VGH  
TP3  
TP4  
TP5  
TP6  
TP7  
TP8  
CPU Interface  
VCOM  
VGL  
DDVDH  
VCI1  
VREG1OUT  
VCL  
FMARK  
J1  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 31 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网站www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
1.7.1 PVI 2.8initial code  
void ILI9320_PVI28_Initial(void)  
{
// VCI=2.8V  
//************* Reset LCD Driver ****************//  
LCD_nRESET = 1;  
delayms(1); // Delay 1ms  
LCD_nRESET = 0;  
// This delay time is necessary  
delayms(10); // Delay 10ms  
LCD_nRESET = 1;  
delayms(50); // Delay 50 ms  
//************* Start Initial Sequence **********//  
LCD_CtrlWrite_ILI9320(0x00E5,0x8000);  
LCD_CtrlWrite_ILI9320(0x0000, 0x0001);  
LCD_CtrlWrite_ILI9320(0x0001, 0x0100);  
LCD_CtrlWrite_ILI9320(0x0002, 0x0700);  
LCD_CtrlWrite_ILI9320(0x0003, 0x1030);  
LCD_CtrlWrite_ILI9320(0x0004,0x0000);  
// Set the internal vcore voltage  
// Start internal OSC.  
// set SS and SM bit  
// set 1 line inversion  
// set GRAM write direction and BGR=1.  
// Resize register  
LCD_CtrlWrite_ILI9320(0x0008,0x0202);  
LCD_CtrlWrite_ILI9320(0x0009, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000A, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000C, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000D, 0x0000);  
LCD_CtrlWrite_ILI9320(0x000F, 0x0000);  
// set the back porch and front porch  
// set non-display area refresh cycle ISC[3:0]  
// FMARK function  
// RGB interface setting  
// Frame marker Position  
// RGB interface polarity  
//*************Power On sequence ****************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013,0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
LCD_CtrlWrite_ILI9320(0x0010,0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011,0x0037);  
delayms(50);  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// DC1[2:0], DC0[2:0], VC[2:0]  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0012,0x0138);  
delayms(50);  
// VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013,0x1700);  
LCD_CtrlWrite_ILI9320(0x0029,0x000D);  
delayms(50);  
// VDV[4:0] for VCOM amplitude  
// VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0020,0x0000);  
LCD_CtrlWrite_ILI9320(0x0021,0x0000);  
// GRAM horizontal Address  
// GRAM Vertical Address  
// ----------- Adjust the Gamma Curve ----------//  
LCD_CtrlWrite_ILI9320(0x0030, 0x0001);  
LCD_CtrlWrite_ILI9320(0x0031, 0x0606);  
LCD_CtrlWrite_ILI9320(0x0032, 0x0304);  
LCD_CtrlWrite_ILI9320(0x0035, 0x0103);  
LCD_CtrlWrite_ILI9320(0x0036, 0x011D);  
LCD_CtrlWrite_ILI9320(0x0037, 0x0404);  
LCD_CtrlWrite_ILI9320(0x0038, 0x0404);  
LCD_CtrlWrite_ILI9320(0x0039, 0x0404);  
LCD_CtrlWrite_ILI9320(0x003C, 0x0700);  
LCD_CtrlWrite_ILI9320(0x003D,0x0A1F);  
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 32 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
//------------------ Set GRAM area ---------------//  
LCD_CtrlWrite_ILI9320(0x0050, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0051, 0x00EF);  
LCD_CtrlWrite_ILI9320(0x0052, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0053,0x013F);  
// Horizontal GRAM Start Address  
// Horizontal GRAM End Address  
// Vertical GRAM Start Address  
// Vertical GRAM Start Address  
LCD_CtrlWrite_ILI9320(0x0060,0x2700);  
LCD_CtrlWrite_ILI9320(0x0061,0x0001);  
LCD_CtrlWrite_ILI9320(0x006A,0x0000);  
// Gate Scan Line  
// NDL,VLE, REV  
// set scrolling line  
//-------------- Partial Display Control ---------//  
LCD_CtrlWrite_ILI9320(0x0080, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0081, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0082, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0083, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0084, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0085,0x0000);  
//-------------- Panel Control -------------------//  
LCD_CtrlWrite_ILI9320(0x0090, 0x0010);  
LCD_CtrlWrite_ILI9320(0x0092, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0093, 0x0003);  
LCD_CtrlWrite_ILI9320(0x0095, 0x0110);  
LCD_CtrlWrite_ILI9320(0x0097, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0098,0x0000);  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
// 262K color and display ON  
}
void LCD_ExitSleep_ILI9320(void)  
{
//*************Power On sequence ******************//  
LCD_CtrlWrite_ILI9320(0x0010,0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], AP, DSTB, SLP  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], AP, DSTB, SLP, STB  
// R11h=0x0031 at VCI=3.3V DC1[2:0], DC0[2:0], VC[2:0]  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0010, 0x17B0);  
LCD_CtrlWrite_ILI9320(0x0011,0x0037);  
delayms(50);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0138);  
delayms(50);  
// R12h=0x0138 at VCI=3.3V VREG1OUT voltage  
// Delay 50ms  
LCD_CtrlWrite_ILI9320(0x0013, 0x1700);  
LCD_CtrlWrite_ILI9320(0x0029, 0x000D);  
delayms(50);  
// R13h=0x1800 at VCI=3.3V VDV[4:0] for VCOM amplitude  
// R29h=0x0008 at VCI=3.3V VCM[4:0] for VCOMH  
LCD_CtrlWrite_ILI9320(0x0007, 0x0173);  
}
// 262K color and display ON  
void LCD_EnterSleep_ILI9320(void)  
{
// display OFF  
LCD_CtrlWrite_ILI9320(0x0007,0x0000);  
//************* Power OFF sequence **************//  
LCD_CtrlWrite_ILI9320(0x0010, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0011, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0012, 0x0000);  
LCD_CtrlWrite_ILI9320(0x0013, 0x0000);  
delayms(200);  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
// DC1[2:0], DC0[2:0], VC[2:0]  
// VREG1OUT voltage  
// VDV[4:0] for VCOM amplitude  
// Dis-charge capacitor power voltage  
// SAP, BT[3:0], APE, AP, DSTB, SLP  
LCD_CtrlWrite_ILI9320(0x0010,0x0002);  
}
圣邦达电子有限公司 电话 0755-83723989 81753210 传真 0755-61351350 www.sbdsemi.cn  
Page 33 of 34  
V0.9  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
网 站 www.sbdsemi.cn EMAILyangbin7575@163.com  
联系人:杨 生 13543266942 13642365547  
Revision History  
Revision History  
Version No.  
V0.1  
Date  
Page  
Description  
2006/11/22  
2006/11/28  
2007/01/02  
2007/1/5  
New  
V0.2  
Add the Hannstar FPC circuit  
Add CPT 2.8initial code  
V0.4  
V0.5  
Modify the Hannstar FPC circuit  
Add the Hannstar initial code  
V0.6  
2007/2/2  
V0.7  
2007/2/7  
Add the AUO FPC circuit  
V0.8  
2007/2/9  
ADD PVI FPC circuit  
V0.9  
2007/3/13  
2007/03/20  
2007/04/21  
ADD CPT 3.2panel FPC circuit and initial code  
ADD Hannstar 2.4 initial code  
ADD Hanstar 3.2 FPC and Initial code  
ADD PVI 2.4 FPC and PVI 2.8 Initial code  
ADD CMO 2.2 and 2.4 Initial code  
V0.91  
V0.92  
台湾 ILITEK(弈力)公司推出的此芯片 ILI9320,是一款 TFT 屏的驱动 IC  
该芯片可广泛适用与各类手机 LCM,MP3MP4 LCM 等产品。  
有在设计生产中使用到此芯片的各企业公司可来电来信联系咨询。  
深圳代理销售处:  
深圳市圣邦达电子有限公司  
电话:086-0755-83723989 传真:086-0755-61351350  
联系人:杨 生 13543266942 13642365547  
网址: www.sbdsemi.cn EMAIL:yangbin7575@163.com  
Page 34 of 34  
V0.9  

相关型号:

ILI9325

a-Si TFT LCD Single Chip Driver 240RGBx320 Resolution and 262K color
ETC

ILI95-MB-E3

Intelligent, Networked, Multi-Channel Fire Alarm Control and Emergency Voice Evacuation System
GAMEWELL-FCI

ILI95-S-E3

Intelligent, Networked, Multi-Channel Fire Alarm Control and Emergency Voice Evacuation System
GAMEWELL-FCI

ILKK-671342L-20:R

Dual-Port SRAM, 4KX8, 20ns, CMOS, CQFP48,
TEMIC

ILKK-671342L-20:RD

Dual-Port SRAM, 4KX8, 20ns, CMOS, CQFP48,
TEMIC

ILKK-671342L-25

Dual-Port SRAM, 4KX8, 25ns, CMOS, CQFP48,
TEMIC

ILKK-671342L-25:R

Dual-Port SRAM, 4KX8, 25ns, CMOS, CQFP48,
TEMIC

ILKK-671342L-25:RD

Dual-Port SRAM, 4KX8, 25ns, CMOS, CQFP48,
TEMIC

ILKK-671342L-25SHXXX

Dual-Port SRAM, 4KX8, 25ns, CMOS, CQFP48,
TEMIC

ILKK-671342L-25SHXXX:R

Dual-Port SRAM, 4KX8, 25ns, CMOS, CQFP48,
TEMIC

ILKK-671342L-25SHXXX:RD

Dual-Port SRAM, 4KX8, 25ns, CMOS, CQFP48,
TEMIC

ILKK-671342L-30SHXXX:D

Dual-Port SRAM, 4KX8, 30ns, CMOS, CQFP48,
TEMIC