📄 initial.c
字号:
/*******************************************************************************
Initial.C
Copyright (c) InnoLux Corp. All rights reserved.
*******************************************************************************/
#include <Define.h>
void initial(Byte Color_Mode)
{
Send_Command(0x94); /*Exit sleep mode*/
DelayX1ms(1);
Send_Command(0xd1); /* internal oscillator*/
Send_Command(0x20); /* Power control Set */
Send_Data(0x07); /*Turn on the reference voltage gen, turns on internal regulator and
voltage follower 4x*/
Send_Command(0xf7); /* set PWM FRC */
Send_Data(0x28);
Send_Data(0x2c); /* set 4 bit PWM */
Send_Data(0x05);
Send_Command(0x81); /* set Contrast Level & Internal regulator resistor ratio */
Send_Data(0x30); /* Contrast Level */
Send_Data(0x03); /* Internal reistor ration set to 5.44 */
Send_Command(0x82); /* Set Temperature com Pensation coefficient */
Send_Data(0x00); /* Temp gradiend set to -0.1%deg C*/
Send_Command(0xbb); /* set com output sczn direction */
Send_Data(0x02); /*com33<-com0 com67<-com34*/
Send_Command(0xbc); /* set data output scan direction */
Send_Data(0x02); /* set seg96->1,com1->65 */
Send_Data(0x01); /* set RGB setting */
Send_Data(Color_Mode); /* set 16 level gray scale mode */
Send_Command(0xce); /*set color value */
Send_Data(0x00); /* set red */
Send_Data(0x03);
Send_Data(0x05);
Send_Data(0x07);
Send_Data(0x09);
Send_Data(0x0b);
Send_Data(0x0d);
Send_Data(0x0f);
Send_Data(0x00); /* set green */
Send_Data(0x03);
Send_Data(0x05);
Send_Data(0x07);
Send_Data(0x09);
Send_Data(0x0b);
Send_Data(0x0d);
Send_Data(0x0f);
Send_Data(0x00); /* set blue */
Send_Data(0x05);
Send_Data(0x0a);
Send_Data(0x0f);
Send_Command(0xca); /*display control */
Send_Data(0x00);
Send_Data(0x10); /* 68 duty*/
Send_Data(0x00);
Send_Command(0xfb);
Send_Data(0x03);
// Send_Command(0x75); /*Set Page address */
//Send_Data(0x02); /*Start Page address*/
//end_Data(0x02); /*End Page address*/
//end_Command(0x15); /*Set Column address */
//end_Data(0x04); /*Start Column address*/
//end_Data(0x60); /*End Column address*/
// Send_Command(0xab); /* set scroll start */
// Send_Data(0x00);
Send_Command(0xa7); /* inverse display */
Send_Command(0xf2); /* set frame frequency */
Send_Data(0x0e); /* set 103.5 HZ */
Send_Data(0x26); /* set 7 line inversion */
// Send_Command(0xfb); /* set bias 1/7 */
// Send_Data(0x03);
// Send_Command(0xa2); /* disable Icon */
// Send_Command(0xf3); /* VOP */
// Send_Data(0xc4); /* VOP */
Send_Command(0xaf); /* display ON */
}
Byte code gray_index444[]={0xff,0xff,0xff,0xee,0xee,0xee,0xdd,0xdd,0xdd,0xcc,0xcc,0xcc,0xbb,0xbb,0xbb,0xaa,
0xaa,0xaa,0x99,0x99,0x99,0x88,0x88,0x88,0x77,0x77,0x77,0x66,0x66,0x66, 0x55,0x55,
0x55,0x44,0x44,0x44,0x33,0x33,0x33,0x22,0x22,0x22,0x11,0x11,0x11,0x00,0x00,0x00};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -