• 大小: 0.02M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-03-27
  • 语言: 其他
  • 标签: 其他  

资源简介


本程序为利用STC89C52实现矩阵键盘的检测并在12864中显示,输入结束后自动与程序中预置的密码相对比,判断正误并在12864上提示。

资源截图

代码片段和文件信息

/*-----------------------------------------------
  名称:液晶显示密码锁
  论坛:www.doflye.net
  编写:shifang
  日期:2009.5
  修改:无
  内容:
------------------------------------------------*/
#include //包含头文件,一般情况不需要改动,头文件包含特殊功能寄存器的定义
#include
void LCD_Init(void);
void DelayMs(unsigned int t);
void LCD_Clear(void);
//void LCD_Write_String(unsigned char xunsigned char yunsigned char *s);
unsigned char KeyPro(void);
void LCD_Write_Char(unsigned char xunsigned char y);
unsigned int _nop_();
void LCD_Write_Data(unsigned char Data);
unsigned char code table0[]={“Welcome!“};
unsigned char code table1[]={“Input password:“};
unsigned char code table2[]={“Right Open!>>>>“};
unsigned char code table3[]={“Wrong! Retry!“};
unsigned char code table4[]={“Wrong 3 times!“};
unsigned int code table[]={
‘0‘‘1‘‘2‘‘3‘
‘4‘‘5‘‘6‘‘7‘
‘8‘‘9‘‘a‘‘b‘
‘c‘‘d‘‘e‘‘f‘};
unsigned char code table5[]={“欢迎回家!“};
unsigned char code password[]={248};//可以更改此密码做多组测试
sbit jdq=P1

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-12-14 23:25  矩阵密码12864\
     文件       10273  2012-11-30 18:33  矩阵密码12864\main.c
     文件       17461  2012-11-30 18:33  矩阵密码12864\main.LST
     文件        6522  2012-11-30 18:33  矩阵密码12864\main.OBJ
     文件        4219  2012-11-30 18:33  矩阵密码12864\shifang
     文件        2703  2012-11-30 18:33  矩阵密码12864\shifang.hex
     文件          43  2012-11-30 18:33  矩阵密码12864\shifang.lnp
     文件       18211  2012-11-30 18:33  矩阵密码12864\shifang.M51
     文件         997  2012-12-14 23:25  矩阵密码12864\shifang.Opt
     文件         218  2012-12-14 23:25  矩阵密码12864\shifang.plg
     文件        2086  2012-12-14 23:25  矩阵密码12864\shifang.Uv2
     文件         955  2012-11-29 20:37  矩阵密码12864\shifang_Opt.Bak
     文件        1648  2012-10-10 23:31  矩阵密码12864\shifang_Uv2.Bak

评论

共有 条评论