Electronic combination lock
1. Circuit schematic diagram
2. Hardware connections on the system board (1). Connect P0.0/AD0 in the "MCU System" area to the SPKIN terminal in the "Audio Amplification Module" area with a wire; (2). Connect the SPK OUT terminal in the "Audio Amplification Module" area to the speaker; (3). Connect P2.0/A8-P2.7/A15 in the "MCU System" area to any ABCDEFGH terminal in the "Four Static Digital Display" area with an 8-core cable; (4). Connect P1.0 in the "MCU System" area to the L1 terminal in the "Eight-way LED Module" area with a wire; (5). Connect P3.6/WR and P3.7/RD in the "MCU System" area to the SP1 and SP2 terminals in the "Independent Keyboard" area with wires;
3. Programming content (1). Password setting, in this program, the password is fixed in the program memory ROM. It is assumed that the default password is "12345", a total of 5 digits. (2). Password input problem: Since two keys are used to complete the password input, one of the keys is a function key and the other is a numeric key. During the input process, first enter the length of the password, then enter the number of digits of the password according to the length of the password, until all password lengths have been entered; or the password input process can be completed only after the confirmation function key is entered. Enter the password judgment and comparison processing status and give the corresponding processing process. (3). Key disable function: During initialization, the key is allowed to enter the password. When a button is pressed and the key recognition state begins, the key disable function is activated, but the activated state occurs when the password is entered incorrectly three times.
4. C language source program #includeunsigned char code ps[]={1,2,3,4,5};unsigned char code dispcode[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f, 0x……
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet