当前位置:酷百书>生活百科>急!!!哪位高手有CA12864K液晶屏的资料和源程序啊?感激万分啊!!

急!!!哪位高手有CA12864K液晶屏的资料和源程序啊?感激万分啊!!

2023-12-18 09:18:18 编辑:join 浏览量:624

急!!!哪位高手有CA12864K液晶屏的资料和源程序啊?感激万分啊!!

急!!!哪位高手有CA12864K液晶屏的资料和源程序啊?感激万分啊!!

◇ 类型:128*64点阵图型液晶模块◇ 内建国标二级汉字字库◇ 外型尺寸:93*70mm◇ 视域尺寸:70.7*38.8mm◇ 工作电压:5V◇ 背光源:CCFL、LED、EL◇ 温度:常温、宽温◇ 可选黄绿膜、灰膜、蓝膜◇ 串、并口自由转换 ca12864k 并运帆口程序(简单测试)#define lcd_port P0#define rs P1_3#define rw P1_4#define e P1_5#define cs1 P1_6#define cs2 P1_7#define bool bit#define uc unsigned char #define nop _nop_()#include #include #include uc code apple[]={0x30,0x50,0xd0,0x90,0xf0,0x30,0x80,0x60,0x3c,0xe8,0x20,0xa0,0xe0,0x70,0x00,0x00,0x04,0x06,0x03,0x11,0x13,0x12,0x18,0x0c,0x07,0x01,0x03,0x06,0x0c,0x1c,0x18,0x18}; void lcd_wcmd(uc cs,uc cmd);void lcd_wdat(uc cs, uc dat);void lcd_setcs(uc cs);void lcd_ready();void lcd_gotoxy(uc x,uc y,uc sline);void lcd_reset();void lcd_fill();void delay(unsigned int ue);uc *p;/**********************************//**函数说明:向LCD写命令,cs 片选,***//** cmd 命令 ***//** RS=0 RW=0 CS=片选 E下降沿 ***//**********************************/void lcd_wcmd(uc cs,uc cmd){lcd_setcs(cs);lcd_ready();lcd_port=cmd;rs=rw=0;e=1;nop;e=0;cs1=1;cs2=1;}/**********************************//**函数说明:向LCD写显示数据 ***//** cs:片选 dat:数据 ***//** RS=1 RW=0 CS=片选 E=下降沿 ***//旁裤雹**********************************/void lcd_wdat(uc cs, uc dat){lcd_setcs(cs);lcd_ready();lcd_port=dat;rs=1;rw=0;e=1;nop;e=0;cs1=1;cs2=1;}/**********************************//**函数说明:设置片选 ***//** cs=1 选中第一片, ***//纯烂** cs=2 选中第二片 ***//**********************************/void lcd_setcs(uc cs){switch(cs){case 1:cs1=0;break;case 2:cs2=0;break;}}void lcd_ready(){lcd_port=0xff;rs=0;rw=1;e=1;nop;while(lcd_port&0x80);e=0;}void lcd_gotoxy(uc x,uc y,uc sline){uc cs;char tp;tp=abs(x-63);if(x-63>0)cs=2;else cs=1;lcd_wcmd(cs,y+0xb8); //page=(y&0x07)+0xb8lcd_wcmd(cs,tp+0x40); //row =(x&0x3f)|0x40lcd_wcmd(cs,sline+0xc0);}void lcd_reset(){//uc i;lcd_wcmd(1,0x3f); //display on lcd_wcmd(2,0x3f);lcd_fill();}void lcd_fill(){ uc a;uc i,j,k=1;for(j=0;j<8;j++) {lcd_gotoxy(0,j,k);for(i=0;i<32;i++) {lcd_wdat(1,a);lcd_wdat(2,a);a=*p;p++;}k+=8;}}void delay(unsigned int ue){unsigned int i;for(i=0;i

标签:感激万分,CA12864K,源程序

版权声明:文章由 酷百书 整理收集,来源于互联网或者用户投稿,如有侵权,请联系我们,我们会立即处理。如转载请保留本文链接:https://www.kubaishu.com/life/402214.html
热门文章