init.c
来自「lcd显示的驱动和例子程序, 型号是pd16682」· C语言 代码 · 共 36 行
C
36 行
/*****************************/
/* 初始化函数:init() */
/* 内部调用子程序:WriteCommand(),WriteData() */
/* 程序调用入口:init() */
/* 程序调用变量:无 */
/*****************************/
void init()
{ _nop_();
_nop_();
CS1=0;
_nop_();
_nop_();
RES=1;
_nop_();
_nop_();
RES=0;
_nop_();
_nop_();
_nop_();
_nop_();
RES=1;
WriteCommand(0xe2);
WriteCommand(0xa3); //LCD偏压 1/9
WriteCommand(0xa0); //ADC
WriteCommand(0xc0); //Common Output Status Select
WriteCommand(0x24); //倍压
WriteCommand(0x81); //设电压
WriteCommand(0x20);
WriteCommand(0x2f);
WriteCommand(0xaf);
WriteCommand(0xa4);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?