Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and circuit for detecting press key

A detection method and detection circuit technology, applied in the direction of dynamic coding, etc., can solve the problems of multi-single-chip microcomputer IO port resources, high cost and occupation of single-chip microcomputers, and achieve the effects of simple circuit structure, improved reliability, and reduced cost

Inactive Publication Date: 2010-08-04
中山市嘉科电子有限公司
View PDF0 Cites 23 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] There are many home appliances on the market with button input, most of which are controlled by single-chip microcomputers. Common keyboard scanning methods generally use matrix scanning, which needs to use multiple IO ports of single-chip microcomputers, such as keyboards with 12 keys. Button recognition requires 7 IO ports (3 rows and 4 columns or 3 columns and 4 rows) to complete. This kind of button detection takes up more IO port resources of the single-chip microcomputer. When there are more IO ports of the single-chip microcomputer, the cost of the single-chip microcomputer will be higher

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
  • Method and circuit for detecting press key
  • Method and circuit for detecting press key
  • Method and circuit for detecting press key

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] figure 1 It is a flowchart of the button detection method of the present invention, and the method includes the following steps:

[0026] a) Set the button detection circuit: ground one end of multiple buttons, connect the other ends of the buttons through voltage divider resistors of different resistances to form a voltage signal detection terminal, and pass the voltage signal detection terminal through a resistor Then connect it to the power supply, and connect the interrupt input IO port and A / D conversion input IO port of the single-chip microcomputer to the voltage signal detection terminal;

[0027] b) Detect whether there is a key press: set the interrupt input IO port as a falling edge trigger interrupt, and use the interrupt input IO port of the microcontroller to detect the voltage at the voltage signal detection terminal. If no key is pressed, the interrupt input IO port of the microcontroller The detected voltage is equal to the power supply voltage, and the sing...

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 discloses a method for detecting a press key. The method comprises the following steps: setting a circuit for detecting the press key; detecting whether the press key is pressed down; carrying out voltage A / D conversion; judging which press key is pressed down concretely; and waiting for the press keys to be pressed down next time. The invention also discloses the circuit for detecting the press key, which comprises a plurality of divider resistances with different resistance values and a singlechip, wherein one end of each divider resistance is respectively and correspondingly connected with one end of each press key; the other ends of a plurality of press keys are earthed; the other ends of a plurality of divider resistances are connected together to form a voltage signal detecting end; the voltage signal detecting end is connected to a power supply after passing through another resistance; and a multiplexed IO port of the singlechip, which serves as both an interrupt input IO port and an A / D conversion input port, is connected to the voltage signal detecting end. The method and the circuit for detecting the press key are characterized by capability of realizing scanning dozens of press keys only by utilizing one or two IO ports of the singlechip and have the advantages of few occupied IO ports of the singlechip, low cost of the singlechip and the like.

Description

[Technical Field] [0001] The invention relates to a button detection method and a button detection circuit. [Background technique] [0002] There are many home appliances on the market with key input, most of which are controlled by a single-chip microcomputer. The common keyboard scanning method generally uses matrix scanning, which requires multiple IO ports of the single-chip microcomputer, such as a 12-key keyboard. Button recognition needs to use 7 IO ports (3 rows and 4 columns or 3 columns and 4 rows) to complete. This button detection occupies more MCU IO port resources. When the MCU has more IO ports, the required MCU cost It will be higher. [Summary of the Invention] [0003] The present invention overcomes the shortcomings of the above-mentioned technology and provides a button detection method, by which dozens of buttons can be scanned by using only a few IO ports of the single-chip microcomputer, so that the circuit structure is very simple, and the reliability is hi...

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
Patent Type & Authority Applications(China)
IPC IPC(8): H03M11/20
Inventor 俞峰赵胜娟
Owner 中山市嘉科电子有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products