Features of this work:
Supports a maximum I/O port flip speed of 10MHz;
Large number of keys, 64 keys, can be expanded;
Hardware debouncing, no software delay required;
Interrupt mode outputs key press signal to save MCU resources.
This piece has 5 pins:
1.VCC (supports 3.3V-6V)
2.GND (public ground)
3.INT: Interrupt output port. When any button is pressed, it outputs a low level. After the button is released, it returns to high level.
4.CLK: Clock input port, the rising edge is valid; when the button is pressed, the MCU gets the interrupt trigger signal, and the microcontroller outputs a rising edge to CLK, making the keyboard in a readable state. At the same time, the DATA port of the keyboard spits out a bit, and then the microcontroller Then output 15 rising edges to CLK, and the keyboard outputs a total of 16 bits, which is two unsigned char;
5.DATA: Keyboard serial data output pin. In the reading state, a bit is output after each rising edge of the clock.
Fundamental:
The button, resistor, capacitor and 74HC14 form a button debounce circuit. After the button is pressed, a jitter-free signal is output;
74HC165 is responsible for temporarily registering the status of the button (parallel signal) and spitting it out in serial mode on the rising edge of the clock;
74HC30 is responsible for detecting whether a button is pressed. When pressed, the 74HC30 output terminal flips;
The two Schmitt triggers of IC3 (74HC14) and 74HC00 and 74HC74 form a simple state machine. When the button is pressed, the 74HC165 is in the merged state and the button state is read; 74HC74 is reset on the first rising edge of the clock , putting the 74HC165 in the string-out state. The state machine uses the principle of action delay on the rising edge of the D flip-flop. When the first rising edge of the clock comes, the D flip-flop has not yet acted, so the 74HC165 is still in the merged state.
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