lcd上显示电压程序

lcd上显示电压程序

ID:38364143

大小:31.00 KB

页数:3页

时间:2019-06-11

lcd上显示电压程序_第1页
lcd上显示电压程序_第2页
lcd上显示电压程序_第3页
资源描述:

《lcd上显示电压程序》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、在lab2000上实验版上实现电压在液晶上显示C51程序液晶使用的控制器是sed1520122X32#include#include#definexiezhiXBYTE[0x8000]#definexieshujuXBYTE[0x8001]#defineduzhiXBYTE[0x8002]#definexiezhi2XBYTE[0x8004]#definexieshuju2XBYTE[0x8005]#defineduzhi2XBYTE[0x8006]#defineadportXBYTE[0x9000]unsignedcharbuf[3]

2、;unsignedcharcodetab1[][8]={{0x00,0x00,0x00,0x7E,0x81,0x81,0x81,0x7e},/*0*/{0x00,0x00,0x00,0x00,0x00,0x82,0xff,0x80},/*1*/{0x00,0x00,0x00,0xc6,0xa1,0x91,0x89,0xc6},/*2*/{0x00,0x00,0x00,0x42,0x81,0x81,0x99,0x66},/*3*/{0x00,0x00,0x00,0x1f,0x10,0xff,0x10,0x10},/*4*/{0x00,0x00,0x00,0x4F,0x89,0

3、x89,0x89,0x79},/*5*/{0x00,0x00,0x00,0x7E,0x89,0x89,0x89,0x72},/*6*/{0x00,0x00,0x00,0x01,0x01,0xF9,0x05,0x03},/*7*/{0x00,0x00,0x00,0x76,0x89,0x89,0x89,0x76},/*8*/{0x00,0x00,0x00,0x4E,0x91,0x91,0x91,0x7E}/*9*/};unsignedcharcodetab2[]={0x00,0x00,0x00,0xc0,0x00,0x00};unsignedcharcodetab3[][32]

4、={{0x00,0xf8,0x48,0x48,0x48,0x48,0xff,0x48,0x48,0x48,0x48,0xfc,0x08,0x00,0x00,0x00,0x00,0x07,0x02,0x02,0x02,0x02,0x3f,0x42,/*电压*/0x42,0x42,0x42,0x47,0x40,0x70,0x00,0x00},{0x00,0x00,0xfe,0x02,0x82,0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0xc3,0x82,0x00,0x00,0x40,0x30,0x0f,0x40,0x40,0x40,0x40,0x40

5、,0x7f,0x40,0x42,0x44,0x4c,0x60,0x40,0x00},{0x80,0x40,0x20,0xf8,0x27,0x20,0x20,0x20,/*伏*/0x20,0xff,0x20,0x24,0x28,0x38,0x20,0x00,0x00,0x00,0x00,0xff,0x80,0x40,0x20,0x18,0x06,0x01,0x06,0x18,0x60,0xc0,0x40,0x00}};voidwritezhi(unsignedcharcommand){while(duzhi&0x80);xiezhi=command;}voidwriteshu

6、ju(unsignedcharlcddata){while(duzhi&0x80);xieshuju=lcddata;}voidwritezhi2(unsignedcharcommand){while(duzhi2&0x80);xiezhi2=command;}voidwriteshuju2(unsignedcharlcddata){while(duzhi2&0x80);xieshuju2=lcddata;}voidinit(){writezhi(0xe2);writezhi2(0xe2);writezhi(0xa4);writezhi2(0xa4);/*初始化*/writ

7、ezhi(0xa9);writezhi2(0xa9);writezhi(0xa0);writezhi2(0xa0);writezhi(0xc0);writezhi2(0xc0);writezhi(0xaf);writezhi2(0xaf);}voidclear(){unsignedchari,j;i=0;do{writezhi(i+0xb8);writezhi2(i+0xb8);writezhi(0x00);writezhi2(0x00);j=0x50;do{writeshuju(0x00);writeshuju2

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。