The 3×4 matrix keyboard is connected to the microcomputer through the parallel interface chip 8255A. Port A of 8255A is defined as the output port, connected to the keyboard row line; port B is defined as the input port, connected to the keyboard column line. Assume that the address of port A of 8255A is 40H, the address of port B is 41H, and the address of the control register is 43H.
MOV AL,82H
OUT 43H,AL
BEGIN:MOV AL,0
OUT 40H,AL
WAIT : IN AL,41H
AND AL,0FH
CMP AL,0FH
JZ WAIT
MOV CX,7FFH
L0: LOOP L0
ST: MOV BL,3
MOV BH,4
MOV AL,0FEH
MOV CL,0FH
MOV CH,0FFH
L1: OUT 40H,AL
ROL AL
MOV AH,AL
IN AL,41H
AND AL,CL
CMP AL,CL
JNZ L2
ADD CH,BH
MOV AL,AH
DEC BL
JNZ L1
JMP BEGIN
L2: INC CH
RCR AL
JC L2
MOV AL,CH
JMP KEYTABLE
Figure 12-1 Non-encoded keyboard interface hardware block diagram
Previous article:Introduction to Integrated Function Generator 8038
Next article:How the keyboard works
- Popular Resources
- Popular amplifiers
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
- 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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- Principle and design of flyback switching power supply
- EEWORLD University Hall----Live Replay: MPS Inductor Solutions Help Better Switching Power Supply Design
- High-precision humidity and temperature sensor
- 【NUCLEO-L552ZE Review】+ Planning & Preparation
- After cc2530 successfully creates a network, p1_0 immediately becomes low level
- RF and Microwave Passive Component Design Considerations and Limitations
- Let's see! Detailed explanation of the components of a switching power supply
- SCI Interface and Hardware Implementation of TMS320C6711D
- Non-magnetic AC/DC Power Supplies
- S5PV210 Timer