Keyboard scanning circuit and scanning method thereof

A keyboard scanning and scanning method technology, applied in the field of scanning, can solve the problems of increased cost of matrix keyboards, occupation of matrix keyboards, reduced stability of matrix keyboards, etc., and achieves strong circuit structure stability, fewer I/O ports, and concise scanning methods. Effect

Inactive Publication Date: 2011-06-29
QINGDAO WINDAKA TECH
View PDF6 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Using this kind of keyboard circuit, if the number of keys is N×N, the processor needs to have 2N I/O ports, and the keyboard occupies more I/O ports. For processors with tight I/O ports It is undoubtedly a large waste of resources
[0004] In order to solve the above-mentioned problem that the matrix keyboard occupies a large number of I/O ports, some electronic devices add a large number of comp

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Keyboard scanning circuit and scanning method thereof
  • Keyboard scanning circuit and scanning method thereof
  • Keyboard scanning circuit and scanning method thereof

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0029] to combine figure 2 , a keyboard scanning circuit, including a processor with N I / O ports P1~Pn, N row lines L1~Ln and N column lines V1~Vn, and buttons K11~Knn are arranged at the crossing positions of the row lines and column lines , one end of the button is connected to the row line, and the other end is connected to the column line.

[0030] Each I / O port of the processor is a bidirectional I / O port with a pull-up resistor, the N row lines L1-Ln are respectively connected to a load resistor R1-Rn and then grounded, and one end of the N column lines V1-Vn Connect the I / O ports P1 to Pn of the processor respectively. The row lines from top to bottom are the first row line L1, the second row line L2, the third row line L3...the Nth row line Ln, and the column lines are the first column line V1 and the second column from left to right Line V2, 3rd column line V3...Nth column line Vn, 1st row line L1 and Nth column line Vn combination, 2nd row line L2 and N-1th column...

Embodiment 2

[0033] to combine figure 2 The scanning method of keyboard scanning circuit comprises the following steps:

[0034] (1) Initialize the N I / O ports of the processor, set each I / O port to an input state, and enable the pull-up resistor on the port.

[0035] (2) Read the level status of each I / O port. If the level status of the I / O port connected to the i-th column line is low, it means that the button on the i-th column line where the port is located is pressed, then Proceed to step (3); if no I / O port level status is low, return to step (1) to continue execution.

[0036] (3) Cancel the pull-up resistors on each I / O port, set the I / O port connected to the i-th column line as output, set the level state as high, and set the other I / O ports as low.

[0037] (4) Read the level status of each I / O port. If the level status of the I / O port connected to the j-th column line is high, it indicates the position where the N+1-j-th row line crosses the i-th column line The key on is pr...

Embodiment 3

[0039] to combine figure 2 , image 3 , Figure 4 , Figure 5 , the internal pull-up resistors of N I / O ports P1~Pn are 10,000-ohm level Z1~Zn respectively. When the matrix keyboard circuit is scanning, all I / O ports are set as input, and the pull-up resistors on the ports are enabled. When the i-th column Vi where the port Pi is located is not pressed, the equivalent circuit connected to the port Pi is as follows: image 3 As shown, the port Pi is connected to the power supply VCC (high level) through the pull-up resistor Zi, and connected to the ground wire through the mega-ohm resistance element Mn+1-i and the kilo-ohm resistance element Rn+1-i. When the voltage of the port Pi is (Mn+1-i+Rn+1-i)×VCC / (Mn+1-i+Rn+1-i+Zi), the input register PIN of the port Pi is at a high level.

[0040] When a button is pressed in the i-th column Vi, the equivalent circuit of the port Pi connected to the i-th column Vi is as follows Figure 4 As shown, the port Pi is connected to the po...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to a keyboard scanning circuit and a scanning method thereof, wherein the keyboard scanning circuit comprises a processor with N I/O (input/output) ports, N row lines and N column lines; keys are arranged on the intersections of the row lines and column lines; and one end of each key is connected with a row line, and the other end of the key is connected with a column line. Each I/O port of the processor is a bidirectional I/O port with a pull-up resistor; each row line is connected with a load resistor and then grounded; one end of each column line is connected with an I/O port of the processor; one row line is in pair-wise combination with one column line; a voltage division resistor is arranged between the row line and column line in the pair-wise combination; andthe pull-up resistor, the voltage division resistor and the load resistor in each combination form a tandem passage. The keyboard scanning circuit is only required a processor with 2N resistor elements and N I/O ports to finish scanning of N*N keys, has the advantages of strong stability in circuit structure and the like, occupies the fewer I/O ports of the processor, and is low in the manufacturing cost.

Description

technical field [0001] The invention relates to a matrix keyboard scanning circuit and a scanning method of the matrix keyboard scanning circuit. Background technique [0002] A keyboard is an important human-computer interaction component in an electronic device, and most keyboards use a processor I / O port to scan the keyboard. Existing keyboard circuits such as figure 1 The 4×4 matrix keyboard is shown as an example, including 16 keys arranged in 4 rows and 4 columns. Each row line and each column line need to be connected to an I / O port. This keyboard requires 8 I / O ports. By analogy, an N×N matrix keyboard circuit requires 2N I / O ports. The scanning of the keyboard adopts the row and column scanning method to determine the row and column position of the pressed button. [0003] The row-column scanning method refers to: setting the I / O port corresponding to the row line of the button as an output port, and setting the I / O port corresponding to the column line as an inp...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): H03M11/20
Inventor 于瑞升管延成王伟王敏闫从振李立志
Owner QINGDAO WINDAKA TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products