CN101359034B - Keyboard detection circuit and method thereof - Google Patents

Keyboard detection circuit and method thereof Download PDF

Info

Publication number
CN101359034B
CN101359034B CN2007101413497A CN200710141349A CN101359034B CN 101359034 B CN101359034 B CN 101359034B CN 2007101413497 A CN2007101413497 A CN 2007101413497A CN 200710141349 A CN200710141349 A CN 200710141349A CN 101359034 B CN101359034 B CN 101359034B
Authority
CN
China
Prior art keywords
switch
trigger
circuit
charging
electric capacity
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 - Fee Related
Application number
CN2007101413497A
Other languages
Chinese (zh)
Other versions
CN101359034A (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.)
HUAXI SEMICONDUCTOR CO Ltd
Original Assignee
HUAXI SEMICONDUCTOR CO Ltd
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 HUAXI SEMICONDUCTOR CO Ltd filed Critical HUAXI SEMICONDUCTOR CO Ltd
Priority to CN2007101413497A priority Critical patent/CN101359034B/en
Publication of CN101359034A publication Critical patent/CN101359034A/en
Application granted granted Critical
Publication of CN101359034B publication Critical patent/CN101359034B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Input From Keyboards Or The Like (AREA)

Abstract

The invention discloses a key detection circuit, comprising a switching circuit unit and a control unit. The switching circuit unit is used to output a charging voltage signal and comprises a plurality of operating switches which decide the capacitance value of an equivalent resistor. The control unit receives the charging voltage signal from the switching circuit unit, detects a charging time passed when the charging signal rises to a high potential from a low potential, and decides a corresponding output signal based on the charging time. The key detection circuit can realize the functions of a plurality of key devices through a single chip pin.

Description

