2151| 3
|
51单片机 关于6*4键盘 |
100黑币
最佳答案#include
#define uint unsigned int
#define uchar unsigned char
sbit code0=P1^0; //定义6*4键盘端口
sbit code1=P1^1;
sbit code2=P1^2;
sbit code3=P1^3;
sbit code4=P1^4;
sbit code5=P1^5;
sbit code6=P1^6;
sbit code7=P1^7;
sbit code8=P2^3;
sbit code9=P2^4;
uint key=0; //键值变量
uint PD() //读取10位数据
{
uint i;
i=code9;
i=(i9;
}
void keyscan() ...
| ||
| ||
| ||