piC16F917-段式LCD显示.docVIP

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
今天找了个段式液晶屏,写了一个小程序,总算对它有所了解.现在我把程序拿出来,希望对初学有所帮助,有不对的地方,请帮忙修正. #include pic16f91x.h #define unchar?? unsigned char #define unint??? unsigned int #define uchar??? unsigned char #define hao? SEG0COM0 #define one? SEG1COM0 #define F1?? SEG2COM0 #define A1?? SEG3COM0 #define F2?? SEG4COM0 #define A2?? SEG5COM0 #define F3?? SEG6COM0 #define A3?? SEG7COM0 #define F4?? SEG8COM0 #define A4?? SEG9COM0 #define F5?? SEG10COM0 #define A5?? SEG11COM0 #define T1?? SEG12COM0 #define NO??? SEG0COM1 #define CK2?? SEG1COM1 #define G1??? SEG2COM1 #define B1??? SEG3COM1 #define G2??? SEG4COM1 #define B2??? SEG5COM1 #define G3??? SEG6COM1 #define B3??? SEG7COM1 #define G4??? SEG8COM1 #define B4??? SEG9COM1 #define G5??? SEG10COM1 #define B5??? SEG11COM1 #define T2??? SEG12COM1 #define TARE?? SEG0COM2 #define CK1??? SEG1COM2 #define E1???? SEG2COM2 #define C1???? SEG3COM2 #define E2???? SEG4COM2 #define C2???? SEG5COM2 #define E3???? SEG6COM2 #define C3???? SEG7COM2 #define E4???? SEG8COM2 #define C4???? SEG9COM2 #define E5???? SEG10COM2 #define C5???? SEG11COM2 #define T3???? SEG12COM2 #define ZER0?? SEG0COM3 #define P1???? SEG1COM3 #define D1???? SEG2COM3 #define P2???? SEG3COM3 #define D2???? SEG4COM3 #define P3???? SEG5COM3 #define D3???? SEG6COM3 #define P4???? SEG7COM3 #define D4???? SEG8COM3 #define P5???? SEG9COM3 #define D5???? SEG10COM3 #define P6???? SEG11COM3 #define T4???? SEG12COM3 unsigned char t0,t1,t2,t3,t4,data; unsigned int? cnt1,T; unsigned? int key,cnt,dsp0; uchar flag0=0; uchar flag1=0; uchar flag2=0; uchar flag3=0; unchar a,b; unint c; //段码         ??? unsigned char table[]={0x3F,0x06,0x5B,0x4F, ?????????????????????????????? 0x66,0x6D,0x7D,0x07, ??????????????????????????????? 0x7F,0x6F,0x00}; void delay(unsigned int x) { ? unsigned int y; ? for(y=x;--y;) ?????? continue; ? } void initial() { ?LCDCON=0x93;? //使能LCD模块,休眠模式下使能LCD模块,使能LCD偏置电压引脚,1/4 ?LCDPS=0xc1;?? //1/3偏置 ?LCDSE0=0xFF;???? //段使能 ?LCDSE1=0xff; ?LCDSE2=0x00; ?TRISE=0XFF; ?ADCON1=0X07; ?CMCON0=0X07; ?A

文档评论(0)

wx171113 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档