1. The independent keyboard is driven by an I/O port of the microcontroller. If the developed system needs to use many keys, in order to save I/O ports, we generally use a 4*4 keyboard, so that only one 8-bit I/O port is needed to drive 16 keyboards.
2. Key detection (detecting which key is pressed):
For the circuit in the figure above, first let P3 output 1111 0000, then start reading P3, according to the concept of line and, if one of P34~P37 is detected to be 0 (assuming P35 is 0), the column where the key is located can be determined; then conversely, P3 outputs 1101 1111 (the high bit keeps the value of the last detection), and also according to the concept of line and, if one of P30~P33 is detected to be 0 (assuming P30 is 0, then P3 is 1101 1110), the row where the key is located can be determined, thus determining the position of the pressed key. The entire detection time will definitely be less than the time it takes to press the key (about 20ms).
(Note: The concept of line AND - the high and low levels at both ends of the switch are ANDed, and the result is the level value of the entire line after the switch is closed)
Previous article:Embedded Learning Notes 1——Preparatory Knowledge of 51 MCU
Next article:Embedded Learning Notes 13——51 MCU D/A Converter
Recommended ReadingLatest update time:2024-11-16 15:38
- Popular Resources
- Popular amplifiers
- Semantic Segmentation for Autonomous Driving: Model Evaluation, Dataset Generation, Viewpoint Comparison, and Real-time Performance
- Machine Learning and Embedded Computing in Advanced Driver Assistance Systems (ADAS)
- Intelligent program synthesis framework and key scientific problems for embedded software
- arm_embedded_machine_learning_design_dummies_guide
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Find high frequency load resistor data
- EEWORLD University Hall----Engineering Application of Random Signal Analysis
- On the last day of 2019, make a New Year’s wish for 2020!
- How to use Labview to perform secondary development on Ginkgo 2
- Design principle and usage of true random number generator of low power MCU RJM8L303
- How to make an elevator controller based on 8952 microcontroller?
- Interpretation of JTAG interface for embedded development ARM technology
- EEWORLD University ---- Jixin STM32 Smart Car
- Experience in using PWM of 28069 and 28377D of C28x series
- At 10:00 this morning, we invite you to listen to the award-winning live broadcast: ADI's digital active noise reduction headphone solution allows technology to calm us down~