首页 新闻 > 科技 > 正文

矩阵键盘实验程序

试验效果如下:#include#define duan P0//段选#define wei P2//位选unsigned char code wei1[8] = {0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};//位选控制 查表的方法控制unsigned char code duan1[17] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};//0、1、2、3、4、5、6、7、8、9、A、b、C、d、E、F的显示码unsigned char ge;unsigned int temp;void keys(); //键盘扫描函数void s(unsigned char xms); //延时函数void DigDisplay(); //动态显示函数void main(void){while(1){DigDisplay();keys();}}

关键词: 矩阵键盘实验程

最近更新

关于本站 管理团队 版权申明 网站地图 联系合作 招聘信息

Copyright © 2005-2018 创投网 - www.xunjk.com All rights reserved
联系我们:33 92 950@qq.com
豫ICP备2020035879号-12