The keyboard is a separate device from the mainframe. It is connected to the mainframe through a 5-core cable. The keyboard interface on the system board accepts the scan code sent by the keyboard according to the response protocol of the serial transmission of the keyboard code. The keyboard is in the scanning process. In the middle, the 7-bit counter loops. When the high 5-bit D6-D2 state is all 0, the decoder outputs a 0 on the O column line, and the rest are 1; and the lower two bits of the counter D1D0 are controlled by the 4-to-1 multiplexer 0-3 Line scan. The counter counts one line and scans one line. All four lines are scanned once, and the counter is internally carried to D2, so that the other line 1 goes low and the line is scanned again. As long as there is no key press, the multiplexer always outputs a high level, and the clock keeps the counter cycled and scans the keyboard. When a key is pressed, if the row and column of the key are scanned, the multiplexer will output a low level to block the clock gate and stop the counter. At this time, the data output by the counter is the position code of the button, that is, the scan code. 8048 Using the program After reading this key code, add an O to the highest bit to form a byte of data, and then output it serially from the P22 pin. After the key is pressed at 8048, the keyboard scan detection is continued to find out if the key is released. When a release is detected, 8048 adds a 1 to the highest bit in front of the 7-bit position code just read, as a release scan code, which is also serially sent out from the P22 pin to distinguish it from the scan code. The purpose of sending the release scan code is to provide conditions for identifying the combination key and the up and down keys.
Computers Keyboard 0 Comments able, September 4, 2019
The meaning of the keyboard
Computers Keyboard able
Keep a good sitting position. You must sit in front of the keyboard in a good posture to avoid straining […]