at89c51和LCD1602显示日期
摘要:#include<>#include<>#include<>//定义控制信号端口sbitRS=P3^2;sbitRW=P3^3;sbitE=P3^4;voidlcd_init();voiddelay100us(unsignedchart);voiddelay5us(unsignedcharn);voiddelay1s(z);voiddisp(chartab[]);voidlcd_zdy(charcom,chartab[]);unsignedcharlcd_r_start();voidlcd_w_cmd(unsignedcharcom);voidlcd_w_dat(unsignedchardat);main(){charyear[]="2017";charmonth[]="05";charday[]="11";charnian[]={0x04,0x0F,0x72,0x0F,0x0A,0x1F,0x02,0x00};charyue[]={0x1E,0x12,0x1E,0x12,0x1E,0x12,0x16,0x00};charri[]={0x1E,0x12,0x12,0x1E,0x12,0x12,0x1E,0x00};charwish[]="happyday";while(1){charx;P1=0xff;//送全1到P1口lcd_init();delay100us(255);lcd_zdy(0x40,nian);lcd_zdy(0x48,yue);lcd_zdy(0x50,ri);lcd_w_cmd(0x82);disp(year);lcd_w_dat(0
温馨提示:当前文档最多只能预览
5 页,若文档总页数超出了
5 页,请下载原文档以浏览全部内容。
本文档由 匿名用户 于 2020-11-07 10:45:26上传分享