文件名称:66KeyLock
介绍说明--下载内容均来自于网络,请自行研究使用
此题目是通过键盘来实现密码输入是否正确,正确的时候数码管亮,否则发出报警声。
判断是按键还是干扰是非常有用的,它体现了一个系统的抗干扰能力。高低电平在瞬间的变换是很正常的,如果没有这条语句,系统很容易出错。
其中2秒是由定时器0来完成的。
在程序的定时器中断中,用switch代替了if else结构,使得程序的可读性大大增强。
TH0 = (65536-50000) / 256
TL0 = (65536-50000) 256 使得TH0 = 3CH, TL0 = B0H,由于该单片机的晶振为12MHz 因此定时时间就为0.05ms.在定时器中断服务程序中用FLASH计数,当计数达到40时正好是2秒。-This topic is through the keyboard to realize the correct password is correct, when GuanLiang digital alarm sound, otherwise.
Judgment is a key or interference is very useful, it reflects the anti-interference ability of a system. High level in the instant transformation is very normal, if not this statement, the system is very easy to make a mistake.
2 seconds is accomplished by the timer 0.
In the process of the timer interrupt, switch with replaced if else structure, make the readability of the procedures enhanced greatly.
TH0 = (65536-50000)/256,
TL0 = (65536-50000) 256, Make TH0 3CH, TL0 = = B0H, because the MCU crystals for 12MHz, So regularly time is 0.05 ms in timer interrupt service routines, when using FLASH counting 40 count when exactly 2 seconds.
判断是按键还是干扰是非常有用的,它体现了一个系统的抗干扰能力。高低电平在瞬间的变换是很正常的,如果没有这条语句,系统很容易出错。
其中2秒是由定时器0来完成的。
在程序的定时器中断中,用switch代替了if else结构,使得程序的可读性大大增强。
TH0 = (65536-50000) / 256
TL0 = (65536-50000) 256 使得TH0 = 3CH, TL0 = B0H,由于该单片机的晶振为12MHz 因此定时时间就为0.05ms.在定时器中断服务程序中用FLASH计数,当计数达到40时正好是2秒。-This topic is through the keyboard to realize the correct password is correct, when GuanLiang digital alarm sound, otherwise.
Judgment is a key or interference is very useful, it reflects the anti-interference ability of a system. High level in the instant transformation is very normal, if not this statement, the system is very easy to make a mistake.
2 seconds is accomplished by the timer 0.
In the process of the timer interrupt, switch with replaced if else structure, make the readability of the procedures enhanced greatly.
TH0 = (65536-50000)/256,
TL0 = (65536-50000) 256, Make TH0 3CH, TL0 = = B0H, because the MCU crystals for 12MHz, So regularly time is 0.05 ms in timer interrupt service routines, when using FLASH counting 40 count when exactly 2 seconds.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
66 Key Lock
...........\Key Lock (2)
...........\Key Lock (2).asm
...........\Key Lock (2).DSN
...........\Key Lock (2).hex
...........\Key Lock (2).lnp
...........\Key Lock (2).LST
...........\Key Lock (2).M51
...........\Key Lock (2).OBJ
...........\Key Lock (2).Opt
...........\Key Lock (2).plg
...........\Key Lock (2).PWI
...........\Key Lock (2).Uv2
...........\Key Lock (2)_Opt.Bak
...........\Key Lock (2)_Uv2.Bak
...........\Last Loaded Key Lock (2).DBK
...........\new66.c
...........\new66.LST
...........\new66.OBJ
...........\Key Lock (2)
...........\Key Lock (2).asm
...........\Key Lock (2).DSN
...........\Key Lock (2).hex
...........\Key Lock (2).lnp
...........\Key Lock (2).LST
...........\Key Lock (2).M51
...........\Key Lock (2).OBJ
...........\Key Lock (2).Opt
...........\Key Lock (2).plg
...........\Key Lock (2).PWI
...........\Key Lock (2).Uv2
...........\Key Lock (2)_Opt.Bak
...........\Key Lock (2)_Uv2.Bak
...........\Last Loaded Key Lock (2).DBK
...........\new66.c
...........\new66.LST
...........\new66.OBJ