1、I 利用数字电路实现电子密码锁 学生:XXX 指导老师:XXX 内容摘要:本数字密码锁采用单片机 AT89S52 为主控芯片,由 EEPROM 存储密码。硬 件部分包括主控制系统、人机交互界面以及输出系统三大部分。 主控制系统中主控制芯片使用了AT89S52单片机,该单片机性能优良,能满足一般 的普通应用;EEPROM采用AT24C02芯片,掉电后可以存储密码,从而保证了系统的安全 性。人机交互通道部分采用了44矩阵键盘输入以及LCD1602标准字符型液晶显示。输 出系统部分包括驱动开锁电路和报警电路;其中,在本系统设计中,驱动开锁电路用发 光二极管表示,而报警电路则使用蜂鸣器。 本系统中使用
2、的 AT24C02 芯片是一个带有 I 2C 总线接口的 EEPROM 存储器。I2C 总线 是一种双向二线制总线,它的结构简单,可靠性和抗干扰性能好。I 2C 总线结构很简单, 只有两条线,包括一条数据线(SDA)和一条串行时钟线(SCL) 。具有 I 2C 接口的器件可 以通过这两根线接到总线上,进行相互之间的信息传递。 本数字密码锁的功能为:密码位数为 8 位,可选值为 09,从而保证足够的锁体强 度; 用户可以自行设定和修改密码; 防止密码被盗, 输入密码错误次数超过 3 次则报警; 友好的人机界面;输入正确的密码后,驱动开锁电路。 软件部分应用单片机 C 语言实现了本设计的全部控制功
3、能。C 语言编译方便,易读 性好,且移植性方便,能够满足实现本系统的功能要求。在设计过程中,给出了本系统 C 语言编程的原理和流程图。 本数字密码锁系统稳定性好,设计人性化,由于使用单片机控制并有记忆模块,功 能齐全可靠,并有很好的扩展性,而且成本低廉,具有良好的发展前景。 关键词:数字密码锁 AT24C02 芯片 安全性 II E Electronic combination lectronic combination locklock AbstractAbstract:Using the digital circuit realize electronic combination lock
4、 This digital locks USES the monolithic integrated circuit AT89S52 as the controller chip, by EEPROM memory password. Hardware including master control system, man-machine interface and output system of three. The Lord control system used in the control chip AT89S52 SCM, this single chip good perfor
5、mance, can satisfy the general common application; The AT24C02 chip EEPROM, after power off can be stored password, so as to ensure the security of the system. Man-machine interactive channel part adopts the 4 x 4 matrix keyboard input and LCD1602 standard character type LCD display. The output of s
6、ystem including drive circuit and alarm lock circuit; Which, in the system design, drive the lock circuit using light-emitting diodes said, and alarm circuit is using a buzzer. The system used AT24C02 chip is a with the I2C bus interface EEPROM memory. The I2C bus is a two-way two wire bus, its simple structure, reliability and anti-interference capability. The I2C bus structure is simple, only two lines, including a data line (SDA) and a serial clock line (SCL). Has the I2C devices