|
Abstract: Proposed one kind can prevent to probe the password many times based on monolithic integrated circuit’s combination lock design proposal, according to user’s 10 overall request, has given this monolithic integrated circuit combination lock hardware circuit and the software routine, simultaneously has given monolithic integrated circuit model contents and so on choice, hardware design, software flow chart, monolithic integrated circuit memory cell assignment, assembly language source program and detailed annotation.
Key word: Monolithic integrated circuit; Combination lock; Password 1 introduction Many profession’s many places need the combination lock, but the ordinary combination lock’s password is probed many times easily breaks the code. This article gave one kind to be able to prevent to probe the password many times the combination lock design method, thus has overcome the above shortcoming effectively. 2 hardware circuits Shown in Figure 1 is one kind of combination lock electric circuit which the author designs. This combination lock mainly defers to the following 10 users to request to carry on the design: (1) the altogether 8 passwords, each position’s value scope is 1~8. (2) the user may establish and the revision password voluntarily. (3) according to each password key when has the sound, the light prompt. (4), if enters 8 unblanking password entirely accurate, then reports to the police 5 seconds, reminds other people attention. (5) unlocks the password wrong 3 secondary to report to the police 10 minutes, the warning period input password is invalid, probes the password many times by against thief. (6) enters 8 unblanking password entirely accurate can unlock, when unblanking must have 1 second prompt sound. (7) the electromagnetism locks the magnet coil must use the pulse actuation, each time electrifies the time not to be more than for 2 seconds, by against burns out. (8) on the password keyboard only allows to have 8 password pressed keys and 1 photo tube. In the lock has the battery backup, when in interior electricity replacement can establish or the revision password, therefore, cannot only revise or the establishment password in the wrong side of the door pressed key. (10) the cost must be quite low, the hardware and the software must as far as possible succinct reliable, the easy volume production. According to the overall request analysis, the I/O mouth line which this combination lock electric circuit needs is short in 15, if designs appropriately, the procedure will not surpass 200 instructions, therefore may choose the high quality at low price AT89C1051/2051 or GMS1051/2051, will not need the external connection program memory and the data-carrier storage and other expansion part. In shown in Figure 1 in the electric circuit, the P1 mouth connects 8 passwords to press a key AN1~AN8, the unblanking pulse by the P3.5 output, the warning and the prompt sound outputs by P3.7. BL is uses in reporting to the police and the sound prompt loudspeaker, photo tube D1 uses in reporting to the police and the prompt, L is the magnet coil which the electromagnetism locks. 3 software designs Figure 2 has given this monolithic integrated circuit combination lock electric circuit’s software flow chart. In the chart 煟 grain of thin AA8 as well as START, SET, SAVE are in the procedure markings, is to understand the procedure, but special sign in flow chart corresponding position, time analysis program may compare the reference carefully. 3.1 memory cell assignment In this combination lock the RAM memory cell’s allocative decision is as follows: 31H~38H: Deposits 8 hypotheses in turn the passwords, the first place password deposits in the 31H unit; R0: Directional password address; R2: Already entered the password the figure; R3: Depositing permission wrong code number of times 3 and actual wrong code number of times differential value; R4 to R7: The time delay uses; 00H: Wrong code flag bit. Regarding ROM memory cell assignment, because the procedure is quite short, moreover takes the storage space are quite few, therefore, in not special request time, may (other addresses also be possible) to start from the 0030H unit to deposit the master routine. 3.2 source programs Below is this electronic combination lock software source program code: ORG 0000H AJMP START ORG 0030H START:ACALL BP MOV R0,#31H MOV R2,#8 SET: MOV P1,#0FFH MOV A, P1 CJNE A,#0FFH, L8 AJMP SET L8: ACALL DELAY CJNE A,#0FFH, SAVE AJMP SET SAVE: ACALL BP MOV @R0 煟 INC R0 DJNZ R2, SET MOV R5,#16 D2S: ACALL BP DJNZ R5, D2S MOV R0,#31H MOV R3,#3 AA1: MOV R2,#8 AA2: MOV P1,#0FFH MOV A, P1 CJNE A,#0FFH, L9 AJMP AA2 L9 ACALL DELAY CJNE A,#0FFH, AA3 AJMP AA2 AA3: ACALL BP CLR C SUBB A, @R0 INC R0 CJNE A,#00H, AA4 AJMP AA5 AA4: SETB 00H AA5: DJNZ R2, AA2 JB 00H 煟 grain of CLR P3.5 L3 MOV R5,#8 ACALL BP DJNZ R4, L3 MOV R3,#3 SETB P3.5 AJMP AA1 AA6: DJNZ R3, AA7 MOV R5,#24 L5: MOV R4,#200 L4: ACALL BP DJNZ R4, L4 DJNZ R5, L5 MOV R3,#3 AA7: MOV R5,#40 ACALL BP DJNZ R5, AA7 AA8: CLR 00H AJMP AA1 BP: CLR P3.7 MOV R7,#250 L2: MOV R6,#124 L1: DJNZ R6, L1 CPL P3.7 DJNZ R7, L2 SETB P3.7 RET DELAY 煟 stops hopes R7,#20 L7: MOV R6,#125 L6: DJNZ R6, L6 DJNZ R7, L7 RET END 4 using explanation If presses a key AN1~AN7 separately on behalf of the numerical code 1~7, presses a key AN0 to represent the numerical code 8. When does not have the key presses down, P1.0~P1.7 is the high level 1, if some key is pressed down, the corresponding mouth line becomes the low level 0. If establishes the password is 61234578, when presses a key AN6 presses down, P1.6 becomes the low level, P1 port other lines is the high level, this time the value which reads from the P1 port is 10111111, saves to the 31H unit password value is 10111111, is also BFH. Ex analogia, saves to 32H to the 38H unit password value respectively is FDH, FBH, F7H, EFH, DFH, 7FH, FEH. When unblanking must according to AN6, cause the setting value which saves from P1 mouth read-in’s first password value and the 31H unit to be the same first, then the order according to AN1, AN2, AN3, AN4, AN5, AN7, AN0 can unlock. Otherwise cannot unlock, simultaneously starts to report to the police. |
51 Research and Design, Electronic Engineers website - Embedded Systems, MCU, DSP, EDA, Test and Measurement, Components, Communications, Power, Microelectronics, Semiconductors
Electronic Design and Research - Electronic Engineers website

