ST75256初始化代码
2022-07-21 浏览次数:293次
HGO2401603产品初始化代码
/******** 杭州清达光电、杭州佳显科技 液晶屏初始化程序 ********/
void Init(){
#if I80==1
CONTROL1_OUTPUT_MODE(); //控制口1为输出
CONTROL2_OUTPUT_MODE(); //控制口2为输出
CONTROL3_OUTPUT_MODE(); //控制口3为输出
CONTROL4_OUTPUT_MODE(); //控制口4为输出
#endif
IF2_L;IF1_H;IF0_H;
delay(20);
REST_L;
delay(20);
REST_H;
delay(50);
/******************************
*** Extension Command 2
******************************/
write_com(0x31); // Extension Command 2
write_com(0xd7); // Disable Auto Read
write_data(0x9f);
write_com(0xe0); // Enable OTP Read
write_data(0x00); //
delay(10);
write_com(0xe3); // OTP Up-Load
delay(20);; //
write_com(0xe1); // OTP Control Out
/******************************
*** Extension Command 1
******************************/
write_com(0x30); // Extension Command 1
write_com(0x94); // Sleep Out
write_com(0xae); // Display OFF
delay(50);
write_com(0x20); // Power Control
write_data(0x0b); // VB, VR, VF All ON
write_com(0x81); // Set
write_data(0x2d); //给定初值0x37 // 0x1d:Vop = 15.5V
write_data(0x04); //
/******************************
*** Extension Command 2
******************************/
write_com(0x31); // Extension Command 2
write_com(0x32); // Analog Circuit Set
write_data(0x00); //
write_data(0x00); // Booster Efficiency =6KHz
write_data(0x01); // Bias=1/12
/******************************
*** Extension Command 2
******************************/
write_com(0x31); // Extension Command 2
write_com(0x49); // HPM=1;
//
write_com(0x51); // Booster Level x8
write_data(0xfa); //
/******************************
*** Extension Command 1
******************************/
write_com(0x30); // Extension Command 1
write_com(0xf0); // Display Mode
write_data(0x10); // Mono Mode
write_com(0xca); // Display Control
write_data(0x00); // CL Dividing Ratio ? Not Divide
write_data(159); // Duty Set 128 Duty
write_data(0x0C); // Frame Inversion
write_com(0xbc); //Data Scan Direction
write_data(0x00); // seg0-seg240 com0-com159
write_com(0xa6); // 3.Inverse display:a6=normal,a7=inverse
write_com(0x0c); //26.Data Format Select DO=0(0x08); LSB on bottom (Default) ; DO=1(0x0c); LSB on top
/******************************
*** Extension Command 2
******************************/
write_com(0x31); // Extension Command 2
write_com(0xf0); //SET Frame Rate HZ
write_data(0x00);
write_data(0x09);
write_data(0x09);
write_data(0x0b);
write_com(0xf4); //SET Temperature Compensation
write_data(0x00);
write_data(0x00);
write_data(0x00);
write_data(0x03);
/******************************
*** Extension Command 1
******************************/
write_data(0x30); //old 0x50
write_data(0x50); //old 0xb0
write_data(0x84);
write_data(0x05);
write_com(0x40); // Internal Power Supply
/******************************
*** Extension Command 2
******************************/
write_com(0x30); // Extension Command 1
write_com(0xaf); // Display ON
}
需要其他液晶驱动测试程序可来电咨询,也欢迎选购我司的各种尺寸点阵液晶模块产品哦~~
qdgdlcd.b2b168.com/m/