程序设计内容
(1).&nbsp密码的设定,在此程序中密码是固定在程序存储器ROM中,兆稿假设预设的密码为“12345”共5位密码。
(2).&nbsp密码的输入问题: 由于采用两个按键来完成密码的输入,那么其中一个按键为功能键,另一个按键为数字键。在输入过程中族培孝,首先输入密码的长度,接着根据密码的长度输入密码的位数,直到所有长度的密码都已经输入完毕;或者输入确认功能键之后,才能完成密码的输入过程。进入密码的判断比较处理状态并给出相应的处理过程。
(3).按键禁止功能:初始化时,是允许按键输入密码,当有按键按下并开始进入按键识别状态时,按键禁止功能被激活,但启动的状态在3次密码输入不正确的情况下发生的。
C语言源程序
#include unsigned char code ps[]={1,2,3,4,5}
unsigned char code dispcode[]={0x3f,0x06,0x5b,0x4f,0x66, &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
0x6d,0x7d,0x07,0x7f,0x6f,0x00,0x40}
unsigned char pslen=9 unsigned char templen
unsigned char digit unsigned char funcount
unsigned char digitcount
unsigned char psbuf[9]
bit cmpflag
bit hibitflag
bit errorflag
bit rightflag
unsigned int second3
unsigned int aa
unsigned int bb
bit alarmflag
bit exchangeflag
unsigned int cc
unsigned int dd
bit okflag
unsigned char oka
unsigned char okb
void main(void)
{ &nbsp
unsigned char i,j &nbsp
P2=dispcode[digitcount] &nbsp
TMOD=0x01 &nbsp
TH0=(65536-500)/256 &nbsp
TL0=(65536-500)%6 中册&nbsp
TR0=1 &nbsp
ET0=1 &nbsp
EA=1 &nbsp
while(1) &nbsp&nbsp
&nbsp { &nbsp&nbsp&nbsp&nbsp&nbsp
if(cmpflag==0) &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
{ &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
if(P3_6==0) //function key &nbsp&nb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