CN1228703C - Pushbutton device and operation method - Google Patents

Pushbutton device and operation method Download PDF

Info

Publication number
CN1228703C
CN1228703C CN 02146960 CN02146960A CN1228703C CN 1228703 C CN1228703 C CN 1228703C CN 02146960 CN02146960 CN 02146960 CN 02146960 A CN02146960 A CN 02146960A CN 1228703 C CN1228703 C CN 1228703C
Authority
CN
China
Prior art keywords
key
button
press module
controller
parallel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
CN 02146960
Other languages
Chinese (zh)
Other versions
CN1493959A (en
Inventor
彭昱钧
何绍钧
叶西城
徐志铭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
HTC Corp
Original Assignee
High Tech Computer Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by High Tech Computer Corp filed Critical High Tech Computer Corp
Priority to CN 02146960 priority Critical patent/CN1228703C/en
Publication of CN1493959A publication Critical patent/CN1493959A/en
Application granted granted Critical
Publication of CN1228703C publication Critical patent/CN1228703C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Input From Keyboards Or The Like (AREA)

Abstract

The present invention relates to a key device which comprises a parallel/serial converting device and a key mould, wherein the parallel/serial converting device and the key mould are coupled with a controller. Keys of the key mould are configured by a parallel type. After the keys are touched, an interruption signal is fed into a controller. After the controller receives the interruption signal, drive electric potential is fed into the key mould, and the key mould generates a parallel signal. After the parallel signal is read and temporarily stored by the parallel/ serial converting device under the controlled of the controller, the parallel signal can be read by a clock signal in a serial way, and thus, the states of the key mould are obtained.

Description

Key device and method of operating
Technical field
The invention relates to a kind of key device and method of operating, and particularly relevant for the read method of a kind of key device and push button signalling thereof.
Background technology
On the circuit design of key device, be comparatively common at present with direct type and two kinds of matrix types.The so-called directly key device of type is meant the general input and output (General purpose Input Output, the GPIO) pin (pin), and directly judged the state of button by controller itself that button are connected directly to controller.Though this kind structure has simply, direct advantage, because of all special-purpose GPIO pin of each button, when the number of keys of needs more for a long time, will take many GPIO pins.Because the GPIO pin of controller is limited, so the GPIO pin of preciousness can't be wasted on the key circuit unbridledly, this is the restriction in the direct type key device design.Directly the type key device also need consider during design except being applied on the more circuit design of number of keys whether the input pin of controller itself has interruption (interrupt) function.When if the pin that uses is not had interrupt function, then controller just needs inquiry constantly to monitor the state of each pin in order to judge whether button is touched; Thus, key device will take controller higher use frequency range and resource.
The matrix type key device in order to save the use of GPIO pin, to develop.This kind key circuit adopts matrix-style to connect up in length and breadth, and each button is arranged on the staggered node of ranks, and gives controller in the mode of scanning with the state reporting of button.Because controller need continue to scan the matrix state that key device is formed,, so also can cause the extra power consumption and the resources allocation of controller so controller itself needs a specific algorithm to cooperate the key-press matrix operate together.On the other hand, because the capable signal of matrix circuit and the input pin that column signal also need be connected to controller, its needed controller pin number not significant minimizing under certain number of keys the time, so the matrix type key device is applied to the more occasion of number of keys usually, computor-keyboard etc. for example.
Personal digital assistant (Personal Digital Assistant, in application PDA), the design of number of keys need be weighed the function demand of product and taking into account of volume; If adopt the matrix type circuit design, required controller GPIO pin does not have way significantly to be reduced, and the controller power supply and the system resource loss that constantly scan key-press matrix and caused, is difficult with acceptance in PDA applications of emphasizing the power supply vitality.If adopt direct type circuit design, because button will inevitably take the controller GPIO pin of some.This measure will be sacrificed the pin number that other circuit can use, and also improve the difficulty on the circuit design.
Summary of the invention
In view of this, purpose of the present invention just provides a kind of key device and method of operating, with the demand number of minimizing controller GPIO pin, and the power consumption of reduction controller and resource use.
According to purpose of the present invention, a kind of key device is proposed, being summarized as follows of this device:
Key device comprises parallel/serial conversion device and key-press module, parallel/serial conversion device and key-press module all couple with controller.Be to adopt the parallel mode configuration between each button in the key-press module, after button is touched, can be with a look-at-me feed-in controller.Controller can make key-press module produce a parallel signal one driving current potential feed-in key-press module after receiving this look-at-me.Controller is modern parallel/and after the serial conversion device reads in parallel signal and kept in, can utilize clock signal parallel signal to be read in the mode of serial, learn the state of key-press module according to this.
For above-mentioned purpose of the present invention, feature and advantage can be become apparent, a preferred embodiment cited below particularly, and conjunction with figs. are described in detail below.
Description of drawings
A kind of key device block scheme of Fig. 1 for being provided according to embodiments of the invention one.
Fig. 2 is the performed push button signalling read method process flow diagram of the key device of Fig. 1.
Fig. 3 is the thin portion structural representation of the key device of Fig. 1.
A kind of key device block scheme of Fig. 4 for being provided according to embodiments of the invention two.
Label declaration
11: controller
12: parallel/the serial conversion device
15: key-press module
41: controller
42: change-over circuit
45: key-press module
210: interrupt taking place
220: output drives current potential
230: read serial signal
240: stop key
411: control circuit
415: identification circuit
KP: I/O pin
DP: parallel signal
LOAD: be written into signal
CLK: clock signal
DATA: serial signal
A, B, C, D: button
Vg: drive current potential
R: resistance
INT: look-at-me
BDP: bits data set
DV: drive current potential
BDS: Bit data
Embodiment
Embodiment one
Please refer to Fig. 1, a kind of key device block scheme that provides according to one embodiment of the present invention is provided for it.Key device comprises parallel/serial conversion device 12 and key-press module 15, in order to be coupled to the controller 11 in the electronic installation, this electronic installation for example is a personal digital assistant.Be to adopt the parallel mode configuration between each button in the key-press module 15, to have extendibility and simplification concurrently.Before key-press module 15 was not touched, the function of the I/O pin KP of controller 11 was an input pin, after key-press module 15 is touched, and can be with a look-at-me feed-in I/O pin KP.Controller 11 can be converted to output connecting pin with the function of I/O pin KP after receiving this look-at-me, and drives current potential feed-in key-press module 15 by I/O pin KP with one, makes key-press module 15 outputs one parallel signals DP.Then, controller 11 will be written into signal LOAD feed-in and walk abreast/serial conversion device 12, make parallel/serial conversion device 12 that parallel signal DP is read in and kept in.Last controller 11 utilize clock signal clk will walk abreast/parallel signal DP in the serial conversion device 12 is converted to serial signal DATA and reads, and can learn the state of key-press module 15 according to serial signal DATA.The method flow that reads push button signalling please refer to Fig. 2.
After key-press module 15 was touched, controller 11 just can judge (step 210) with look-at-me immediately, and will drive current potential feed-in key-press module 15, made key-press module 15 produce parallel signal DP (step 220).Then, parallel signal DP is converted into serial signal DATA after, controller 11 can be judged the state (step 230) of key-press module 15 according to serial signal DATA.If the user continues button, then controller 11 will continue to read serial signal DATA, otherwise just the functional rehabilitation of I/O pin KP will be the input pin, and open its interrupt function is got back to step 210 (step 240).
Then please refer to Fig. 3, it illustrates the thin portion structure of key device.Key-press module 15 can comprise four button A of mutual parallel connection, B, and C, D, before button was not touched, the I/O pin KP of controller 11 had a high level (high level), and the function of I/O pin KP is the input pin.After button A is touched, can be low level (lowlevel) with the high level face of leaving behind of I/O pin KP, formed look-at-me.When controller 11 after I/O pin KP receives into this look-at-me, the function of I/O pin KP can be converted to output connecting pin, and utilize I/O pin KP will drive in the current potential Vg feed-in key-press module 15.
Owing to have only button A to be pressed in four buttons, so have only between resistance R and I/O pin KP for closing (close) state, and be connected to button B, C is unlatching (open) state between three resistance of D and the I/O pin KP.Therefore, resistance R is driven current potential Vg and drives and have high level, and its excess-three resistance is low level, makes key-press module 15 produce 0001 parallel signal (this parallel signal is corresponding to the parallel signal DP of Fig. 1).Clearly, if button A and button C are pressed, key-press module 15 will produce 0101 parallel signal; If all buttons all are pressed, key-press module 15 will produce 1111 parallel signal, so the state of key-press module 15 can be reflected on the numerical value of parallel signal really.
After parallel signal produced, controller 11 can will be written into signal LOAD feed-in parallel/serial conversion device 12 ,/serial conversion device 12 parallel to make utilized parallel mode to read in the memory body in it parallel signal temporary.Then controller 11 only needs the clock signal clk feed-in is walked abreast/serial conversion device 12, parallel signal can be taken out in regular turn, and this is serial signal DATA.Note that the mode of utilizing serial to export again is converted to serial signal DATA with parallel signal DP and exports successively because the present invention utilizes the mode of parallel input once parallel signal DP to be read in parallel/serial conversion device 12; When if the user presses several buttons simultaneously, still can correctly judge the state of each button.
Aspect reduction system resource utilization rate, look-at-me producing method of the present invention has great benefit.Because controller does not need to comprehend key-press module fully before button is touched, have only as the user Shi Caihui that pushes button to produce the look-at-me notification controller, allow controller begin to handle work such as follow-up data input and identification.That is to say that controller is the output signal that just needs to handle key-press module after receiving look-at-me, do not need as conventional practice, to scan or inquire the state of key board unit constantly, so can significantly reduce demand to system resource.
Embodiment two
Then please refer to Fig. 4, a kind of key device block scheme that is provided according to embodiments of the invention two is provided for it.Key device comprises key-press module 45, change-over circuit 42, control circuit 411 and identification circuit 415, and wherein control circuit 411 and identification circuit 415 can be arranged in the controller 41.In key-press module 45 certain (or some) when button was pressed, key-press module 45 was promptly exported a low level look-at-me INT to control circuit 411.After control circuit 411 receives look-at-me INT, just in can driving current potential DV feed-in change-over circuit 42 with a high level, make change-over circuit 42 receive the bits data set BDP that produces by key-press module 45 abreast, wherein bits data set BDP is the situation that is pressed corresponding to key-press module 45, can comprise several Bit datas, for example be 8.After change-over circuit 42 received bits data set BDP, control circuit 411 just can make change-over circuit 42 each Bit data according to the time series ground output bits data set BDP of clock signal clk with clock signal clk feed-in change-over circuit 42; Wherein the Bit data by the output of change-over circuit 42 sequences can be designated as Bit data BDS.After identification circuit 415 receives Bit data BDS, can pick out the button that is pressed according to the data kenel of Bit data BDS.
Key device provided by the present invention and method of operating have the following advantages:
One, can save the use of controller GPIO pin.
Two, do not need to learn key-press status, to save system resource in the mode that scanning can be inquired about.
Three, can be applicable to press simultaneously the occasion of several buttons.
In sum; though the present invention discloses as above with a preferred embodiment; right its is not in order to limit the present invention; any insider; without departing from the spirit and scope of the present invention; when can being used for a variety of modifications and variations, so protection scope of the present invention is as the criterion when looking the accompanying Claim book person of defining.

Claims (9)

1. key device, in order to be installed in the electronic installation, this key device comprises:
One key-press module has at least one button, wherein, when this button is pressed, the exportable look-at-me of this key-press module, and receive a driving current potential, and drive current potential output and this button corresponding one parallel signal according to this;
One parallel/serial conversion device is coupled to this key-press module, in order to receive this parallel signal and to export a serial signal according to this parallel signal; And
One controller, respectively with this key-press module and should couple by parallel/serial switching device, in order to receiving this look-at-me, and export this driving current potential according to this look-at-me, and in order to receiving this serial signal, and judge the state of this part key-press module according to this serial signal.
2. key device as claimed in claim 1, wherein this controller comprises an I/O pin, this key-press module is to couple with this I/O pin.
3. key device as claimed in claim 1, wherein this electronic installation is a personal digital assistant.
4. button inputting circuits comprises:
One key-press module has at least one button, and when this button was pressed, this key-press module was exported a look-at-me, and an output bits data set relative with this button that is pressed, and wherein, this bits data set has a plurality of Bit datas;
One control circuit electrically connects with this key-press module, drives a current potential and a clock signal according to this look-at-me output one;
One change-over circuit, electrically connect with this key-press module and this control circuit respectively, in order to receiving this driving current potential and this clock signal, and receive described Bit data abreast, with the described Bit data of time series ground output according to this clock signal according to this driving current potential; And
One identification circuit electrically connects with this change-over circuit, receives described Bit data in order to sequence ground, and according to this button that is pressed of described Bit data identification.
5. button inputting circuits as claimed in claim 4, wherein, this control circuit and this identification circuit are to be arranged in the controller.
6. button inputting circuits as claimed in claim 4, wherein this look-at-me is to be an electronegative potential.
7. button inputting circuits as claimed in claim 4, wherein this driving current potential is to be a noble potential.
8. button inputting circuits as claimed in claim 4, wherein this group Bit data has 8 bits.
9. a key detecting method is used for a button inputting circuits, and this button inputting circuits comprises a key-press module, a change-over circuit and the controller with at least one button at least, and this key-press input method comprises:
When this button was pressed, this key-press module was exported a bits data set, and wherein, this bits data set is corresponding with this button that is pressed, and this bits data set has a plurality of Bit datas;
Described Bit data inputs to this change-over circuit abreast, walked abreast/serial conversion by this change-over circuit under the control of controller, and sequence ground is from this change-over circuit output; And
Input to described Bit data sequence this controller, this controller is according to this button that is pressed of described Bit data identification.
CN 02146960 2002-10-29 2002-10-29 Pushbutton device and operation method Expired - Lifetime CN1228703C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 02146960 CN1228703C (en) 2002-10-29 2002-10-29 Pushbutton device and operation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 02146960 CN1228703C (en) 2002-10-29 2002-10-29 Pushbutton device and operation method

Publications (2)

Publication Number Publication Date
CN1493959A CN1493959A (en) 2004-05-05
CN1228703C true CN1228703C (en) 2005-11-23

Family

ID=34232909

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 02146960 Expired - Lifetime CN1228703C (en) 2002-10-29 2002-10-29 Pushbutton device and operation method

Country Status (1)

Country Link
CN (1) CN1228703C (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176608B (en) * 2011-12-21 2017-12-22 北京普源精电科技有限公司 A kind of keyboard, control method of keyboard and the signal generator using the keyboard
CN113539723A (en) * 2020-04-20 2021-10-22 安沛科技股份有限公司 Luminous keyboard and control method thereof

Also Published As

Publication number Publication date
CN1493959A (en) 2004-05-05

Similar Documents

Publication Publication Date Title
CN1746824A (en) Method, apparatus and computer-readable medium for key press determination
JP4027285B2 (en) Keypad device
CN1794146A (en) Apparatus and method for controlling key-press of mobile terminal
CN1228703C (en) Pushbutton device and operation method
CN101241461A (en) Keyboard automatic test system and its method
CN202364197U (en) Button detection and LED control circuit
CN1786884A (en) Apparatus for improving key identification accuracy in terminal of requiring multi-keys and method thereof
CN1333947A (en) Low power counter
CN1114283C (en) Button inputting circuits, power supply control device and method
US20030132864A1 (en) Logic Circuit using hardware to process keyboard scanning
CN1159641C (en) Keyboard instruction fetch device for notebook computer
CN101751141A (en) Keyboard circuit
CN1315018C (en) Clock pulse switchover structure and its clock pulse switchover method
CN101741395B (en) Coding method and coding circuit for matrix keyboard
CN201364568Y (en) Electronic whiteboard system adopting multifunctional digital keyboard
EP1498806A1 (en) Keypad device and operation method thereof
CN1251053C (en) Keyboard signal sensor
CN2364508Y (en) Circuit structure with tandem recognition code read-in
CN217113815U (en) Electric piano keyboard control circuit
CN114500274B (en) Plug-and-play conversion circuit and method for peripheral equipment of Internet of things
CN2816909Y (en) Keyboard scanning device
CN1087450C (en) Method and apparatus for keyboard and diode selecting interface circuit
CN1474511A (en) Arbitrarily extensible binary keyboard coding circuit
CN1395218A (en) State machine triggered by gated clock pulse according to initial state, counter and its method
CN1246785C (en) Electronic periphery equipment with double buses

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CX01 Expiry of patent term
CX01 Expiry of patent term

Granted publication date: 20051123