Key press detecting circuit and method thereof
Technical field
The invention relates to a kind of key press detecting circuit and method thereof, and particularly relevant for a kind of key press detecting circuit and method thereof that only detects a plurality of keyswitches with the one chip pin.
Background technology
Push-button switch device has been widely used on many electronic products, and it is in order to carry out the triggering of an input instruction.And in general key press detecting circuit device, its design is button palpus collocation one a chip pin (pin), utilizes the operation of the simple switch ways/mode that opens circuit corresponding intrument.That is when pressing arbitrary button, promptly constitute a short circuit this moment, and the electronic circuit that is connected detects a magnitude of voltage because of short circuit, general as 3.3V or 5V voltage, and make the reaction of a correspondence.
But along with the demand on the multifunctional application, the designer trends of button are more and more, yet the chip pin number of required correspondence just must increase general and then cause burden on the packaging cost like this thereupon.The design that has at present utilizes the matrix-scanning mode, props up the state that the chip pin detects AxB keyswitch with A+B, though reduced the use number of chip pin, it still has by bond number many more, the also corresponding problem that increases of required chip pin.
Therefore need a kind of design of keyswitch,, and can reduce the cost that is caused because of the increase of chip pin count except the number of avoiding button setting traditionally is subjected to the problem of chip pin numerical limitations.
Summary of the invention
Therefore a purpose of the present invention is to provide a kind of key press detecting circuit and method thereof exactly, realizes the function of many key devices by the one chip pin.
Another object of the present invention is to be to provide a kind of key press detecting circuit and method thereof, in order to save the cost of chip pin and encapsulation.
According to above-mentioned purpose of the present invention, a kind of key press detecting circuit is proposed.Key press detecting circuit comprises an on-off circuit unit and a control module.The on-off circuit unit is in order to exporting a charging signals, and comprises most operating switchs, and each operating switch determines an equivalent resistance capacitance value in the circuit.Charging signals is to continue to rise in time between a charge period, and this charging signals indication is an electric potential signal.Control module is received between charge period, from the charging signals of on-off circuit unit, and detects this voltage signal between charge period, rises to noble potential institute elapsed time by electronegative potential, and it is defined as between charge period.More determine the output signal of a correspondence according to the duration of charging.
According to a preferred embodiment, the on-off circuit unit comprises a switch module and an electric capacity.The switch module comprises most operating switch groups, and the operating switch group comprises an operating switch and a switch resistance of mutual parallel connection.Series connection mutually between the operating switch group.One chip pin is coupled between the electric capacity and control module of on-off circuit unit, electric capacity one end ground connection, and the other end couples switch module and chip pin.
Electric capacity also couples the discharge circuit module, so as to carrying out the action of discharge.Control module and chip pin couple, to receive voltage signal via the electric capacity high-pressure side of chip pin, calculate this voltage signal by an electronegative potential rise to a noble potential duration of charging of process, determine a corresponding output signal according to the duration of charging.
When pushing at least one operating switch, whole charge circuit can present the equivalent resistance of a correspondence.When electric capacity begins to charge, this moment, the voltage signal of electric capacity high-pressure side reached control module via the chip pin, and control module is followed the calculating voltage signal and risen to the time that a high electric potential is experienced by an electronegative potential, and this is capacitor charging time.Control module is sought out a corresponding output signal according to capacitor charging time after calculating capacitor charging time, give other unit in the device with the information that each switch immediate status is provided.
According to another preferred embodiment of the present invention, the on-off circuit unit comprises a switch module and a resistance.The switch module comprises most operating switch groups, and each operating switch group comprises an operating switch parallel with one another and a switching capacity, and parallel with one another between the operating switch group.Resistance is coupled between voltage source and the switch module.The chip pin is coupled to the switch module and couples between the control module, transmits a chip pin and couples the voltage signal of end to control module.
The present invention also proposes the method that a kind of button detects, and comprising: push a switch, to produce an equivalent resistance capacitance value in the circuit, circuit is charged, detects a duration of charging of this circuit and determines a corresponding output signal according to the duration of charging.
Be combined to form the simple circuit of a framework by operating switch, electric capacity and resistance, cooperate the resistance capacitance charge-discharge principle, with the corresponding different capacitor charging time of different equivalent resistance capacitance value, the present invention has realized can detecting with the one chip pin path off state of a plurality of keyswitches in the key device, has very important advantage on the saving cost.
Description of drawings
For above-mentioned purpose of the present invention, feature and advantage can be become apparent, below in conjunction with accompanying drawing the specific embodiment of the present invention is elaborated, wherein:
Fig. 1 illustrates the circuit diagram according to key press detecting circuit one preferred embodiment of the present invention.
Fig. 2 A illustrates according to the synoptic diagram between the electric capacity charge period in key press detecting circuit one preferred embodiment of the present invention.
Fig. 2 B illustrates the synoptic diagram according to interdischarge interval after the electric capacity charging is finished in key press detecting circuit one preferred embodiment of the present invention.
Fig. 2 C illustrates according to during most individual capacitor charge and discharge processes in key press detecting circuit one preferred embodiment of the present invention, the waveform corresponding diagram of the signal waveform of the signal waveform of electric capacity high-pressure side and trigger output terminal.
Fig. 3 illustrates according to all on off state combinations in key press detecting circuit one preferred embodiment of the present invention and corresponding duration of charging table thereof.
Fig. 4 illustrates the flow chart of steps of method one preferred embodiment that detects according to button of the present invention.
Fig. 5 illustrates the synoptic diagram of another aspect of discharge circuit module configuration among Fig. 1.
Fig. 6 illustrates the circuit diagram according to another preferred embodiment of key press detecting circuit of the present invention.
Fig. 7 illustrates the process flow diagram according to keyswitch state judging method in the preferred embodiment of the present invention.
The main element symbol description
102: voltage source 110: the switch module
112a: the first operating switch group 112b: the second operating switch group
112c: the 3rd operating switch group 114a: first operating switch
114b: the second operating switch 114c: the 3rd operating switch
116: electric capacity high-pressure side 120: the chip pin
130: discharge circuit module 132: discharge switch
132a: the first end 132b: second end
132c: control end 140: control module
142: control circuit 142a: the control circuit input end
142b: control circuit output terminal 144: corresponding tables
146: trigger 146a: the trigger input end
146b: trigger output terminal 150: signal transmssion line
160: integrated circuit (IC) chip 172: the signal waveform of electric capacity high-pressure side
172a: the 172b of electric capacity high-pressure side between charge period: interdischarge interval electric capacity high-pressure side
The signal waveform of signal waveform
174: the signal wave 174a of trigger output terminal: trigger output terminal between charge period
The signal waveform of shape
174b: interdischarge interval trigger output 180: electric capacity
The signal waveform 100 of end: on-off circuit unit
200: on-off circuit unit 202: voltage source
210: switch module 212a~212e: operating switch group
214a~214e: operating switch 216: the chip pin couples end
220: chip pin 230: the discharge circuit module
232: discharge switch 240: control module
242: control circuit 246: trigger
280: resistance
402~412: step 702~710: step
R0: reference resistance R1: first switch resistance
R2: 3: the three switch resistances of second switch resistance R
C1~C5: switching capacity
Embodiment
The present invention is by comprising the on-off circuit unit that resistance, electric capacity and operating switch make up, and cooperation resistance capacitance charge-discharge principle, produce different equivalent resistance capacitances (RC value) with different button actions, and different RC value can the corresponding different circuit duration of charging.Judge the mode of operation of button with duration of charging or equivalent resistance capacitance, reaching only needs the action output that a chip pin can corresponding a plurality of buttons.Below will clearly demonstrate spirit of the present invention with accompanying drawing and detailed description, as the person skilled in the art after understanding preferred embodiment of the present invention, when can be by the technology of teachings of the present invention, change and modification, it does not depart from the scope of the present invention.
With reference to Fig. 1, it illustrates the circuit diagram according to key press detecting circuit one preferred embodiment of the present invention.Key press detecting circuit of the present invention comprises an on-off circuit unit 100 and a control module 140.On-off circuit unit 100 comprises most operating switch 114a~114c, each operating switch push an all corresponding equivalent resistance capacitance value that goes out entire circuit.
Control module 140 is received between charge period, from the charging signals of on-off circuit unit 100, is a voltage signal, and continues change in time between charge period.Control module 140 also detects this voltage signal between charge period, rises to noble potential institute elapsed time by electronegative potential, and it is defined as between charge period.And determine the output signal of a correspondence according to the duration of charging, reach the function of many key devices.
In a preferred embodiment, on-off circuit unit 100 comprises a switch module 110 and an electric capacity 180.Switch module 110 1 ends couple a voltage source 102, other end coupling capacitance 180, and comprise most operating switch group 112a~112c.Each operating switch group is to be formed in parallel by an operating switch and a switch resistance, and is mutual series connection between the operating switch group.For example transmit charging signals between on-off circuit unit 100 and the control module 140 by a chip pin 120.Therefore the charging voltage of being transmitted etc. is positioned at the point that chip pin 120 couples on-off circuit unit 100.Electric capacity 180 1 end ground connection, the other end 116 couples switch module 110 and chip pin 120.
The electric capacity 180 of chip pin 120 1 ends and on-off circuit unit 100 couples, and the other end then couples control module 140, with the voltage signal that transmits electric capacity high-pressure side 116 in control module 140.Control module 140 detect with the calculating voltage signal by an electronegative potential rise to a noble potential the capacitor charging time of process, determine a corresponding output signal according to the duration of charging.
Key press detecting circuit also comprises a discharge circuit module 130.Discharge circuit module 130 couples with electric capacity high-pressure side 116, and in order to providing electric capacity 180 1 discharge approach, the signal that receives according to control end is finished the discharge work of electric capacity 180.
Control module 140 comprises a trigger 146 and a control circuit 142.Trigger 146 has a trigger input end 146a and a trigger output terminal 146b, and trigger input end 146a and chip pin 120 couple, and trigger output terminal 146b couples the control circuit input end 142a of control circuit 140.Discharge circuit module 130 is coupled to electric capacity 180, to provide electric capacity 180 1 discharge approach.
Discharge circuit module 130 comprises a discharge switch 132, can use a transistor switch, for example the n-MOS transistor.Discharge switch 132 has one first end 132a, one second end 132b and a control end 132c, the first end 132a ground connection wherein, the second end 132b is connected with chip pin 120, that is being coupled to trigger input end 146a, control end 132c is coupled to the control circuit output terminal 142b of control circuit 142.
When pushing at least one operating switch, whole charge circuit has the equivalent resistance capacitance of a correspondence, treats that the moment that electric capacity 180 has discharged just begins to charge again, perhaps, behind discharge off, determines optimal charge time row charging again by control circuit 142.See through chip pin 120 this moment, control module 140 receives the voltage signal of electric capacity high-pressure sides 116, and the calculating voltage signal rises to the time that noble potential experiences by electronegative potential, and this is capacitor charging time.Control module 140 is sought out a corresponding output signal according to capacitor charging time after calculating capacitor charging time, and this corresponding output signal is output in a signal transmssion line 150.
The switch module 110 reference resistance R0 that more connects is used to avoid be in conducting state when all operations switch, that is all switch resistances are during by bypass, and the total resistance value in the charge circuit is reduced to 0 situation and taken place.For ease of the design of digital circuit, the value of R0 is identical with switch resistance R1 usually.The trigger 146 that uses is a Schmidt trigger (Schmitt Trigger).
The present invention also considers when most operating switch conductings simultaneously, for avoiding two kinds of situation generations that the operating switch state produces same equivalent resistance capacitance in the loop, the selection of all switch resistances is according to a kind of rule, promptly with N^0, N^1, N^2 ..., the rule of N^ (M-1) selects switch resistance for use, wherein N represents arbitrary positive for example 2, and M is the operating switch that is provided with in the device or the number of switch resistance.
Below will be the example explanation with the switch of three buttons, it has eight kinds of on off states, and selecting for use of switch resistance is followed successively by R*2^0, R*2^1, R*2^2, and N=2 has its advantage in an embodiment.Because will have between the combination of all additions apart is 1 interval, this characteristic helps the simplification of digital operational circuit, and can allow the resistance value difference between each switch resistance dwindle as far as possible, to avoid the difficulty on the practicability.The number of switch of the present invention is not limited to the described person of embodiment, for example when the operating switch number is five, has 2^5=32 kind state.The switch resistance of selecting for use is respectively the resistance of 1R, 2R, 4R, 8R, 16R ohm, and just forms 32 kinds of addition combinations, does not repeat.
With the mouse apparatus with three buttons is example.One mousebutton promptly is equivalent to an operating switch group, the switch resistance that comprises an operating switch and a parallel connection, the i.e. first operating switch 114a parallel connection first switch resistance R1, second operating switch 114b second switch resistance R in parallel, 2, the three operating switch 114c the 3rd switch resistance R3 in parallel.When operating switch is the state that closes, promptly constitutes short circuit and make the electric current operating switch of flowing through, bypass cock resistance.The state that is out when operating switch forms one and opens circuit, the electric current switch resistance of flowing through.
The value of the first switch resistance R1, second switch resistance R 2 and the 3rd switch resistance R3 is respectively 1R, 2R and 4R.Except series connection mutually between the first operating switch group 112a, the second operating switch group 112b, the 3rd operating switch group 112c, the reference resistance R0 that also connects simultaneously, its value is selected 1R for use, simply and conveniently to separate the state of other switch combination.
Electric capacity 180 1 end ground connection, 116 of electric capacity high-pressure sides are connected to the 3rd an operating switch group 112c and a chip pin 120 simultaneously.This chip pin 120 is to be connected in an integrated circuit (IC) chip 160, particularly, it is connected to the second end 132b of a transistor switch 132 of integrated circuit (IC) chip 160 and the trigger input end 146a of a Schmidt trigger 146 simultaneously, and the trigger output terminal 146b of Schmidt trigger 146 then couples the control circuit input end 142a of a control circuit 142.And an output terminal 142b of control circuit 142 is connected to a control end 132c of transistor switch 132.The first end 132a of transistor switch 132 is ground connection then.
When electric capacity 180 under no Charge Storage state wherein, for example during discharge off, because the voltage source 102 on the charge circuit can continue electric capacity 180 is charged, the high-pressure side voltage 116 of electric capacity 180 will be continued to rise by 0V, this moment, Schmidt trigger input end 146a still was under the low-voltage, not arriving at its low-voltage transition is high-tension high-order predetermined value, so its output voltage maintains the low-potential signal state, and control circuit 142 is because the voltage of trigger 146 outputs is the low-potential voltage signal, and make transistor switch 132 be in off state, so electric capacity 180 can not discharge.
When the voltage charging of electric capacity high-pressure side 116 reaches the high-order predetermined value that Schmidt trigger 146 sets, the voltage transition of trigger 146 outputs presents a high-potential voltage signal, control circuit 142 receives this high-potential voltage signal, and export a control signal by control circuit output terminal 142b, the control end 132c voltage of transistor switch 132 is increased to is in conducting state, this moment, electric capacity high-pressure side 116 was just as ground connection, immediately discharge via chip pin 120 and transistor switch 132, the voltage of electric capacity high-pressure side 116 drops to apace near 0V.
When the voltage of electric capacity high-pressure side 116 descends when reaching Schmidt trigger 146 and being the low level predetermined value of low pressure by the high pressure transition, the output voltage signal of Schmidt trigger 146 transfers low-potential signal to by high potential signal.Control circuit 142 is a low-potential signal because of trigger 146 output voltages, thereby oxide-semiconductor control transistors switch 132 is in off state, so electric capacity 180 stops to discharge.In the case, be to provide the information of voltage of electric capacity to give control circuit 142 by trigger 146, control circuit 142 is according to the charge-discharge mechanism of this information Control electric capacity 180.The said procedure that continues, after each discharge finished, electric capacity will enter charge cycle once again, so entire circuit goes round and begins again, and continued to continue running with the circulation that discharges and recharges.
Perhaps, as shown in Figure 5, trigger output terminal 146b is connected to discharge switch control end 132c, directly triggers control discharge opportunity, also can constantly carry out the capacitor charge and discharge program by trigger 146.If it should be noted that the charge-discharge mechanism by control circuit 142 control capacitances 180, it is more flexible that the program of discharging and recharging of whole capacitor 180 will become; Control circuit 142 can cooperate other demands, on the opportunity when decision begins to charge next time, promote overall efficiency.
In the present embodiment, because the capacitance in loop is a fixed value, the variation of the resistance capacitance value during charging in the circuit is looked different equivalent resistance and is determined that is to say, the duration of charging of electric capacity will be decided by equivalent resistance.The more little duration of charging of equivalent resistance is short more.Therefore different button start combinations will produce equivalent resistance in the different circuit, and therefore the different duration of charging is also arranged.
Control circuit 142 not only is responsible for calculating the 146 output times that low-potential signal experienced of trigger in whole device, be called the electronegative potential time, it is considered as capacitor charging time, and capacitor charging time is corresponded to a corresponding output signal with a default corresponding tables 144, which operating switch action to judge is, whether the voltage signal of more responsible reception trigger 146 determines turn-on transistor switch 132 with judgement, forms one simply circuit integrated.
Corresponding tables 144 is writing down pairing switch key relation of different duration of charging, corresponding separately a kind of output signal of each duration of charging, a kind of button actions of each output signal representative, therefore control circuit 142 exports the correct outside electronic installation that connects that outputs signal to, for example be connected to external device (ED), for example a micro controller or a universal serial bus device (USB device) controller by an output line 150.Whereby, key device is exported a correct switch motion reaction, reaches the function of keyswitch control.
Fig. 2 A and Fig. 2 B illustrate the synoptic diagram according to interdischarge interval after finishing with charging between the electric capacity charge period in key press detecting circuit one preferred embodiment of the present invention.Demonstrate among the figure between charge period with put during signal waveform 172a, the 172b of electric capacity high-pressure side and signal waveform 174a, the 174b of trigger output terminal.
Between charge period, the signal waveform 172a of electric capacity high-pressure side rises gradually between charge period, it also is equal to the signal waveform of trigger input end, during same between corresponding charge period the signal waveform 174a of trigger output terminal keep a low-potential voltage signal condition.When the current potential of 172a rose to the transition critical value of trigger, trigger output can present a high suddenly signal waveform that rises, shown in signal waveform 174b.
At interdischarge interval, the signal waveform 172b of interdischarge interval electric capacity high-pressure side is fallen to an electronegative potential fast by eminence, cause the signal waveform 174b of interdischarge interval trigger output terminal corresponding during same also to return back to low-potential voltage fast thereupon, the high-potential voltage signal the duration promptly roughly represent capacitor discharge time.Fig. 2 C promptly illustrates during most the charge and discharge process, the signal waveform 172 of electric capacity high-pressure side and the waveform corresponding diagram of the signal waveform 174 of trigger output terminal.
Because time of capacitor charge and discharge in circuit time of general push switch is the quite a long time, under a push action, repeatedly circulation has been experienced in the action that discharges and recharges of circuit, therefore the present invention can clearly calculate the duration of charging of different equivalent resistance value correspondence, has sizable practical value.
Fig. 3 illustrates according to all on off state combinations in key press detecting circuit one preferred embodiment of the present invention and corresponding duration of charging table thereof.Show various on off state combinations, corresponding equivalent resistance and the duration of charging that reflects thereof in the table, wherein the o representation switch is pressed, and the x representation switch is not pressed.Do in the example in the reality of mouse apparatus with three pushbutton switches, the first switch resistance value 1R, the second switch resistance value 2R and the 3rd switch resistance value 4R that use are respectively 22k ohm (ohm), 47k ohm and 100k ohm, reference resistor value is 22k ohm, and capacitance is 1nF.And use a 74HC 14 type Schmidt triggers and a 74HC244 type three-state buffer (3-state buffer).
With reference to figure 4, it illustrates the flow chart of steps of method one preferred embodiment that detects according to button of the present invention.Another aspect of the present invention is the method that detects for a kind of button.Under the environment that constantly circuit is discharged and recharged, in step 402, push at least one operating switch, to change the equivalent resistance capacitance value in the charging circuit.For example in the circuit with most operating switch groups, push at least one operating switch, wherein each operating switch switch resistance in parallel constitutes an operating switch group, and is to be cascaded between the operating switch group.After the equivalent resistance capacitance changed, the ongoing time span that discharges and recharges also changed thereupon.In step 404, circuit is charged.
In step 406, detect a duration of charging of this circuit, comprise step 408 and step 410.Step 408, a voltage signal of receiving circuit, and export a high potential signal or low-potential signal, and wherein when voltage does not reach a predetermined value, export a low-potential signal, the output of low-potential signal continues the electronegative potential time.For example the high-pressure side of electric capacity is connected to an input end of a trigger, receive the voltage signal of electric capacity with trigger, and trigger set a high-order predetermined value, when input voltage signal does not reach this predetermined value, the output signal of trigger is a low-potential signal, when input voltage signal reached this predetermined value, trigger was promptly exported a high potential signal.And the time that low-potential signal continues, or claim the electronegative potential time, promptly be considered as the duration of charging of electric capacity.
In the step 410, calculate the electronegative potential time, and with the electronegative potential time as a duration of charging.A control circuit input end that for example connects output terminal to a control circuit of trigger utilizes control circuit to receive the output voltage signal of trigger and the time interval of calculating low-potential signal.
In the step 412, determine a corresponding output signal according to the duration of charging.For example set up a corresponding tables in control circuit, wherein corresponding tables is writing down the corresponding relation between the corresponding output signal of different duration of charging and respective number, when control circuit calculates electronegative potential after the time, determine a specific corresponding output signal with this corresponding tables, and then make correct output.
With reference to figure 6, it illustrates the circuit diagram according to another preferred embodiment of key press detecting circuit of the present invention.In another preferred embodiment of the present invention, on-off circuit unit 200 comprises a switch module 210 and a resistance 280.Switch module 210 1 ends couple resistance 280, and the other end sees through chip pin 220 and couples control module 240, and switch module 210 comprises most operating switch group 212a~212e.Each operating switch group is to be in series by an operating switch 214a~214e and a switching capacity C1~C5, and is parallel with one another between the operating switch group.Resistance 280 1 ends couple switch module 210, and the other end then couples a voltage source 202.In addition, a reference capacitance C0 is arranged more in the on-off circuit unit, in parallel with switch module 210, and also the pass of the capacitance between C0, the C1~C5 is 1C, 1C, 2C, 4C, 8C, 16C.
Chip pin 220 1 ends and switch module 210 couple, and the other end then couples control module 240, couple the voltage signal of end 216 in control module 240 to transmit on-off circuit unit 200 for a chip pin of chip pin 220.Control module 240 detect with the calculating voltage signal by an electronegative potential rise to a noble potential the capacitor charging time of process, determine a corresponding output signal according to the duration of charging.
Control module 240 comprises a trigger 246 and a control circuit 242.Trigger 246 1 end coupling chip pins 220 receive the voltage signal that couples end 216 from the chip pin; The other end then couples control circuit 242, exports a noble potential or a low-potential signal in control circuit 242.
Key press detecting circuit also comprises a discharge circuit module 230.Discharge circuit module 230 couples with chip pin 220, in order to provide electric capacity one discharge approach, more has the function that control capacitance is discharged concurrently.Discharge circuit module 230 comprises a discharge switch 232, can use a transistor switch, for example the n-MOS transistor.Identical with previous embodiment, repeat no more in this.
Similarly, when arbitrary operating switch was pressed, that group operating switch group that is pressed was conducting, for example operating switch group 212a.If the current potential of chip pin 220 will continue to rise between charge period this moment, and trigger 246 also changes into an electric potential signal with the voltage signal that is received simultaneously.Rise to high-order predetermined value up to voltage, the output signal of trigger is transformed to high potential signal by low-potential signal, is calculated its duration of charging by control circuit 242.
When a control end of discharge switch 232 receives a trigger pip, be transformed into conducting state, provide a discharge path to the capacitor C 1 of on-off circuit and C0 to discharge.
Because its inevitable corresponding relation is arranged between the equivalent resistance capacitance in duration of charging and loop among the present invention, after calculating the duration of charging, also can instead push away the equivalent resistance capacitance that obtains a correspondence, therefore the present invention also waits to be both according to the equivalent resistance capacitance and determines a corresponding output signal, above-mentioned corresponding tables also can be the corresponding relation that is writing down between the corresponding output signal of different equivalent resistance capacitances and respective number, and this is to know the variation that this skill person can expect easily.
With reference to figure 7, it illustrates the process flow diagram according to keyswitch state judging method in the preferred embodiment of the present invention.Except the above-mentioned mode of finding out corresponding output signal with corresponding tables, the mode of another kind of judgement keyswitch state is among the present invention: in a period of time after the key device startup, in for example several seconds, a numerical value of maximum in the duration of charging that record is detected.This numerical value representative pairing duration of charging under the situation that no any button is pressed.Numerical value can be calculated per unit resistance to the relation in duration of charging thus, has also just obtained the duration of charging of all the other different switch press states.
Being similar to the embodiment of Fig. 1, but the on-off circuit with five buttons is the example explanation, and the resistance value of five buttons is respectively 1R, 2R, 4R, 8R and 16R, more cooperates the reference resistance of resistance value 1R.When no any button was pressed, equivalent resistance was 32R.Five key switch devices have 32 kinds of on off states, and the equivalent resistance of all on off state correspondences is 1R just in this example, 2R, and 3R ..., 32R, i.e. interval 1R.
The determining step of keyswitch state is: step 702, be recorded in switchgear and start the maximum charge time that is calculated in one schedule time of back, in required duration of charging when on behalf of equivalent resistance, this numerical value be 32R, for example carry out the action of calculating with record with control circuit.In the step 704, the unit duration of charging that goes out per unit equivalent resistance correspondence according to the maximum charge time conversion is to determine the pairing duration of charging of other on off states.
By the unit duration of charging that calculates, i.e. in the duration of charging of 1R correspondence, be multiplied by each multiplying power in this example, to correspond to the duration of charging of other switch press states from 2R to 32R.For example for the on off state of 2R, its duration of charging is multiplied by two for the unit duration of charging.An other practice is, connects the action that subtracts with the duration of charging value of 1R correspondence for other arbitrary duration of charging value, till this time charging gained time value is reduced to duration of charging near the 1R correspondence.Via the number of times that the company of calculating subtracts, the time value that can obtain this time charging gained is equivalent to the duration of charging value of how many 1R correspondences doubly, and then estimates out equivalent resistance capacitance at that time.
In the step 706, setting up out between all state areas, wherein is that the duration of charging by an on off state correspondence is the center between each state area, and is width formed one interval the definition with a frequency range value.In the step 708, calculate operation duration of charging after a charging procedure is finished with control circuit, and the output signal of decision correspondence between the state area that is fallen into according to this operation duration of charging, just judge which button and be pressed.
The method of above-mentioned judgement also comprises: in the step 710, do not belong between arbitrary state area when the operation duration of charging, then looking this duration of charging is that button is changed the transient state value that is produced during the pressed state, denies recognition.In addition, even this time operation belongs between a certain state area the duration of charging, if but to fall into time in this effective status interval continuously of a specified duration inadequately, and do not reach one and predeterminedly fall into the time, also can be regarded as the transient state that causes when keyswitch switches.For example, if each charge and discharge cycles takes about 1 millisecond, system can be designed to each duration of charging and must fall into the effective status interval and reach more than 10 milliseconds (10 charge and discharge cycles), effective button behavior is admitted this time to be by control circuit side, if the duration of charging of this electric capacity is falling on a certain effective status interval not as good as 10 milliseconds, just change and fall other effective status intervals, then control circuit will not admitted the keyswitch state of aforementioned duration of charging representative.
By the invention described above preferred embodiment as can be known, use the present invention and have following advantage.The present invention utilizes the RC charge-discharge principle, with resistance, capacitor architecture one simple combination of circuits, can detect the path off state of a plurality of switches on the electronic installation simultaneously, only take integrated circuit (IC) chip one output and go into the chip pin, solved on the prior art because of chip pin count deficiency, make the limited problem of range of application of integrated circuit (IC) chip, and reduced the chip pin number of in the future new design chips, and then save chip area, reduction packaged chip pin count, reach the purpose that reduces production costs and promote environmental protection.
Though the present invention discloses as above with preferred embodiment; right its is not in order to qualification the present invention, any those skilled in the art, without departing from the spirit and scope of the present invention; when can doing a little modification and perfect, so protection scope of the present invention is when with being as the criterion that claims were defined.

