本代码需要配合前面的LCD1602 Delay MatrixKey使用,在前面的源码复制即可
【main.c】
#include <STC89C5xRC.H>
#include "Delay.h"
#include "LCD1602.h"
#include "MatrixKey.h"
unsigned char KeyNum;
void main()
{
LCD_Init();
LCD_ShowString(1,1,"MatrixKey:");
while(1)
{
KeyNum=MatrixKey();
if(KeyNum)
{
LCD_ShowNum(2,1,KeyNum,2);
}
}
}
标签:main,include,51,Delay,单片机,LCD,MatrixKey,KeyNum,密码锁 From: https://blog.51cto.com/u_15865347/6033869