A method for a single-chip microcomputer to identify a key pressing operation

A single-chip and key-press technology, which is applied in the field of single-chip identification of key-pressing operations, can solve problems such as affecting the real-time performance of the system, increasing hardware costs, occupying system time, etc., and achieving the effects of fast recognition speed, less use of resources, and high real-time performance.

Pending Publication Date: 2019-05-17
HUIZHOU BLUEWAY ELECTRONICS
View PDF9 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The present invention provides a method for single-chip microcomputer to identify button press operation, and the technical problem to be solved is: the traditional method of setting different buttons to distinguish different functions is not concise enough, and additional single-chip microcomputer pins are needed, and the hardware cost will also increase; And, the traditional button debounce method adopts the delay delay function, which takes up system time and affects the real-time performance of the system

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
  • A method for a single-chip microcomputer to identify a key pressing operation
  • A method for a single-chip microcomputer to identify a key pressing operation
  • A method for a single-chip microcomputer to identify a key pressing operation

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0051] The implementation of the present invention will be explained in detail below in conjunction with the accompanying drawings. The examples are given for illustrative purposes only, and should not be understood as limiting the present invention, including the selection and value of the components and the accompanying drawings. Examples are for reference and illustration only, and do not constitute a limitation to the patent protection scope of the present invention, because many changes can be made to the present invention without departing from the spirit and scope of the present invention.

[0052] see figure 1 A flow chart of steps, a method for a single-chip microcomputer to identify a key press operation provided by an embodiment of the present invention, the key is connected to an IO port of the single-chip microcomputer, specifically including the steps:

[0053] S1. After the first preset time period is delayed when the button is pressed for the first time, count ...

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 the technical field of key detection, and particularly discloses a method for a single-chip microcomputer to identify a key pressing operation, which comprises the following steps of S1, counting a second preset time period comprising a third preset time period after detecting that the key pressing time delay is delayed for a first preset time period for the first time; S2, judging whether a key pressing operation mark exists in the second preset time period or not, and if yes, judging that the key executes the corresponding key pressing operation. According to the invention, one IO port of the single-chip microcomputer is connected with the button, the single click, double click, multiple click, long press and other operations of the identification button are carried out, and only one pin of the single-chip microcomputer is needed to realize multifunctional identification of one button, so that the use resource is less, and the cost is saved. According to themethod, delay jitter elimination processing is firstly carried out by adopting a flag bit detection method, the program running time is not occupied, the waiting time is shortened compared with that of a traditional method, the detection time of each key is not influenced and is not influenced mutually even if more keys need to be detected, the real-time performance is high, and the recognition speed is high.

Description

technical field [0001] The invention relates to the technical field of button detection, in particular to a method for a single-chip microcomputer to identify button pressing operations. Background technique [0002] Simplicity is one of the elements pursued by modern people, and a simple but functional product is more popular. Arrange fewer buttons on the control panel, and use one button on the handle of the handheld product to control different functions, without moving fingers to press different buttons to control different functions, which is convenient for users to use. Buttons can distinguish different functions by judging single-click, double-click, multi-click, and long-press. The traditional method is to set different buttons to distinguish different functions. This method is not only not simple enough, but additional pins of the microcontroller are needed, and the hardware cost will also increase. [0003] The traditional button debounce method is to detect tha...

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): G06F3/023G06F13/12
Inventor 梁缉选刘辉朱立湘尹志明
Owner HUIZHOU BLUEWAY ELECTRONICS
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