基于单片机的密码锁控制器的设计内容摘要:

econd3=0。 } else { for(i=0。 ikeycount。 i++) { if(getps[i]!=ps[i]) { i=keycount。 errorflag=1。 rightflag=0。 second3=0。 goto a。 } } errorflag=0。 rightflag=1。 a: i=keycount。 } } temp=temp amp。 0x0f。 while(temp!=0x0f) { temp=P3。 temp=temp amp。 0x0f。 } keyoverflag=0。 } } P3=0xff。 P35=0。 temp=P3。 temp=temp amp。 0x0f。 if (temp!=0x0f) { for(i=10。 i0。 i) for(j=248。 j0。 j)。 temp=P3。 temp=temp amp。 0x0f。 if (temp!=0x0f) { temp=P3。 temp=temp amp。 0x0f。 switch(temp) { case 0x0e: key=4。 break。 case 0x0d: key=5。 break。 case 0x0b: key=6。 break。 case 0x07: key=11。 break。 } temp=P3。 P11=~P11。 if((key=0) amp。 amp。 (key10)) { if(keycount6) { getps[keycount]=key。 dispbuf[keycount+2]=19。 } keycount++。 if(keycount==6) { keycount=6。 } else if(keycount6) { keycount=6。 keyoverflag=1。 //key overflow } } else if(key==12)//delete key { if(keycount0) { keycount。 getps[keycount]=0。 dispbuf[keycount+2]=16。 } else { keyoverflag=1。 } } else if(key==15)//enter key { if(keycount!=pslen) { errorflag=1。 rightflag=0。 second3=0。 } else { for(i=0。 ikeycount。 i++) { if(getps[i]!=ps[i]) { i=keycount。 errorflag=1。 rightflag=0。 second3=0。 goto a4。 } } errorflag=0。 rightflag=1。 a4: i=keycount。 } } temp=temp amp。 0x0f。 while(temp!=0x0f) { temp=P3。 temp=temp amp。 0x0f。 } keyoverflag=0。 } } P3=0xff。 P36=0。 temp=P3。 temp=temp amp。 0x0f。 if (temp!=0x0f) { for(i=10。 i0。 i) for(j=248。 j0。 j)。 temp=P3。 temp=temp amp。 0x0f。 if (temp!=0x0f) { temp=P3。 temp=temp amp。 0x0f。 switch(temp) { case 0x0e: key=1。 break。 case 0x0d: key=2。 break。 case 0x0b: key=3。 break。 case 0x07: key=12。 break。 } temp=P3。 P11=~P11。 if((key=0) amp。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。