- UID
- 45755
- 阅读权限
- 55
- 推广
-
- 幽默
-
- 注册时间
- 2009-8-18
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2022-9-2 16:11:40
|
显示全部楼层
void LCD_Init1(void)//...........自己的初始化液晶屏...................
{
softrst(); //复位LCD
LCD_CmdWrite(WLCR); //[00H] , Default --> 0x00
LCD_DataWrite(0x0C); //屏幕显示开启 disp_off输出high
//.....................................................................
// //.......正常显示..........
LCD_CmdWrite(MISC); //[01H] , Default --> 0x00
LCD_DataWrite(0x08); //0x00扫描顺序seg0-319 com 0-239
//.......上下左右反显示....
// LCD_CmdWrite(MISC); //[01H] , Default --> 0x00 忙碌设定为低电平触发动作
// LCD_DataWrite(0x0b); //0x00扫描顺序seg0-319 com 0-239
LCD_CmdWrite(MAMR); //[12H] , Default --> 0x11
LCD_DataWrite(0x11); //0x11存取DDRAM1显示DDRAM1
LCD_CmdWrite(MAMR); //[12H] , Default --> 0x11
LCD_DataWrite(0x22); //0x11存取DDRAM2显示DDRAM2
LCD_CmdWrite(AWRR); //[20H] , Default --> 0x27
LCD_DataWrite(29); //240/8-1=29=0x1d工作窗口右边界
LCD_CmdWrite(DWWR); //[21H] , Default --> 0x27
LCD_DataWrite(29); //0x27显示窗口宽度(320/8)-1=39=0x27
//240/8-1=29=0x1d
LCD_CmdWrite(AWBR); //[30H] , Default --> 0xEF
LCD_DataWrite(159); //0xEF工作窗口下边界
LCD_CmdWrite(DWHR); //[31H] , Default --> 0xEF
LCD_DataWrite(159); //0xEF显示窗口高度
delayus(10);
} |
|