4×4矩阵键盘数码管显示-最简便易懂的键盘扫描方法.docVIP

  • 86
  • 0
  • 约1.45千字
  • 约 3页
  • 2020-12-05 发布于四川
  • 举报

4×4矩阵键盘数码管显示-最简便易懂的键盘扫描方法.doc

/////4×4矩阵键盘 按键为1-16,按键显示0-9、a-f; ////////////////// #include reg52.h #define uchar unsigned char uchar key=0; uchar code table[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e,0xc0}; void show(uchar key) { ?P0=table[key];//显示数值 } void Scan_key()//扫描键盘 { ?uchar m;

文档评论(0)

1亿VIP精品文档

相关文档