/******************************/
// 把QX-MCS51开发板上的20个按键编码识别出来
//每按一下个按键让数码管显示不同的值;
/******************************/
#include <reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit we = P2^7;
sbit du = P2^6;
uchar code leddata[]={
0x3F, //"0"
0x06, //"1"
0x5B, //"2"
0x4F, //"3"
0x66, //"4"
0x6D, //"5"
0x7D, //"6"
0x07, //"7"
0x7F, //"8"
0x6F, //"9"
0x77, //"A"
0x7C, //"B"
0x39, //"C"
0x5E, //"D"
0x79, //"E"
0x71, //"F"
0x76, //"H"
0x38, //"L"
0x37, //"n"
清翔电子51单片机9课矩阵键盘课后作业2
最新推荐文章于 2023-08-04 14:55:46 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)