Claims (7)

1. a key press detecting circuit is characterized in that, comprises at least:
A charging signals is exported in one on-off circuit unit, comprises most operating switchs, and each those operating switch determines an equivalent resistance capacitance value, and wherein this charging signals is to continue change when charging in time;
One trigger detects this charging signals, wherein charges when this on-off circuit unit, and when not reaching a high-order predetermined value, the corresponding output of this trigger one low-potential signal; And
One control circuit, calculate the output electronegative potential time that this low-potential signal experienced, and determine a corresponding output signal according to this electronegative potential time, wherein those operating switchs are mutual series connection, those operating switchs are in parallel accordingly with a plurality of switch resistances, and the operating switch of those series connection also with a capacitances in series, wherein meet a proportionate relationship between the resistance value of those switch resistances:
N^0∶N^1∶N^2∶...∶N^(M-1),
Wherein N represents the positive count value, the number of M representation switch resistance.
2. key press detecting circuit as claimed in claim 1 is characterized in that this control circuit comprises a corresponding tables, in order to the corresponding relation between corresponding output signal with this of this electronegative potential time to be provided.
3. key press detecting circuit as claimed in claim 1 is characterized in that, this trigger is a Schmidt trigger.
4. key press detecting circuit as claimed in claim 1, it is characterized in that, also comprise a discharge circuit module, has a discharge switch, this discharge switch has one first end, one second end and a control end, this first end ground connection wherein, this second end provides this electric capacity one discharge path, and this control end receives the control signal from this control circuit.
5. key press detecting circuit as claimed in claim 1 is characterized in that, this trigger is to receive this charging signals by a chip pin, and this chip pin is coupled between this on-off circuit unit and this trigger.
6. button mouse more than a kind is characterized in that, comprises at least:
A most mousebutton, electrically go up series connection mutually, each those mousebutton comprises an operating switch and a switch resistance, and wherein this operating switch is mutual in parallel with this switch resistance, the open and-shut mode of those operating switchs is controlled the bypass of those switch resistances, and determines a circuit equivalent resistance value;
One electric capacity carries out a charging action;
One trigger receives a voltage signal of an electric capacity high-pressure side of this electric capacity, wherein charges when this electric capacity, and when not reaching a high-order predetermined value, the corresponding output of this trigger one low-potential signal;
One chip pin is electrically connected at this trigger with those operating switch groups and electric capacity; And
One control circuit calculates the output electronegative potential time that this low-potential signal experienced, and determines a corresponding output signal according to this electronegative potential time, wherein meets a proportionate relationship between the resistance value of those switch resistances:
N^0∶N^1∶N^2∶...∶N^(M-1),
Wherein N represents the positive count value, the number of M representation switch resistance.
7. mouse as claimed in claim 6, it is characterized in that, also comprise a discharge circuit module, has a discharge switch, this discharge switch has one first end, one second end and a control end, this first end ground connection wherein, this second end provides this electric capacity one discharge path, this control end receives the control signal from an output terminal of this control circuit or this trigger, wherein this control circuit comprises a corresponding tables, in order to the corresponding relation between corresponding output signal with this of this electronegative potential time to be provided, and this trigger is a Schmidt trigger.
CN2007101413497A 2007-07-31 2007-07-31 Keyboard detection circuit and method thereof Expired - Fee Related CN101359034B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007101413497A CN101359034B (en) 2007-07-31 2007-07-31 Keyboard detection circuit and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101413497A CN101359034B (en) 2007-07-31 2007-07-31 Keyboard detection circuit and method thereof

