Level set / Sub-level set / Super-level set

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
void LCD_Init(void) { IO_INIT(); //IO口初始化 P0SEL &= 0xFE; //让P0.0为普通IO口, P0DIR |= 0x01; //让P0.0为为输出 P1SEL &= 0x73; //让 P1.2 P1.3 P1.7为普通IO口 P1DIR |= 0x8C; //把 P1.2 P1.3 1.7设置为输出 LCD_SCL=1; LCD_RST=0; LCD_DLY_ms(50); LCD_RST=1; //从上电到下面开始初始化要有足够的时间,即等待RC复位完毕 LCD_WrCmd(0xae);//--turn off oled panel LCD_WrCmd(0x00);//---set low column address LCD_WrCmd(0x10);//---set high column address LCD_WrCmd(0x40);//--set start line address Set Mapping RAM Display Start Line (0x00~0x3F) LCD_WrCmd(0x81);//--set contrast control register LCD_WrCmd(0xcf); // Set SEG Output Current Brightness LCD_WrCmd(0xa1);//--Set SEG/Column Mapping 0xa0左右反置 0xa1正常 LCD_WrCmd(0xc8);//Set COM/Row Scan Direction 0xc0上下反置 0xc8正常 LCD_WrCmd(0xa6);//--set normal display LCD_WrCmd(0xa8);//--set multiplex ratio(1 to 64) LCD_WrCmd(0x3f);//--1/64 duty LCD_WrCmd(0xd3);//-set display offset Shift Mapping RAM Counter (0x00~0x3F) LCD_WrCmd(0x00);//-not offset LCD_WrCmd(0xd5);//--set display clock divide ratio/oscillator frequency LCD_WrCmd(0x80);//--set divide ratio, Set Clock as 100 Frames/Sec LCD_WrCmd(0xd9);//--set pre-charge period LCD_WrCmd(0xf1);//Set Pre-Charge as 15 Clocks & Discharge as 1 Clock LCD_WrCmd(0xda);//--set com pins hardware configuration LCD_WrCmd(0x12); LCD_WrCmd(0xdb);//--set vcomh LCD_WrCmd(0x40);//Set VCOM Deselect Level LCD_WrCmd(0x20);//-Set Page Addressing Mode (0x00/0x01/0x02) LCD_WrCmd(0x02);// LCD_WrCmd(0x8d);//--set Charge Pump enable/disable LCD_WrCmd(0x14);//--set(0x10) disable LCD_WrCmd(0xa4);// Disable Entire Display On (0xa4/0xa5) LCD_WrCmd(0xa6);// Disable Inverse Display On (0xa6/a7) LCD_WrCmd(0xaf);//--turn on oled panel LCD_Fill(0); //初始清屏 LCD_Set_Pos(0,0); }
05-23

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值