电子密码锁的电路设计hsb.docVIP

  • 20
  • 0
  • 约6.62千字
  • 约 9页
  • 2019-03-19 发布于安徽
  • 举报
. .. 作者:侯少博 QQ:604150086 实现功能:输入正确密码绿灯亮,输入错误密码报警并且红灯亮,可以输入三次密码。 C程序: #includereg52.h #define uchar unsigned char #define uint unsigned int sbit lcdrs=P1^0; //液晶数据、指令端 sbit wr=P1^1; //读、写端 sbit lcden=P1^2; //液晶使能端 sbit green_light=P1^3; //绿灯1灭,0亮 sbit speaker=P1^4; //扬声器0响 sbit red_light=P1^5; // 红灯1灭,0亮 uchar code table[]={enter password:}; uchar code table1[]={error!try again:}; uchar code table2[]={ welcome!!!}; uchar code table4[]={set password:}; uchar code table5[]={input again:}; uchar code table6[]={ bad luck!}; uchar code table7[]={ get ou

文档评论(0)

1亿VIP精品文档

相关文档