Publications (2)

Publication Number Publication Date
CN101359034A CN101359034A (en) 2009-02-04
CN101359034B true CN101359034B (en) 2011-03-16

Family

ID=40331531

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101413497A Expired - Fee Related CN101359034B (en) 2007-07-31 2007-07-31 Keyboard detection circuit and method thereof

Country Status (1)

Country Link
CN (1) CN101359034B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI402716B (en) 2010-02-04 2013-07-21 Novatek Microelectronics Corp Key activity detection system and method thereof
CN102147448B (en) * 2010-02-09 2013-10-30 联咏科技股份有限公司 Keying operation detecting system and method
TWI437245B (en) * 2011-08-31 2014-05-11 Kinpo Elect Inc Test system and method relating to cap-sense touch input device
CN102999172B (en) * 2011-09-14 2016-09-21 原相科技股份有限公司 Mouse apparatus
CN102608454A (en) * 2012-03-02 2012-07-25 无锡银泰微电子有限公司 Frequency domain-based mouse key detection circuit
CN103630830B (en) * 2012-08-27 2016-03-16 扬智科技股份有限公司 Power switch brake test circuit, chip and power switch brake method of testing
CN103078648A (en) * 2012-12-26 2013-05-01 合肥美的荣事达电冰箱有限公司 Key collection circuit
CN106326967B (en) * 2015-06-29 2023-05-05 四川谦泰仁投资管理有限公司 RFID chip with interactive switch input port
CN109302188A (en) * 2017-07-25 2019-02-01 厦门雅迅网络股份有限公司 A kind of detection method and circuit of the line control push-button of electric resistance partial pressure type
CN109038709B (en) * 2018-07-12 2021-08-24 深圳拓邦股份有限公司 Key identification circuit and method and stirrer
CN111769838A (en) * 2019-04-01 2020-10-13 上海葡萄纬度科技有限公司 Circuit for detecting multiple signals by using single IO port and electronic product
CN110531190A (en) * 2019-08-19 2019-12-03 深圳市力驰创新科技有限公司 The detection method of input system
CN110865258B (en) * 2019-11-28 2022-02-22 西安中颖电子有限公司 Key detection circuit and key detection method for segmented comparison by using multiple thresholds
CN117526918A (en) * 2024-01-04 2024-02-06 广州市科锐达光电技术股份有限公司 Switch control device and advertisement exhibition system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4502040A (en) * 1981-06-23 1985-02-26 Renix Electronique Keyboard having keys activated by electrical contacts and the capacity to read one state from among four possible states
CN1304079A (en) * 1999-12-14 2001-07-18 达方电子股份有限公司 Key scanning circuit

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4502040A (en) * 1981-06-23 1985-02-26 Renix Electronique Keyboard having keys activated by electrical contacts and the capacity to read one state from among four possible states
CN1304079A (en) * 1999-12-14 2001-07-18 达方电子股份有限公司 Key scanning circuit

Also Published As

Publication number Publication date
CN101359034A (en) 2009-02-04

Similar Documents

Publication Publication Date Title
CN101359034B (en) Keyboard detection circuit and method thereof
CN101727188B (en) Switch circuit
KR101047193B1 (en) Battery protection circuit
CN101436490A (en) Micro-electromechanical system based switching
KR20030013349A (en) Charge/discharge protection circuit
EP1882306B1 (en) Integrated circuit, electronic device and integrated circuit control method
CN1952853B (en) Key apparatus and detecting method thereof
CN102147448A (en) Keying operation detecting system and method
CN102487274A (en) Time delay circuit and time sequence controller provided with same
CN110190841B (en) IO port multiplexing control circuit and electronic equipment
US9007097B2 (en) Key press detecting circuit and method for detecting the status of multiple keys through a single pin
CN101572422B (en) Battery protection circuit and battery device
TWI317576B (en) Button-detecting circuit and method thereof
CN108400781B (en) Power switching device and operation method thereof
CN104137417A (en) Analog signal compatible cmos switch as an integrated peripheral to a standard microcontroller
CN100578419C (en) D.C. voltage stabilizing power source switching control apparatus
US20130003428A1 (en) Power supply system and electrical device with same
CN107332568B (en) Key coding circuit and keyboard scanning circuit
CN107181290B (en) Battery management system
CN101636910B (en) Method of forming a charge pump controller and structure therefor
CN102096454A (en) Startup/shutdown circuit
US20100060490A1 (en) Circuit Arrangement and Method for the Operation of a Circuit Arrangement
JPH10336034A (en) Voltage/pulse converter changing pulse by voltage change
CN113593457B (en) Display panel and testing method thereof
US8035360B2 (en) Soft start unit for a power converting device

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
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110316

Termination date: 20120731