CN103095308A - I/O interface circuit and button scanning device containing the same and scanning method - Google Patents

I/O interface circuit and button scanning device containing the same and scanning method Download PDF

Info

Publication number
CN103095308A
CN103095308A CN2012105946608A CN201210594660A CN103095308A CN 103095308 A CN103095308 A CN 103095308A CN 2012105946608 A CN2012105946608 A CN 2012105946608A CN 201210594660 A CN201210594660 A CN 201210594660A CN 103095308 A CN103095308 A CN 103095308A
Authority
CN
China
Prior art keywords
semiconductor
oxide
interface
metal
state
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.)
Granted
Application number
CN2012105946608A
Other languages
Chinese (zh)
Other versions
CN103095308B (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.)
Hangzhou Silan Microelectronics Co Ltd
Original Assignee
Hangzhou Silan Microelectronics 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 Hangzhou Silan Microelectronics Co Ltd filed Critical Hangzhou Silan Microelectronics Co Ltd
Priority to CN201210594660.8A priority Critical patent/CN103095308B/en
Publication of CN103095308A publication Critical patent/CN103095308A/en
Application granted granted Critical
Publication of CN103095308B publication Critical patent/CN103095308B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Logic Circuits (AREA)

Abstract

The invention discloses an I/O interface circuit, a low-power consumption button scanning device and a method and a low-power consumption dynamic keyboard scanning method. The I/O interface circuit comprises an output state control module, a first input state control module and a second input state control module, wherein the output state control module comprises a first fixed electrical level and a first switch unit, the first input control module comprises a second fixed electric level, a second switch unit and a second resistor unit, the second input state control module is provided with a first resistor unit and a third switch unit, the first fixed electrical level is opposite to the second fixed electrical level in logic, control terminals of the first switch unit, the second switch unit and the third switch unit are connected with a switch controller for controlling breakover or disconnection of the switch unit. According to the circuit, the device and the method, when I/O interface electrical levels are switched over, transient current generated on input grades of the circuit, the device and the method, thus power consumption is reduced, and meanwhile effective detection of the button connected on the I/O interface is guaranteed.

Description

I/O interface circuit and comprise key scan device and the scan method of this circuit
Technical field
The present invention relates to keyboard interface and keyboard scanning technique field, relate in particular to a kind of I/O interface circuit, low-power consumption key scan device and method and low-power consumption dynamic keyboard scan method.
Background technology
Existing product is more and more stricter to the power consumption requirement of complete machine, and especially when complete machine was in holding state, keyboard was as the common components of complete machine man-machine interface, and its power consumption is the part in Overall Power Consumption, reduces the keyboard power consumption particularly important.Keyboard is when key scan, button one end is by button output output fixed level, the key-press input end of the button other end by on draw or pull down resistor provides an original levels opposite with the former, when having button to press, draw on the key-press input end or pull-down state is driven by opposite level, produce the level saltus step, judgement has button to produce thus.With reference to Fig. 1, button K01 ' in the keyboard when scanning as example, the two ends of button K01 ' are connected with respectively I/O interface P0 and I/O interface P1, I/O interface P0 is upper is connected with metal-oxide-semiconductor MP0 ' by pull-up resistor R0 ', the drain electrode of metal-oxide-semiconductor MP0 ' is connected with pull-up resistor R0 ', and the source electrode of metal-oxide-semiconductor MP0 ' is connected with VDD, and the grid of metal-oxide-semiconductor MP0 ' is control end, also be connected with GND by metal-oxide-semiconductor MN0 ' on I/O interface P0, the grid of metal-oxide-semiconductor MN0 ' is control end; Corresponding, I/O interface P1 also is connected with respectively metal-oxide-semiconductor MP1 ', pull-up resistor R1 ' and metal-oxide-semiconductor MN1 '.When single button detects, the two ends of button K01 ' need to be configured to the opposite level of logic, both configure I/O interface P0 and be in the output low level state, I/O interface P1 is in to be with and draws input state, also the state of I/O interface P1 and I/O interface P0 can be exchanged, when having button to press, I/O interface P1 detects the level saltus step, judgement has button to produce, dotted portion current trend when button being detected in Fig. 1.
In the key scan process, unavoidably need to carry out output state at the I/O interface at button two ends and with opposite levels on draw/switch between drop-down input state, due to factors such as device package and external keyboard connections, there is parasitic capacitance to exist on each I/O interface, the state of I/O interface often carries out a level and switches, be actually VDD by the charging process of pull-up resistor to I/O interface parasitic capacitance, or I/O interface parasitic capacitance is by the discharge process of pull down resistor to GND.General upper pull down resistor is larger, and charge and discharge process is longer, and level switches along more slow, and the electric current that produces on the input stage cmos circuit of I/O interface thus is also larger, and power consumption is also just higher.But for the level logic that effectively guarantees button two ends is opposite, it is too little that upper pull down resistor can not arrange, and the time of switching in order to reduce the I/O interface level, it is too large that upper pull down resistor can not arrange.In order to ensure effective detection of button, cause the electric current on the input stage cmos circuit larger in prior art, make the power consumption of keyboard when button detects also higher.
Summary of the invention
Technical problem to be solved by this invention be for existing I/O interface circuit when switching to input state by output state, I/O interface level state switches slowly, I/O interface input stage electric current is large, when causing standby, the I/O Interface status switches the high problem of power consumption, and a kind of I/O interface level switches rapidly, I/O interface input stage electric current is little I/O interface circuit, low-power consumption key scan device, low-power consumption key scanning method and low-power consumption dynamic keyboard scan method are provided.
For addressing the above problem, a kind of technical scheme of the present invention is:
a kind of I/O interface circuit, comprise the output state control module and the first input state control module that are connected with the I/O interface, the output state control module comprises the first fixed level and the first switch element that is connected in turn, the other end of the first switch element is connected with the I/O interface, the first input state control module comprises the second fixed level that is connected in turn, second switch unit and the second resistance unit, the other end of the second resistance unit is connected with the I/O interface, the control end of the first switch element and second switch unit is connected with the on-off controller for control switch cell conduction or disconnection, the first fixed level is opposite with the second fixed level logic, described I/O interface circuit also is connected with the second input state control module, the second input state control module is provided with for shortening I/O interface level the first resistance unit and the 3rd switch element of switching time, the second fixed level, the 3rd switch element is connected in turn with the first resistance unit, the other end of the first resistance unit is connected with the I/O interface, the control end of the 3rd switch element is connected with on-off controller, the conducting state of the first switch element, second switch unit and the 3rd switch element is controlled in on-off controller output control information, and configure respectively the I/O interface that is connected with the first switch element place module of conducting and be output the first fixed level state, the I/O interface that is connected with place, the second switch unit module of conducting is the first input state, and the I/O interface that is connected with the 3rd switch element place module of conducting is the second input state, described on-off controller comprises one group of control information at least, and making the I/O interface configuration that is in output the first fixed level state is the second input state.
I/O interface circuit of the present invention is by controlling the access state of output state control module, the first input state control module and the second input state control module and I/O interface, configure the state of three kinds of I/O interfaces, be respectively output the first fixed level state, the first input state and the second input state.Under the control of on-off controller, the first switch element conducting in the output state control module, the first fixed level accesses the I/O interface, and this moment, the I/O interface was in output the first fixed level state; Second switch cell conduction in the first input state control module, the second fixed level and the second resistance unit access the I/O interface, and this moment, the I/O interface was in the first input state; The 3rd switch element conducting in the second input state control module, the second fixed level and the first resistance unit access the I/O interface, and this moment, the I/O interface was in the second input state.Under the configuration of control signal, the I/O interface can switch in three kinds of states as required, and I/O interface circuit of the present invention is applicable to the key scan of various structure keyboards.
Wherein, the first input state and output the first fixed level state are used for effective button and detect when button detects, and therefore the resistance of the second resistance unit can not be too little, make the level logic of the first input state and output the first fixed level state opposite.On-off controller comprises one group of control information, and making the I/O interface configuration that is in output the first fixed level state is the second input state, and the second input state is used for when the I/O Interface status switches; Make the first resistance unit access I/O interface, the first less resistance unit resistance is set, discharging current in the time of can increasing the switching of I/O interface level, reduce the discharge time of this moment, the state of I/O interface is switched fast, in order to reducing the transient current of I/O interface input stage cmos circuit, and then reduced the power consumption of I/O interface circuit.
be compared to prior art, I/O interface circuit of the present invention has been set up the second input state control module, the I/O interface is had for shortening I/O interface level the second input state of switching time, when switching, configuration I/O interface level switches to the second input state by output the first fixed level state, when the I/O interface level switches, input handoff procedure from outputing to for each I/O interface, all reduced the transient current that produces on the input stage of himself, thereby reduced power consumption, and when button detects, adopt the first input state to guarantee to be connected to effective detection of button on this I/O interface.
Preferably, described I/O interface circuit be set up in being pull-up structure on draw the I/O interface circuit, the first fixed level is low level, the second fixed level is high level, described the first resistance unit is strong pull-up resistor, the second resistance unit is weak pull-up resistor, the first switch element, second switch unit and the 3rd switch element are respectively be used to the metal-oxide-semiconductor of controlling above-mentioned resistance access state, described output the first fixed level state is the output low level state, the first input state draws input state for band on weak, and the second input state draws input state for band on strong.
Preferably, described I/O interface circuit is the drop-down I/O interface circuit of built-in pull-down structure, the first fixed level is high level, the second fixed level is low level, described the first resistance unit is strong pull down resistor, the second resistance unit is weak pull down resistor, the first switch element, second switch unit and the 3rd switch element are respectively be used to the metal-oxide-semiconductor of controlling above-mentioned resistance access state, described output the first fixed level state is the output high level state, the first input state is the weak drop-down input state of band, and the second input state is for being with strong drop-down input state.
Preferably, described I/O interface circuit is for being set up the upper drop-down I/O interface circuit of pull-up structure and pull-down structure in the while, and upper drop-down I/O interface circuit comprises two groups of I/O interface circuits, is respectively to draw I/O interface circuit and drop-down I/O interface circuit; The first fixed level that draws the I/O interface circuit on described is low level, the second fixed level is high level, the first resistance unit is strong pull-up resistor, the second resistance unit is weak pull-up resistor, the first switch element, second switch unit and the 3rd switch element are respectively be used to the metal-oxide-semiconductor of controlling above-mentioned resistance access state, the first fixed level state of exporting is the output low level state, and the first input state draws input state for band on weak, and the second input state draws input state for band on strong; The first fixed level of described drop-down I/O interface circuit is high level, the second fixed level is low level, the first resistance unit is strong pull down resistor, the second resistance unit is weak pull down resistor, the first switch element, second switch unit and the 3rd switch element are respectively be used to the metal-oxide-semiconductor of controlling above-mentioned resistance access state, the first fixed level state of exporting is the output high level state, and the first input state is the weak drop-down input state of band, and the second input state is for being with strong drop-down input state.
Preferably, described the first fixed level is GND, and the second fixed level is VDD, and the first switch element is the first metal-oxide-semiconductor, and the second switch unit is the 3rd metal-oxide-semiconductor, and the 3rd switch element is the second metal-oxide-semiconductor; The source electrode of the second metal-oxide-semiconductor and the 3rd metal-oxide-semiconductor all is connected with VDD, the source electrode of the first metal-oxide-semiconductor is connected with GND, the drain electrode of the second metal-oxide-semiconductor and the 3rd metal-oxide-semiconductor is connected with weak pull-up resistor with strong pull-up resistor respectively, the other end of strong pull-up resistor and weak pull-up resistor is connected with the drain electrode of the first metal-oxide-semiconductor, the drain electrode of the first metal-oxide-semiconductor is the input of I/O interface, and the grid of the first metal-oxide-semiconductor, the second metal-oxide-semiconductor and the 3rd metal-oxide-semiconductor all is connected with on-off controller.
Preferably, described the first fixed level is VDD, and the second fixed level is GND, and the first switch element is the 4th metal-oxide-semiconductor, and the second switch unit is the 6th metal-oxide-semiconductor, and the 3rd switch element is the 5th metal-oxide-semiconductor; The source electrode of the 5th metal-oxide-semiconductor and the 6th metal-oxide-semiconductor all is connected with GND, the source electrode of the 4th metal-oxide-semiconductor is connected with VDD, the drain electrode of the 5th metal-oxide-semiconductor and the 6th metal-oxide-semiconductor is connected with weak pull down resistor with strong pull down resistor respectively, the other end of strong pull down resistor and weak pull down resistor is connected with the drain electrode of the 4th metal-oxide-semiconductor, the drain electrode of the 4th metal-oxide-semiconductor is the input of I/O interface, and the grid of the 4th metal-oxide-semiconductor, the 5th metal-oxide-semiconductor and the 6th metal-oxide-semiconductor is connected with on-off controller.
preferably, draw the first fixed level of I/O interface circuit on described, the second fixed level, the first switch element, the second switch unit, the 3rd switch element, the second resistance unit and the first resistance unit are respectively GND, VDD, the 13 metal-oxide-semiconductor, the 16 metal-oxide-semiconductor, the 18 metal-oxide-semiconductor, weak pull-up resistor and strong pull-up resistor, the first fixed level of drop-down I/O interface, the second fixed level, the first switch element, the second switch unit, the 3rd switch element, the second resistance unit and the first resistance unit are respectively VDD, GND, the 14 metal-oxide-semiconductor, the 15 metal-oxide-semiconductor, the 17 metal-oxide-semiconductor, weak pull down resistor and strong pull down resistor, the 13 metal-oxide-semiconductor, the source electrode of the 15 metal-oxide-semiconductor and the 17 metal-oxide-semiconductor all is connected with GND, the 14 metal-oxide-semiconductor, the source electrode of the 16 metal-oxide-semiconductor and the 18 metal-oxide-semiconductor all is connected with VDD, the drain electrode of the 18 metal-oxide-semiconductor is connected with the drain electrode of the 14 metal-oxide-semiconductor by strong pull-up resistor, the drain electrode of the 16 metal-oxide-semiconductor is connected with the drain electrode of the 14 metal-oxide-semiconductor by weak pull-up resistor, the drain electrode of the 17 metal-oxide-semiconductor is connected with the drain electrode of the 13 metal-oxide-semiconductor by strong pull down resistor, the drain electrode of the 15 metal-oxide-semiconductor is connected with the drain electrode of the 13 metal-oxide-semiconductor by weak pull down resistor, the drain electrode of the 13 metal-oxide-semiconductor is connected with the drain electrode of the 14 metal-oxide-semiconductor, the drain electrode of the 13 metal-oxide-semiconductor is the input of I/O interface, the 13 metal-oxide-semiconductor, the 14 metal-oxide-semiconductor, the 15 metal-oxide-semiconductor, the 16 metal-oxide-semiconductor, the grid of the 17 metal-oxide-semiconductor and the 18 metal-oxide-semiconductor all is connected with on-off controller.
Preferably, the Standard resistance range of described strong pull-up resistor is 5K-50K, and the Standard resistance range of weak pull-up resistor is 50K-500K.
Preferably, the Standard resistance range of described strong pull down resistor is 5K-50K, and the Standard resistance range of weak pull down resistor is 50K-500K.
Preferably, the Standard resistance range of described strong pull-up resistor and strong pull down resistor is 5K-50K, and the Standard resistance range of weak pull-up resistor and weak pull down resistor is 50K-500K.
The I/O interface circuit can on draw a kind of in I/O interface circuit, drop-down I/O interface circuit and upper drop-down I/O interface circuit, the I/O interface circuit of three kinds of structures to include output the first fixed level state, the first input state and the second input state.Adopt strong pull-up resistor or the strong pull down resistor of Standard resistance range 5K-50K in the I/O interface circuit, Standard resistance range is weak pull-up resistor and the weak pull down resistor of 50K-500K, the strong pull-up resistor of different resistances or strong pull down resistor, the electric current that produces on the input stage cmos circuit of corresponding I/O interface is also different.When the I/O interface switches to the second input state by output the first fixed level state, because the upper pull down resistor of access I/O interface is less, the charge or discharge electric current is just larger, the I/O interface is just shorter to the charge or discharge process of parasitic capacitance, the switch speed of level is also rapid, and the electric current that produces on the input stage cmos circuit of I/O interface thus is also less.
Another kind of technical scheme of the present invention is:
A kind of low-power consumption key scan device, described scanning means is connected with a button at least, and the two ends of described button are connected with respectively I/O interface circuit of the present invention.
Another technical scheme of the present invention is:
A kind of low-power consumption key scanning method, the realization of described scan method comprises the steps: based on low-power consumption key scan device
A) preset the scan period of scanning monitor and the control signal of switching for the I/O Interface status;
B) scanning monitor output control signal configures the state of all I/O interfaces, and the I/O interface of button is carried out periodic scan and carries out button and detect:
B1. configure any one I/O interface and be in output the first fixed level state, other all I/O interfaces are in the first input state, detect to be in the I/O interface of the first input state, if the saltus step of level detected, represent that button is pressed, otherwise enter step b2;
B2. configuring the I/O interface that is in output the first fixed level state is the second input state, if all buttons all are scanned, enters step b3, continues to detect otherwise return to step b2;
B3. configure all I/O interfaces and be in the first input state, return to step b1 according to the scan period of scanning monitor and restart to detect.
Low-power consumption key scan device and method of the present invention is used for the scanning of single button, a plurality of button and matrix press-key, and the switching with I/O interface level is rapid, characteristics low in energy consumption.The scanning monitor that adopts in the present invention can replace on-off controller in the present invention, controls the conducting state of the first switch element, second switch unit and the 3rd switch element in order to export control information.
The 4th kind of technical scheme of the present invention is:
A kind of low-power consumption dynamic keyboard scan method, the realization of described scan method is drawn the I/O interface circuit in the present invention, comprise the steps:
A) keyboard configuration is become to have the stepped keyboard of N I/O interface, connect a button between any two I/O interfaces, any one I/O interface is connected with GND by a button;
B) state that the I/O interface is set is three kinds, is respectively output low level state, band and draws on strong input state and band to draw input state on weak;
C) preset the scan period of scanning monitor and the control signal of switching for the I/O Interface status;
D) scanning monitor configures the state of all I/O interfaces by control signal, and the I/O interface of keyboard is carried out periodic scan and carries out button and detect:
D1. configure all I/O interfaces and be in band and draw input state on weak, scan the incoming level of all I/O interfaces, if the level saltus step of I/O interface detected, output key detection signal, otherwise enter steps d 2;
D2. configure any one I/O interface and be in the output low level state, draw input state on a little less than other all I/O interfaces are in and are with, scan all and be in the I/O interface that band draws input state on weak, if the level saltus step of above-mentioned any I/O interface detected, output key detection signal, otherwise enter steps d 3;
D3. the I/O interface that is in the output low level state in configuration step d2 is to draw input state on being with by force, and other all I/O interfaces draw input state on a little less than being with; If all I/O interfaces all are scanned, enter steps d 4, continue scanning otherwise return to steps d 2;
D4. configure all I/O interfaces and be in band and draw input state on weak, detections that stop key returned to steps d 1 according to the scan period of scanning monitor and restarted to scan.
The 5th kind of technical scheme of the present invention is:
A kind of low-power consumption dynamic keyboard scan method, the realization of described scan method comprises the steps: based on the drop-down I/O interface circuit in the present invention
A) keyboard configuration is become to have the stepped keyboard of N I/O interface, connect a button between any two I/O interfaces, any one I/O interface is connected with VDD by a button;
B) state that the I/O interface is set is three kinds, is respectively the output high level state, is with strong drop-down input state and the weak drop-down input state of band;
C) preset the scan period of scanning monitor and the control signal of switching for the I/O Interface status;
D) scanning monitor configures the state of all I/O interfaces by control signal, and the I/O interface of keyboard is carried out periodic scan and carries out button and detect:
D1. configure all I/O interfaces and be in the weak drop-down input state of band, scan the incoming level of all I/O interfaces, if the level saltus step of I/O interface detected, output key detection signal, otherwise enter steps d 2;
D2. configure any one I/O interface and be in defeated high level state, other all I/O interfaces are in the weak drop-down input state of band, scan the I/O interface that all are in the weak drop-down input state of band, if the level saltus step of above-mentioned any I/O interface detected, output key detection signal, otherwise enter steps d 3;
D3. be in the I/O interface of output high level state in configuration step d2 for being with strong drop-down input state, other all I/O interfaces are the weak drop-down input state of band; If all I/O interfaces all are scanned, enter steps d 4, continue scanning otherwise return to steps d 2;
D4. configure all I/O interfaces and be in the weak drop-down input state of band, the detection that stops key is returned to steps d 1 according to the scan period of scanning monitor and is restarted scanning.
The scanning monitor that adopts in the present invention can replace on-off controller in the present invention, control the conducting state of the first switch element, second switch unit and the 3rd switch element in order to export control information, make and draw the I/O interface circuit to have output low level state, band to draw on strong input state and band to draw input state on weak, make drop-down I/O interface circuit have the output high level state, be with strong drop-down input state and the weak drop-down input state of band.Of the present invention two kinds based on draw the low-power consumption keyboard scanning method of I/O interface circuit and drop-down I/O interface circuit to scan mainly for the dynamic keyboard with N I/O interface, N* (N+1)/2 button.Increased in the scanning process of keyboard and drawn/strong drop-down input state on strong, in the process that the I/O interface is switched to input state by output state, increased by one and first switched to and draw on strong/step of strong drop-down input state.Be specially, steps d 1, first scanning and all are connected to button between I/O interface and the first fixed level; Steps d 2, scanning is connected to the button between certain I/O interface that is in output state and all other I/O interfaces; Steps d 3, the I/O interface that is in output state is carried out level to be switched, making the I/O interface that is in output state only switch to band draws input state or is with strong drop-down input state on strong, simultaneously, scanning monitor detects all I/O interfaces and whether all was configured above-mentioned steps, guarantees that all buttons all are scanned; Steps d 4, configuring all I/O interfaces is initial input state, for the scanning of next cycle ready.Wherein the scan period can arrange according to the scanning needs, and generally in 50ms, the cycle of steps d 4 generally in 0-20ms, is used for guaranteeing that effective button detects, and avoiding leak, the situation of key occurs.In steps d 3 of the present invention, make the state of I/O interface have low to high or switching from high to low short as much as possible, reduced the transient current of the input stage in the handoff procedure.Make keyboard in without the button situation,, all reduced the electric current that produces on the input stage of himself, thereby reduced power consumption from output to the input handoff procedure for each I/O interface.For guaranteeing that effective button detects, the present invention all adopts the weak up/down of band to draw input state to carry out in scanning process.
Be compared to prior art, low-power consumption dynamic keyboard scan method of the present invention is in the process that the I/O interface is switched to input state by output state, having increased band draws/strong drop-down input state on strong, comparing traditional switch step has increased by one and first switches to band and draw/strong drop-down input state on strong, and when button detects, only limit to use band to draw/weak drop-down input state on weak.Both take into account effective detection of button, reduced again the electric current in the scanning process.
Description of drawings
Fig. 1 is the circuit theory diagrams that in prior art, keyboard detects.
Fig. 2 is the schematic block circuit diagram of I/O interface circuit of the present invention.
Fig. 3 is the schematic block circuit diagram of low-power consumption key scan device of the present invention.
Fig. 4 be I/O interface circuit embodiment one of the present invention on draw I/O interface circuit schematic diagram.
Fig. 5 is the drop-down I/O interface circuit schematic diagram of I/O interface circuit embodiment two of the present invention.
Fig. 6 be I/O interface circuit embodiment three of the present invention on draw I/O interface circuit schematic diagram.
Fig. 7 is the drop-down I/O interface circuit schematic diagram of I/O interface circuit embodiment four of the present invention.
Fig. 8 be in low-power consumption dynamic keyboard scan method of the present invention with on draw the I/O interface to be connected the keyboard circuit schematic diagram.
Fig. 9 is the keyboard circuit schematic diagram that is connected with drop-down I/O interface in low-power consumption dynamic keyboard scan method of the present invention.
Figure 10 draws in low-power consumption dynamic keyboard scan method of the present invention the level of I/O interface in each step to change sequential chart.
Figure 11 draws in low-power consumption dynamic keyboard scan method of the present invention the I/O interface to be switched to the comparison diagram of switching sequence in the sequential of input state and prior art by output state.
Figure 12 is the upper drop-down I/O interface circuit schematic diagram of low-power consumption dynamic keyboard scanning means embodiment five of the present invention.
Figure 13 is the upper drop-down I/O interface circuit schematic diagram of low-power consumption dynamic keyboard scanning means embodiment six of the present invention.
Figure 14 is the keyboard circuit schematic diagram that is connected with upper drop-down I/O interface in low-power consumption dynamic keyboard scan method of the present invention.
Embodiment
Further describe the present invention below in conjunction with drawings and Examples, but protection scope of the present invention is not limited to this.
With reference to Fig. 2, I/O interface circuit of the present invention comprises the output state control module, the first input state control module and the second input state control module that are connected with the I/O interface.The output state control module comprises the first fixed level and the first switch element that is connected in turn, and the other end of the first switch element is connected with the I/O interface; The first input state control module comprises the second fixed level, second switch unit and the second resistance unit that is connected in turn, and the other end of the second resistance unit is connected with the I/O interface; The second input state control module is provided with for shortening I/O interface level the first resistance unit and the 3rd switch element of switching time, the second fixed level, the 3rd switch element and the first resistance unit are connected in turn, and the other end of the first resistance unit is connected with the I/O interface.
the first switch element, the control end of second switch unit and the 3rd switch element is connected with the on-off controller for control switch cell conduction or disconnection, the first fixed level is opposite with the second fixed level logic, the first switch element is controlled in on-off controller output control information, the conducting state of second switch unit and the 3rd switch element, by controlling the output state control module, the access state of the first input state control module and the second input state control module and I/O interface, configured the state of three kinds of I/O interfaces, be respectively output the first fixed level state, the first input state and the second input state.Under the control of on-off controller, the first switch element conducting in the output state control module, the first fixed level accesses the I/O interface, and this moment, the I/O interface was in output the first fixed level state; Second switch cell conduction in the first input state control module, the second fixed level and the second resistance unit access the I/O interface, and this moment, the I/O interface was in the first input state; The 3rd switch element conducting in the second input state control module, the second fixed level and the first resistance unit access the I/O interface, and this moment, the I/O interface was in the second input state.Under the configuration of control signal, the I/O interface can switch in three kinds of states as required, and I/O interface circuit of the present invention is applicable to the key scan of various structure keyboards.
Wherein, the first input state and output the first fixed level state are used for effective button and detect when button detects, and therefore the resistance of the second resistance unit can not be too little, make the level logic of the first input state and output the first fixed level state opposite.On-off controller comprises one group of control information, and making the I/O interface configuration that is in output the first fixed level state is the second input state, and the second input state is used for when the I/O Interface status switches; By being used for shortening the first resistance unit access of switching time of I/O interface level, the first less resistance unit resistance is set, discharging current in the time of can increasing the switching of I/O interface level, reduce the discharge time of this moment, the state of I/O interface is switched fast, in order to reducing the transient current of I/O interface input stage cmos circuit, and then reduced the power consumption of I/O interface circuit.
The I/O interface circuit can on draw a kind of in I/O interface circuit, drop-down I/O interface circuit and upper drop-down I/O interface circuit, the I/O interface circuit of three kinds of structures to include output the first fixed level state, the first input state and the second input state.
described I/O interface circuit be set up in being pull-up structure on draw the I/O interface circuit, the first fixed level is low level, the second fixed level is high level, described the first resistance unit is strong pull-up resistor, the second resistance unit is weak pull-up resistor, the Standard resistance range of strong pull-up resistor is 5K-50K, the Standard resistance range of weak pull-up resistor is 50K-500K, the first switch element, second switch unit and the 3rd switch element are respectively be used to the metal-oxide-semiconductor of controlling above-mentioned resistance access state, described output the first fixed level state is the output low level state, the first input state draws input state on a little less than being with, the second input state draws input state on being with by force.
described I/O interface circuit is the drop-down I/O interface circuit of built-in pull-down structure, the first fixed level is high level, the second fixed level is low level, described the first resistance unit is strong pull down resistor, the second resistance unit is weak pull down resistor, the Standard resistance range of strong pull down resistor is 5K-50K, the Standard resistance range of weak pull down resistor is 50K-500K, the first switch element, second switch unit and the 3rd switch element are respectively be used to the metal-oxide-semiconductor of controlling above-mentioned resistance access state, described output the first fixed level state is the output high level state, the first input state is the weak drop-down input state of band, the second input state is for being with strong drop-down input state.
Described I/O interface circuit is for being set up the upper drop-down I/O interface circuit of pull-up structure and pull-down structure in the while, upper drop-down I/O interface circuit comprises two groups of I/O interface circuits, is respectively to draw I/O interface circuit and drop-down I/O interface circuit; The first fixed level that draws the I/O interface circuit on described is low level, the second fixed level is high level, the first resistance unit is strong pull-up resistor, the second resistance unit is weak pull-up resistor, the first switch element, second switch unit and the 3rd switch element are respectively be used to the metal-oxide-semiconductor of controlling above-mentioned resistance access state, the first fixed level state of exporting is the output low level state, and the first input state draws input state for band on weak, and the second input state draws input state for band on strong; The first fixed level of described drop-down I/O interface circuit is high level, the second fixed level is low level, the first resistance unit is strong pull down resistor, the second resistance unit is weak pull down resistor, the first switch element, second switch unit and the 3rd switch element are respectively be used to the metal-oxide-semiconductor of controlling above-mentioned resistance access state, the first fixed level state of exporting is the output high level state, and the first input state is the weak drop-down input state of band, and the second input state is for being with strong drop-down input state; The Standard resistance range of described strong pull-up resistor and strong pull down resistor is 5K-50K, and the Standard resistance range of weak pull-up resistor and weak pull down resistor is 50K-500K.
With reference to Fig. 3, low-power consumption key scan device of the present invention, described scanning means is connected with a button at least, and the two ends of button are connected with respectively the I/O interface circuit.The below lifts a specific embodiment low-power consumption key scan device of the present invention is described, and describes scanning process in detail by the low-power consumption key scanning method.Scanning means only is connected with button K01, the I/O interface circuit that definition is connected to button K01 two ends is respectively an I/O interface circuit and the 2nd I/O interface circuit, is an I/O interface and the 2nd I/O interface with the I/O interface that an I/O interface circuit is connected with the 2nd I/O interface circuit.
When button K01 detects, comprise the steps:
A) preset the scan period of scanning monitor and the control signal of switching for the I/O Interface status;
B) scanning monitor output control signal configures the state of all I/O interfaces, and the I/O interface of button is carried out periodic scan and carries out button and detect:
B1. any one that configures in an I/O interface and the 2nd I/O interface is in output the first fixed level state, other I/O interface is in the first input state, detection is in the I/O interface of the first input state, if the saltus step of level detected, represent that button K01 is pressed, otherwise enter step b2;
B2. configuring the I/O interface that is in output the first fixed level state is the second input state, if all buttons all are scanned, enters step b3, continues to detect otherwise return to step b2;
B3. configure all I/O interfaces and be in the first input state, return to step b1 according to the scan period of scanning monitor and restart to detect.
Wherein, be connected to button two ends the I/O interface circuit can on draw I/O interface circuit or drop-down I/O interface circuit, if on draw the I/O interface circuit, the first fixed level state of exporting is the output low level state, the first input state draws input state for band on weak, and the second input state draws input state for band on strong; If drop-down I/O interface circuit, the first fixed level state of exporting is the output high level state, and the first input state is the weak drop-down input state of band, and the second input state is for being with strong drop-down input state.Low-power consumption key scan device and method of the present invention is used for the scanning of single button, a plurality of button and matrix press-key, for scanning means and the above-mentioned detecting step of method reference of a plurality of buttons and matrix press-key.
Describe I/O interface circuit of the present invention in detail and realize low-power consumption dynamic scan method based on above-mentioned I/O interface circuit below by embodiment one, embodiment two, embodiment three and embodiment four, making the I/O interface be configured at least a output state and at least two kinds of input states by control signal.In order to know the existence of detailed explanation parasitic capacitance, the parasitic capacitance equivalence in statement with generations such as above-mentioned factors is parasitic capacitance C0 in an embodiment, is labeled as C0 in each view.Therefore, the I/O interface is connected with a parasitic capacitance C0 and an input stage buffer CM, and the I/O interface is used for connecting keyboard and scanning monitor.Describe another kind of I/O interface circuit of the present invention and its scan method in detail by embodiment five and embodiment six simultaneously, making the I/O interface be configured to output low level state, band by control signal draws on strong input state, band to draw input state on weak, exports high level state, is with six kinds of strong drop-down input state and the weak drop-down input states of band, wherein equivalent parasitic capacitances is labeled as respectively C0 and C1 in each view, and the input stage buffer flag is CM.Embodiment one, embodiment two, embodiment three, embodiment four, embodiment five and embodiment six be only for the representative example of the present invention, draws resistance and some metal-oxide-semiconductors to realize that three kinds of states in the present invention or six kinds of states are all within protection scope of the present invention by some up/down arbitrarily.
Embodiment one:
With reference to Fig. 4, draw on described and be connected with output state control module, the first input state control module and the second input state control module on the I/O interface, the output state control module is provided with the first fixed level and the first switch element, the first input state control module comprises the second fixed level, second switch unit and the second resistance unit, and the second input state control module is provided with the first resistance unit and the 3rd switch element.The first fixed level is GND, and the second fixed level is VDD, and the first switch element is the first metal-oxide-semiconductor MN0, the second switch unit is the 3rd metal-oxide-semiconductor MP0, the 3rd switch element is the second metal-oxide-semiconductor MP1, and the second resistance unit is weak pull-up resistor R2, and the first resistance unit is strong pull-up resistor R1.
All be connected with VDD on the source electrode of the second metal-oxide-semiconductor MP1 and the 3rd metal-oxide-semiconductor MP0, the source electrode of the first metal-oxide-semiconductor MN0 is connected with GND, the drain electrode of the second metal-oxide-semiconductor MP1 and the 3rd metal-oxide-semiconductor MP0 is connected with respectively strong pull-up resistor R1 and weak pull-up resistor R2, the other end of strong pull-up resistor R1 and weak pull-up resistor R2 is connected with the drain electrode of the first metal-oxide-semiconductor MN0, the drain electrode of the first metal-oxide-semiconductor MN0 is the input of I/O interface, be used for connecting keyboard, the grid of the first metal-oxide-semiconductor MN0, the second metal-oxide-semiconductor MP1 and the 3rd metal-oxide-semiconductor MP0 is connected with scanning monitor.Wherein, the second metal-oxide-semiconductor MP1 and the 3rd metal-oxide-semiconductor MP0 are the PMOS pipe, and the first metal-oxide-semiconductor MN0 is the NMOS pipe, and the resistance of strong pull-up resistor R1 is that the resistance of 5k and weak pull-up resistor R2 is 150k.
The grid level of the first metal-oxide-semiconductor MN0, the second metal-oxide-semiconductor MP1 and the 3rd metal-oxide-semiconductor MP0 is labeled as respectively S1, S2 and S3 in Fig. 4, on-off controller is by the level of one group of control signal configuration S1, S2 and S3.When S1, S2 and S3 are high level, on draw the I/O interface to be in the output low level state; When S1, S2 are low level, when S3 is arbitrary value, on draw the I/O interface to be in band to draw input state on strong; When S1 is that low level, S2 are high level and S3 when being low level, on draw the I/O interface to be in band to draw input state on weak.
Embodiment two:
With reference to Fig. 5, be connected with output state control module, the first input state control module and the second input state control module on described drop-down I/O interface, the output state control module is provided with the first fixed level and the first switch element, the first input state control module comprises the second fixed level, second switch unit and the second resistance unit, and the second input state control module is provided with the first resistance unit and the 3rd switch element.The first fixed level is VDD, and the second fixed level is GND, and the first switch element is the 4th metal-oxide-semiconductor MP2, the second switch unit is the 6th metal-oxide-semiconductor MN2, the 3rd switch element is the 5th metal-oxide-semiconductor MN1, and the second resistance unit is weak pull down resistor R4, and the first resistance unit is strong pull down resistor R3.
All be connected with GND on the source electrode of the 5th metal-oxide-semiconductor MN1 and the 6th metal-oxide-semiconductor MN2, the source electrode of the 4th metal-oxide-semiconductor MP2 is connected with VDD, the 5th metal-oxide-semiconductor MN1, the 6th metal-oxide-semiconductor MN2 drain electrode be connected with respectively strong pull down resistor R3 and weak pull down resistor R4, the other end of strong pull down resistor R3 and weak pull down resistor R4 is connected with the drain electrode of the 4th metal-oxide-semiconductor MP2, the drain electrode of the 4th metal-oxide-semiconductor MP2 is the input of I/O interface, and the grid of the 4th metal-oxide-semiconductor MP2, the 5th metal-oxide-semiconductor MN1 and the 6th metal-oxide-semiconductor MN2 is connected with scanning monitor.Wherein, the 4th metal-oxide-semiconductor is the PMOS pipe, and the 5th metal-oxide-semiconductor MN1 and the 6th metal-oxide-semiconductor MN2 are the NMOS pipe, and the resistance of strong pull down resistor R3 is that the resistance of 15k and weak pull down resistor R4 is 240k.
The grid level of the 4th metal-oxide-semiconductor MP2, the 5th metal-oxide-semiconductor MN1 and the 6th metal-oxide-semiconductor MN2 is labeled as respectively S4, S5 and S6 in Fig. 5, on-off controller is by the level of one group of control signal configuration S4, S5 and S6.When S4, S5 and S6 were low level, drop-down I/O interface was in the output high level state; When S4 and S5 are high level, when S6 was arbitrary value, drop-down I/O interface is in was with strong drop-down input state; When S4 is that high level, S5 are low level and S6 when being high level, drop-down I/O interface is in the weak drop-down input state of band.
Embodiment three:
With reference to Fig. 6, draw on described and be connected with output state control module, the first input state control module and the second input state control module on the I/O interface, the output state control module is provided with the first fixed level and the first switch element, the first input state control module comprises the second fixed level, second switch unit and the second resistance unit, and the second input state control module is provided with the first resistance unit and the 3rd switch element.The first fixed level is GND, the second fixed level is VDD, the first switch element is the 7th metal-oxide-semiconductor MN3, second switch unit and the 3rd switch element are the 8th metal-oxide-semiconductor MP3 and the 9th metal-oxide-semiconductor MP4, the second resistance unit is weak pull-up resistor R6 and strong pull-up resistor R5, and the first resistance unit is strong pull-up resistor R5.
The source electrode of the 8th metal-oxide-semiconductor MP3 is connected with VDD, the drain electrode of the 8th metal-oxide-semiconductor MP3 is connected with the source electrode of the 9th metal-oxide-semiconductor MP4, be connected with strong pull-up resistor R5 and weak pull-up resistor R6 between the drain electrode of the source electrode of the 8th metal-oxide-semiconductor MP3 and the 7th metal-oxide-semiconductor MN3 in turn, the source electrode of the 9th metal-oxide-semiconductor MP4 and drain electrode are connected in parallel on weak pull-up resistor R6, the source electrode of the 7th metal-oxide-semiconductor MN3 is connected with GND, the input of the drain electrode I/O interface of the 7th metal-oxide-semiconductor MN3, the grid of the 7th metal-oxide-semiconductor MN3, the 8th metal-oxide-semiconductor MP3 and the 9th metal-oxide-semiconductor MP4 is connected with on-off controller.The 7th metal-oxide-semiconductor MN3 is the NMOS pipe, and the 8th metal-oxide-semiconductor MP3 and the 9th metal-oxide-semiconductor MP4 are the PMOS pipe, and the resistance of strong pull-up resistor R5 is that the resistance of 30k and weak pull-up resistor R6 is 50k.
The grid level of the 7th metal-oxide-semiconductor MN3, the 8th metal-oxide-semiconductor MP3 and the 9th metal-oxide-semiconductor MP4 is labeled as respectively S7, S8 and S9 in Fig. 6, on-off controller is by the level of one group of control signal configuration S7, S8 and S9.When S7 and S8 are high level, when S9 is arbitrary value, on draw the I/O interface to be in the output low level state; When S7, S8 and S9 are low level, on draw the I/O interface to be in band to draw input state on strong; When S7 is that low level, S8 are low level and S9 when being high level, on draw the I/O interface to be in band to draw input state on weak.
Embodiment four:
With reference to Fig. 7, be connected with output state control module, the first input state control module and the second input state control module on described drop-down I/O interface, the output state control module is provided with the first fixed level and the first switch element, the first input state control module comprises the second fixed level, second switch unit and the second resistance unit, and the second input state control module is provided with the first resistance unit and the 3rd switch element.The first fixed level is VDD, the second fixed level is GND, the first switch element is the tenth metal-oxide-semiconductor MP5, second switch unit and the 3rd switch element are the 11 metal-oxide-semiconductor MN4 and the 12 metal-oxide-semiconductor MN5, the second resistance unit is strong pull down resistor R7 and weak pull down resistor R8, and the first resistance unit is strong pull down resistor R7.
The drain electrode of the tenth metal-oxide-semiconductor MP5 is connected with the drain electrode of the 12 metal-oxide-semiconductor MN5 by strong pull down resistor R7, the source electrode of the 12 metal-oxide-semiconductor MN5 is connected with the drain electrode of the 11 metal-oxide-semiconductor MN4, the source electrode of the 11 metal-oxide-semiconductor MN4 is connected with GND, be parallel with weak pull down resistor R8 between the source electrode of the 12 metal-oxide-semiconductor MN5 and drain electrode, the drain electrode of the tenth metal-oxide-semiconductor MP5 is the input of I/O interface, and the grid of the tenth metal-oxide-semiconductor MP5, the 11 metal-oxide-semiconductor MN4 and the 12 metal-oxide-semiconductor MN5 is connected with scanning monitor.Wherein, the tenth metal-oxide-semiconductor MP5 is the PMOS pipe, and 11 metal-oxide-semiconductor MN4 and the 12 metal-oxide-semiconductor MN5 are the NMOS pipe, and the resistance of strong pull down resistor R7 is that the resistance of 45k and weak pull down resistor R8 is 350k.
The grid level of the tenth metal-oxide-semiconductor MP5, the 11 metal-oxide-semiconductor MN4 and the 12 metal-oxide-semiconductor MN5 is labeled as respectively S10, S11 and S12 in Fig. 7, on-off controller is by the level of one group of control signal configuration S10, S11 and S12.When S10 is that low level, S11 are low level and S12 when being arbitrary value, drop-down I/O interface is in the output high level state; When S10, S11 and S12 were high level, drop-down I/O interface is in was with strong drop-down input state; When S10 is that high level, S11 are high level and S12 when being low level, drop-down I/O interface is in the weak drop-down input state of band.
Draw I/O interface and control signal in embodiment one, describe low-power consumption keyboard scanning method of the present invention in detail, describe as an example of the number N of I/O interface=6 example, the I/O interface can be expressed as respectively P1, P2, P3, P4, P5 and P6.
Utilize in embodiment one on draw I/O interface and control signal to complete low-power consumption dynamic keyboard scan method of the present invention, comprise the steps:
A) keyboard configuration is become to have the stepped keyboard of 6 I/O interfaces, be respectively P1-P6, stepped keyboard comprises 21 buttons, be respectively K01-K21, connect a button between any two I/O interfaces, any one I/O interface is connected with GND by a button, and stepped keyboard is with reference to Fig. 8;
B) three kinds of I/O Interface status as embodiment one described in are set, are respectively output low level state, band and draw input state on drawing on strong a little less than input state and band;
C) scan period of default scanning monitor is that the control information of 20ms and default control signal is the S1 described in embodiment one, S2 and S3;
D) scanning monitor configures the state of all I/O interfaces by control signal, and the I/O interface of keyboard is carried out periodic scan and carries out button and detect:
D1. the band that is in that configures I/O interface P1-P6 draws input state on weak, detect respectively the input value of each I/O interface, if the level of all I/O interfaces being detected is high level, represents that all buttons that are connected between I/O interface and GND are scanned, and enter steps d 2; Any one I/O interface detects low level else if, represents that the button that is connected between this I/O interface and GND is pressed, the output key detection signal;
D2. any one the I/O interface that configures in all I/O interface P1-P6 is in the output low level state, draw input state on a little less than other all I/O interfaces are in and are with, detect respectively the input value that all are in input state I/O interface, if high level all detected, represent that all are scanned with the button that the mouth I/O interface that is in output state is connected, and enter steps d 3; Any one is in input state I/O interface and low level detected else if, and expression is connected to this I/O interface and the button that is between output state I/O interface is pressed, the output key detection signal;
D3. be to draw input state on being with by force with the I/O interface configuration that is in output state in steps d 2, other all I/O interfaces draw input state on a little less than being with, and this step is not carried out the button detection; If all I/O interface P1-P6 all were scanned, enter steps d 4, continue scanning otherwise get back to steps d 2;
D4. configure all I/O interfaces and be in the input state that band draws on weak, the detection that stops key, this beat is held time and can be set in advance; Then return to steps d 1 according to the scan period of scanning monitor.
With reference to Figure 10, whole scanning step sequential chart of the present invention, as can be seen from the figure, a complete scan period, each I/O interface detects to realize button by the switching of steps d 2 to steps d 3.With reference to Figure 11, when utilizing apparatus and method of the present invention that keyboard is detected, time T 1 when the I/O interface switches input state by input state obviously is less than the time T 0 that state of the prior art switches, and time T 1 is specially steps d 2 to the switching time of steps d 3 in the present invention.
For drop-down I/O interface and the control signal in embodiment four, describe low-power consumption keyboard scanning method of the present invention in detail, describe as an example of the number N of I/O interface=6 example, the I/O interface can be expressed as respectively P1, P2, P3, P4, P5 and P6.
Utilize drop-down I/O interface and control signal in embodiment four to complete low-power consumption dynamic keyboard scan method of the present invention, comprise the steps:
A) keyboard configuration is become to have the stepped keyboard of 6 I/O interfaces, be respectively P1-P6, stepped keyboard comprises 21 buttons, be respectively K01-K21, connect a button between any two I/O interfaces, any one I/O interface is connected with VDD by a button, and stepped keyboard is with reference to Fig. 9;
B) the three kind I/O Interface status of setting described in embodiment four are respectively the output high level state, are with strong drop-down input state and the weak drop-down input state of band;
C) scan period of default scanning monitor is that the control information of 10ms and default control signal is the S10 described in embodiment one, S11 and S12;
D) scanning monitor configures the state of all I/O interfaces by control signal, and the I/O interface of keyboard is carried out periodic scan and carries out button and detect:
D1. configure being in of I/O interface P1-P6 and be with weak drop-down input state, detect respectively the input value of each I/O interface, be low level if the level of all I/O interfaces detected, represent that all buttons that are connected between I/O interface and VDD are scanned, and enter steps d 2; Any one I/O interface detects high level else if, represents that the button that is connected between this I/O interface and VDD is pressed, the output key detection signal;
D2. any one the I/O interface that configures in all I/O interface P1-P6 is in the output high level state, other all I/O interfaces are in the weak drop-down input state of band, detect respectively the input value that all are in input state I/O interface, if low level all detected, represent that all are scanned with the button that the mouth I/O interface that is in output state is connected, and enter steps d 3; Any one is in input state I/O interface and high level detected else if, and expression is connected to this I/O interface and the button that is between output state I/O interface is pressed, the output key detection signal;
D3. with the I/O interface configuration that is in output state in steps d 2 for being with strong drop-down input state, other all I/O interfaces are the weak drop-down input state of band, this step is not carried out button and is detected; If all I/O interface P1-P6 all were scanned, enter steps d 4, continue scanning otherwise get back to steps d 2;
D4. configure all I/O interfaces and be in the weak drop-down input state of band, the detection that stops key, this beat is held time and can be set in advance; Then return to steps d 1 according to the scan period of scanning monitor.
Embodiment five:
with reference to Figure 12, described drop-down I/O interface comprises the first fixed level, the second fixed level, the first switch element, second switch unit, the 3rd switch element, the second resistance unit, first resistance unit of the first fixed level of drawing the I/O interface, the second fixed level, the first switch element, second switch unit, the 3rd switch element, the second resistance unit, the first resistance unit and drop-down I/O interface, on draw the first fixed level of I/O interface, the second fixed level, the first switch element, the second switch unit, the 3rd switch element, the second resistance unit and the first resistance unit are respectively GND, VDD, the 13 metal-oxide-semiconductor, the 16 metal-oxide-semiconductor, the 18 metal-oxide-semiconductor, weak pull-up resistor and strong pull-up resistor, the first fixed level of drop-down I/O interface, the second fixed level, the first switch element, the second switch unit, the 3rd switch element, the second resistance unit and the first resistance unit are respectively VDD, GND, the 14 metal-oxide-semiconductor, the 15 metal-oxide-semiconductor, the 17 metal-oxide-semiconductor, weak pull-up resistor and strong pull-up resistor.Be connected with GND on the source electrode of the 13 metal-oxide-semiconductor MN6, the 15 metal-oxide-semiconductor MN7 and the 17 metal-oxide-semiconductor MN8, all be connected with VDD on the source electrode of the 14 metal-oxide-semiconductor MP6, the 16 metal-oxide-semiconductor MP7 and the 18 metal-oxide-semiconductor MP8, the drain electrode of the 18 metal-oxide-semiconductor MP8 is connected with the drain electrode of the 14 metal-oxide-semiconductor MP6 by strong pull-up resistor R9, and the drain electrode of the 16 metal-oxide-semiconductor MP7 is connected with the drain electrode of the 14 metal-oxide-semiconductor MP6 by weak pull-up resistor R10.the drain electrode of the 17 metal-oxide-semiconductor MN8 is connected with the drain electrode of the 13 metal-oxide-semiconductor MN6 by strong pull down resistor R11, the drain electrode of the 15 metal-oxide-semiconductor MN7 is connected with the drain electrode of the 13 metal-oxide-semiconductor MN6 by weak pull down resistor R12, the drain electrode of the 13 metal-oxide-semiconductor MN6 is connected with the drain electrode of the 14 metal-oxide-semiconductor MP6, the drain electrode of the 13 metal-oxide-semiconductor MN6 is the input of I/O interface, be used for connecting keyboard, the 13 metal-oxide-semiconductor MN6, the 14 metal-oxide-semiconductor MP6, the 15 metal-oxide-semiconductor MN7, the 16 metal-oxide-semiconductor MP7, the grid of the 17 metal-oxide-semiconductor MN8 and the 18 metal-oxide-semiconductor MP8 all is connected with on-off controller.Wherein, the 13 metal-oxide-semiconductor MN6, the 15 metal-oxide-semiconductor MN7 and the 17 metal-oxide-semiconductor MN8 are the NMOS pipe, the 14 metal-oxide-semiconductor MP6, the 16 metal-oxide-semiconductor MP7 and the 18 metal-oxide-semiconductor MP8 are the PMOS pipe, and the resistance of strong pull-up resistor R9, weak pull-up resistor R10, strong pull down resistor R11 and weak pull down resistor R12 is respectively 20k, 170k, 50k and 500k.
The grid level of the 13 metal-oxide-semiconductor MN6, the 14 metal-oxide-semiconductor MP6, the 15 metal-oxide-semiconductor MN7, the 16 metal-oxide-semiconductor MP7, the 17 metal-oxide-semiconductor MN8 and the 18 metal-oxide-semiconductor MP8 is labeled as respectively S13, S14, S15, S16, S17 and S18 in Figure 12.On-off controller is by the level of the configuration of one group of control signal S13, S14, S15, S16, S17 and S18, and when S13, S14, S16 and S18 are high level, when S15 and S17 were low level, upper drop-down I/O interface was in the output low level state; When S14 is high level, S13, S15, S17 and S18 are low level, and when S16 was arbitrary value, upper drop-down I/O interface was in band and draws input state on strong; When S14 and S18 are high level, when S13, S15, S16 and S17 were low level, upper drop-down I/O interface was in band and draws input state on weak; When S16 and S18 are high level, when S13, S14, S15 and S17 were low level, upper drop-down I/O interface was in the output high level state; When S13 is low level, S14, S16, S17 and S18 are high level, and when S15 was arbitrary value, upper drop-down I/O interface is in was with strong drop-down input state; When S13 and S17 are low level, when S14, S15, S16 and S18 were high level, upper drop-down I/O interface was in the weak drop-down input state of band.
Embodiment six:
With reference to Figure 13, output state control module, the first input state control module and the second input state control module of drawing output state control module, the first input state control module and the second input state control module and the drop-down I/O interface of I/O interface on described drop-down I/O interface has.Be provided with the 19 metal-oxide-semiconductor MN9, the 20 metal-oxide-semiconductor MP9, the 21 metal-oxide-semiconductor MN10, the 22 metal-oxide-semiconductor MN11, the 23 metal-oxide-semiconductor MP10, the 24 metal-oxide-semiconductor MP11, strong pull-up resistor R13, weak pull-up resistor R14, strong pull down resistor R15 and weak pull down resistor R16.The 19 metal-oxide-semiconductor MN9 and the 21 metal-oxide-semiconductor MN10 source electrode on be connected with GND, the drain electrode of the 21 metal-oxide-semiconductor MN10 is serially connected with weak pull down resistor R16 and strong pull down resistor R15 successively, the other end of strong pull down resistor R15 is connected with the drain electrode of the 19 metal-oxide-semiconductor MN9, and the source electrode of the 22 metal-oxide-semiconductor MN11 and drain electrode are connected in parallel on the two ends of weak pull down resistor R16.The 20 metal-oxide-semiconductor MP9 and the 23 metal-oxide-semiconductor MP10 source electrode on all be connected with VDD, the drain electrode of the 23 metal-oxide-semiconductor MP10 is serially connected with weak pull-up resistor R14 and strong pull-up resistor R13 successively, the other end of strong pull-up resistor R13 is connected with the drain electrode of the 20 metal-oxide-semiconductor MP9, and the source electrode of the 24 metal-oxide-semiconductor MP11 and drain electrode are connected in parallel on the two ends of weak pull-up resistor R14.The drain electrode of the 20 metal-oxide-semiconductor MP9 is connected with the drain electrode of the 19 metal-oxide-semiconductor MN9, the drain electrode of the 20 metal-oxide-semiconductor MP9 is the input of I/O interface, be used for connecting keyboard, the grid of the 19 metal-oxide-semiconductor MN9, the 20 metal-oxide-semiconductor MP9, the 21 metal-oxide-semiconductor MN10, the 22 metal-oxide-semiconductor MN11, the 23 metal-oxide-semiconductor MP10 and the 24 metal-oxide-semiconductor MP11 all is connected with scanning monitor.Wherein, the 19 metal-oxide-semiconductor MN9, the 21 metal-oxide-semiconductor MN10 and the 22 metal-oxide-semiconductor MN11 are the NMOS pipe, the 20 metal-oxide-semiconductor MP9, the 23 metal-oxide-semiconductor MP10 and the 24 metal-oxide-semiconductor MP11 are the PMOS pipe, and the resistance of strong pull-up resistor R13, weak pull-up resistor R14, strong pull down resistor R15 and weak pull down resistor R16 is respectively 35k, 420k, 40k and 280k.
The grid level of the 19 metal-oxide-semiconductor MN9, the 20 metal-oxide-semiconductor MP9, the 21 metal-oxide-semiconductor MN10, the 22 metal-oxide-semiconductor MN11, the 23 metal-oxide-semiconductor MP10 and the 24 metal-oxide-semiconductor MP11 is labeled as respectively S19, S20, S21, S22, S23 and S24 in Figure 13.Scanning monitor is by the level of the configuration of one group of control signal S19, S20, S21, S22, S23 and S24, and when S21 is low level, S22 and S24 are arbitrary value, and when S19, S20 and S23 were high level, upper drop-down I/O interface was in the output low level state; When S20 is high level, S22 is arbitrary value, and when S19, S21, S23 and S24 were low level, upper drop-down I/O interface was in band and draws input state on strong; When S20 and S24 are high level, S22 is arbitrary value, and when S19, S21 and S23 were low level, upper drop-down I/O interface was in band and draws input state on weak; When S23 is high level, S22 and S24 are arbitrary value, and when S19, S20 and S21 were low level, upper drop-down I/O interface was in the output high level state; When S19 is low level, S24 is arbitrary value, and when S20, S21, S22 and S23 were high level, upper drop-down I/O interface is in was with strong drop-down input state; When S19 and S22 are low level, S24 is arbitrary value, and when S20, S21 and S23 were high level, upper drop-down I/O interface was in the weak drop-down input state of band.
For upper drop-down I/O interface and the control signal in embodiment five and embodiment six, describe low-power consumption keyboard scanning method of the present invention in detail, describe as an example of the number N of I/O interface=6 example, the I/O interface can be expressed as respectively P1, P2, P3, P4, P5 and P6.
The present invention is low, and merit dynamically consumes keyboard scanning method, comprises the steps:
A) keyboard configuration is become to have the stepped keyboard of 6 I/O interfaces, be respectively P1-P6, stepped keyboard comprises 15 buttons, is respectively K01-K15, connects a button between any two I/O interfaces, and stepped keyboard is with reference to Figure 14;
B) six kinds of I/O Interface status as embodiment five and embodiment six described in are set, are respectively output low level state, band and draw on strong input state, band to draw input state on weak, export high level state, be with drop-down input state a little less than strong drop-down input state and band;
C) scan period of default scanning monitor is that the control information of 20ms and default control signal is S13-S18 and the S19-S24 described in embodiment five and embodiment six;
D) scanning monitor configures the state of all I/O interfaces by control signal, and the I/O interface of keyboard is carried out periodic scan and carries out button and detect:
D1. any one the I/O interface that configures in all I/O interface P1-P6 is in the output low level state, draw input state on a little less than other all I/O interfaces are in and are with, detect respectively the input value that all are in input state I/O interface, if high level all detected, represent that all are scanned with the button that the mouth I/O interface that is in output state is connected, and enter steps d 2; Any one is in input state I/O interface and low level detected else if, and expression is connected to this I/O interface and the button that is between output state I/O interface is pressed, the output key detection signal;
D2. be to draw input state on being with by force with the I/O interface configuration that is in output state in steps d 1, other all I/O interfaces draw input state on a little less than being with, and this step is not carried out the button detection; If all I/O interface P1-P6 all were scanned, enter steps d 3, continue scanning otherwise get back to steps d 1;
D3. configure all I/O interfaces and be in the input state that band draws on weak, the detection that stops key, this beat is held time and can be set in advance; Then the scan period according to scanning monitor enters steps d 4;
D4. any one the I/O interface that configures in all I/O interface P1-P6 is in the output high level state, other all I/O interfaces are in the weak drop-down input state of band, detect respectively the input value that all are in input state I/O interface, if low level all detected, represent that all are scanned with the button that the mouth I/O interface that is in output state is connected, and enter steps d 5; Any one is in input state I/O interface and high level detected else if, and expression is connected to this I/O interface and the button that is between output state I/O interface is pressed, the output key detection signal;
D5. with the I/O interface configuration that is in output state in steps d 4 for being with strong drop-down input state, other all I/O interfaces are the weak drop-down input state of band, this step is not carried out button and is detected; If all I/O interface P1-P6 all were scanned, enter steps d 6, continue scanning otherwise get back to steps d 4;
D6. configure all I/O interfaces and be in the weak drop-down input state of band, the detection that stops key, this beat is held time and can be set in advance; Then return to steps d 1 according to the scan period of scanning monitor.
Be that under the strong pull-up resistor or strong pull down resistor of 5K-50K, scanning means is at the electric current of all internal consumptions of whole scanning at Standard resistance range below by the emulated data explanation.Draw I/O interface and its scan method as example in the embodiment one, the average current of the single I/O interface of emulation within a scan period describes, and wherein the oscillator electric current is not taken into account.
It is that VDD is 3V that simulated conditions is set, and temperature is 25 degrees centigrade, and weak pull-up resistor or weak pull down resistor are 150K, and weak pull-up resistor or weak pull down resistor can be selected the different resistances in 50K-500K.Comprise the d1-d4 step in the scanning step of the upper I/O of drawing interface, wherein, d1 is two clock cycle, and d2 is a clock cycle, and d3 is a clock cycle, circulation in the d2-d3 step is 16 times altogether, d4 is set to 0, and therefore, a complete scan period is 34 clock cycle, each clock cycle is 50us, and clock is provided by oscillator.Because of the difficult judgement of the size of parasitic capacitance, select different capacitor equivalent parasitic capacitances to judge when emulation.
Obtain data as shown in table 1 below by emulation, when in table, the parasitic capacitance of file is different value, the corresponding current value that consumes, when the different strong pull-up resistor of walking crosswise is different value, the corresponding current value that consumes, in table 1, last classifies the current value that consumes that only has weak pull-up resistor in prior art as under different parasitic capacitances, and in table, the unit of current value is nA.
The single I/O interface of table 1 is corresponding current value under different parasitic capacitances and different strong pull-up resistor
Figure BDA0000269014441
As can be seen from Table 1, under the strong pull-up resistor of similar resistance, parasitic capacitance is larger, and in the whole scan period, the electric current of mean consumption is larger; Under identical parasitic capacitance, the resistance of strong pull-up resistor is less, and in the whole scan period, the electric current of mean consumption is less; When not using strong pull-up resistor, single I/O interface at the current value that consumes under different parasitic capacitances obviously greater than the current value after having increased strong pull-up resistor.Because during standby, the consumption of electric current is mainly in the d2-d3 step, and d2-d3 need to circulate 16 times a complete scan period, therefore obtain emulated data as shown in table 2 below.
Table 2 all the I/O interfaces at different parasitic capacitances and the different current value of correspondence under pull-up resistor by force
Figure BDA0000269014442
More than considering that general chip pin adds that pcb board is easy to reach 20pf for the parasitic capacitance of each I/O interface, be that 20pf is briefly described at this host age preference electric capacity.Supposing to provide the electric current that the oscillator of scan period itself consumes is 0.5uA, and in the prior art, when only adopting weak pull-up resistor for the 150K in table, the electric current of standby is 0.5uA+1.575 uA when scanning, is 2.075 uA altogether; And under technology of the present invention, the electric current of standby is 0.5uA+0.704 uA when scanning, is 1.204 uA altogether, this means when using device of the present invention to scan, make the stand-by time of product extend the time of (2.075 uA-1.204 uA)/2.075 uA*100%, be 42%.
For the representative embodiment one to six of the present invention, all can obtain corresponding emulated data with reference to above-mentioned emulation mode, do not repeat them here.In above-mentioned explanation, all special instructions that do not add all adopt routine techniques means of the prior art.

Claims (14)

1. I/O interface circuit, comprise the output state control module and the first input state control module that are connected with the I/O interface, the output state control module comprises the first fixed level and the first switch element that is connected in turn, the other end of the first switch element is connected with the I/O interface, the first input state control module comprises the second fixed level that is connected in turn, second switch unit and the second resistance unit, the other end of the second resistance unit is connected with the I/O interface, the control end of the first switch element and second switch unit is connected with the on-off controller for control switch cell conduction or disconnection, the first fixed level is opposite with the second fixed level logic, it is characterized in that, described I/O interface circuit also is connected with the second input state control module, the second input state control module is provided with for shortening I/O interface level the first resistance unit and the 3rd switch element of switching time, the second fixed level, the 3rd switch element is connected in turn with the first resistance unit, the other end of the first resistance unit is connected with the I/O interface, the control end of the 3rd switch element is connected with on-off controller, the conducting state of the first switch element, second switch unit and the 3rd switch element is controlled in on-off controller output control information, and configure respectively the I/O interface that is connected with the first switch element place module of conducting and be output the first fixed level state, the I/O interface that is connected with place, the second switch unit module of conducting is the first input state, and the I/O interface that is connected with the 3rd switch element place module of conducting is the second input state, described on-off controller comprises one group of control information at least, and making the I/O interface configuration that is in output the first fixed level state is the second input state.
2. I/O interface circuit according to claim 1, it is characterized in that, described I/O interface circuit be set up in being pull-up structure on draw the I/O interface circuit, the first fixed level is low level, the second fixed level is high level, described the first resistance unit is strong pull-up resistor, the second resistance unit is weak pull-up resistor, the first switch element, second switch unit and the 3rd switch element are respectively be used to the metal-oxide-semiconductor of controlling above-mentioned resistance access state, described output the first fixed level state is the output low level state, the first input state draws input state on a little less than being with, the second input state draws input state on being with by force.
3. I/O interface circuit according to claim 1, it is characterized in that, described I/O interface circuit is the drop-down I/O interface circuit of built-in pull-down structure, the first fixed level is high level, the second fixed level is low level, described the first resistance unit is strong pull down resistor, the second resistance unit is weak pull down resistor, the first switch element, second switch unit and the 3rd switch element are respectively be used to the metal-oxide-semiconductor of controlling above-mentioned resistance access state, described output the first fixed level state is the output high level state, the first input state is the weak drop-down input state of band, the second input state is for being with strong drop-down input state.
4. I/O interface circuit according to claim 1, it is characterized in that, described I/O interface circuit is for being set up the upper drop-down I/O interface circuit of pull-up structure and pull-down structure in the while, upper drop-down I/O interface circuit comprises two groups of I/O interface circuits, is respectively and draws I/O interface circuit and drop-down I/O interface circuit; The first fixed level that draws the I/O interface circuit on described is low level, the second fixed level is high level, the first resistance unit is strong pull-up resistor, the second resistance unit is weak pull-up resistor, the first switch element, second switch unit and the 3rd switch element are respectively be used to the metal-oxide-semiconductor of controlling above-mentioned resistance access state, the first fixed level state of exporting is the output low level state, and the first input state draws input state for band on weak, and the second input state draws input state for band on strong; The first fixed level of described drop-down I/O interface circuit is high level, the second fixed level is low level, the first resistance unit is strong pull down resistor, the second resistance unit is weak pull down resistor, the first switch element, second switch unit and the 3rd switch element are respectively be used to the metal-oxide-semiconductor of controlling above-mentioned resistance access state, the first fixed level state of exporting is the output high level state, and the first input state is the weak drop-down input state of band, and the second input state is for being with strong drop-down input state.
5. I/O interface circuit according to claim 2, is characterized in that, described the first fixed level is GND, and the second fixed level is VDD, and the first switch element is the first metal-oxide-semiconductor, and the second switch unit is the 3rd metal-oxide-semiconductor, and the 3rd switch element is the second metal-oxide-semiconductor; The source electrode of the second metal-oxide-semiconductor and the 3rd metal-oxide-semiconductor all is connected with VDD, the source electrode of the first metal-oxide-semiconductor is connected with GND, the drain electrode of the second metal-oxide-semiconductor and the 3rd metal-oxide-semiconductor is connected with weak pull-up resistor with strong pull-up resistor respectively, the other end of strong pull-up resistor and weak pull-up resistor is connected with the drain electrode of the first metal-oxide-semiconductor, the drain electrode of the first metal-oxide-semiconductor is the input of I/O interface, and the grid of the first metal-oxide-semiconductor, the second metal-oxide-semiconductor and the 3rd metal-oxide-semiconductor all is connected with on-off controller.
6. I/O interface circuit according to claim 3, is characterized in that, described the first fixed level is VDD, and the second fixed level is GND, and the first switch element is the 4th metal-oxide-semiconductor, and the second switch unit is the 6th metal-oxide-semiconductor, and the 3rd switch element is the 5th metal-oxide-semiconductor; The source electrode of the 5th metal-oxide-semiconductor and the 6th metal-oxide-semiconductor all is connected with GND, the source electrode of the 4th metal-oxide-semiconductor is connected with VDD, the drain electrode of the 5th metal-oxide-semiconductor and the 6th metal-oxide-semiconductor is connected with weak pull down resistor with strong pull down resistor respectively, the other end of strong pull down resistor and weak pull down resistor is connected with the drain electrode of the 4th metal-oxide-semiconductor, the drain electrode of the 4th metal-oxide-semiconductor is the input of I/O interface, and the grid of the 4th metal-oxide-semiconductor, the 5th metal-oxide-semiconductor and the 6th metal-oxide-semiconductor is connected with on-off controller.
7. I/O interface circuit according to claim 4, it is characterized in that, draw the first fixed level of I/O interface circuit on described, the second fixed level, the first switch element, the second switch unit, the 3rd switch element, the second resistance unit and the first resistance unit are respectively GND, VDD, the 13 metal-oxide-semiconductor, the 16 metal-oxide-semiconductor, the 18 metal-oxide-semiconductor, weak pull-up resistor and strong pull-up resistor, the first fixed level of drop-down I/O interface, the second fixed level, the first switch element, the second switch unit, the 3rd switch element, the second resistance unit and the first resistance unit are respectively VDD, GND, the 14 metal-oxide-semiconductor, the 15 metal-oxide-semiconductor, the 17 metal-oxide-semiconductor, weak pull down resistor and strong pull down resistor, the 13 metal-oxide-semiconductor, the source electrode of the 15 metal-oxide-semiconductor and the 17 metal-oxide-semiconductor all is connected with GND, the 14 metal-oxide-semiconductor, the source electrode of the 16 metal-oxide-semiconductor and the 18 metal-oxide-semiconductor all is connected with VDD, the drain electrode of the 18 metal-oxide-semiconductor is connected with the drain electrode of the 14 metal-oxide-semiconductor by strong pull-up resistor, the drain electrode of the 16 metal-oxide-semiconductor is connected with the drain electrode of the 14 metal-oxide-semiconductor by weak pull-up resistor, the drain electrode of the 17 metal-oxide-semiconductor is connected with the drain electrode of the 13 metal-oxide-semiconductor by strong pull down resistor, the drain electrode of the 15 metal-oxide-semiconductor is connected with the drain electrode of the 13 metal-oxide-semiconductor by weak pull down resistor, the drain electrode of the 13 metal-oxide-semiconductor is connected with the drain electrode of the 14 metal-oxide-semiconductor, the drain electrode of the 13 metal-oxide-semiconductor is the input of I/O interface, the 13 metal-oxide-semiconductor, the 14 metal-oxide-semiconductor, the 15 metal-oxide-semiconductor, the 16 metal-oxide-semiconductor, the grid of the 17 metal-oxide-semiconductor and the 18 metal-oxide-semiconductor all is connected with on-off controller.
8. according to claim 2 or 5 described I/O interface circuits, is characterized in that, the Standard resistance range of described strong pull-up resistor is 5K-50K, and the Standard resistance range of weak pull-up resistor is 50K-500K.
9. according to claim 3 or 6 described I/O interface circuits, is characterized in that, the Standard resistance range of described strong pull down resistor is 5K-50K, and the Standard resistance range of weak pull down resistor is 50K-500K.
10. according to claim 4 or 7 described I/O interface circuits, is characterized in that, the Standard resistance range of described strong pull-up resistor and strong pull down resistor is 5K-50K, and the Standard resistance range of weak pull-up resistor and weak pull down resistor is 50K-500K.
11. a low-power consumption key scan device, described scanning means is connected with a button at least, it is characterized in that, the two ends of described button are connected with respectively I/O interface circuit as claimed in claim 1.
12. a low-power consumption key scanning method is characterized in that the realization of described scan method comprises the steps: based on scanning means as claimed in claim 11
A) preset the scan period of scanning monitor and the control signal of switching for the I/O Interface status;
B) scanning monitor output control signal configures the state of all I/O interfaces, and the I/O interface of button is carried out periodic scan and carries out button and detect:
B1. configure any one I/O interface and be in output the first fixed level state, other all I/O interfaces are in the first input state, detect to be in the I/O interface of the first input state, if the saltus step of level detected, represent that button is pressed, otherwise enter step b2;
B2. configuring the I/O interface that is in output the first fixed level state is the second input state, if all buttons all are scanned, enters step b3, continues to detect otherwise return to step b2;
B3. configure all I/O interfaces and be in the first input state, return to step b1 according to the scan period of scanning monitor and restart to detect.
13. a low-power consumption dynamic keyboard scan method is characterized in that the realization of described scan method comprises the steps: based on drawing the I/O interface circuit on as claimed in claim 2
A) keyboard configuration is become to have the stepped keyboard of N I/O interface, connect a button between any two I/O interfaces, any one I/O interface is connected with GND by a button;
B) state that the I/O interface is set is three kinds, is respectively output low level state, band and draws on strong input state and band to draw input state on weak;
C) preset the scan period of scanning monitor and the control signal of switching for the I/O Interface status;
D) scanning monitor configures the state of all I/O interfaces by control signal, and the I/O interface of keyboard is carried out periodic scan and carries out button and detect:
D1. configure all I/O interfaces and be in band and draw input state on weak, scan the incoming level of all I/O interfaces, if the level saltus step of I/O interface detected, output key detection signal, otherwise enter steps d 2;
D2. configure any one I/O interface and be in the output low level state, draw input state on a little less than other all I/O interfaces are in and are with, scan all and be in the I/O interface that band draws input state on weak, if the level saltus step of above-mentioned any I/O interface detected, output key detection signal, otherwise enter steps d 3;
D3. the I/O interface that is in the output low level state in configuration step d2 is to draw input state on being with by force, and other all I/O interfaces draw input state on a little less than being with; If all I/O interfaces all are scanned, enter steps d 4, continue scanning otherwise return to steps d 2;
D4. configure all I/O interfaces and be in band and draw input state on weak, detections that stop key returned to steps d 1 according to the scan period of scanning monitor and restarted to scan.
14. a low-power consumption dynamic keyboard scan method is characterized in that, the realization of described scan method comprises the steps: based on drop-down I/O interface circuit as claimed in claim 3
A) keyboard configuration is become to have the stepped keyboard of N I/O interface, connect a button between any two I/O interfaces, any one I/O interface is connected with VDD by a button;
B) state that the I/O interface is set is three kinds, is respectively the output high level state, is with strong drop-down input state and the weak drop-down input state of band;
C) preset the scan period of scanning monitor and the control signal of switching for the I/O Interface status;
D) scanning monitor configures the state of all I/O interfaces by control signal, and the I/O interface of keyboard is carried out periodic scan and carries out button and detect:
D1. configure all I/O interfaces and be in the weak drop-down input state of band, scan the incoming level of all I/O interfaces, if the level saltus step of I/O interface detected, output key detection signal, otherwise enter steps d 2;
D2. configure any one I/O interface and be in defeated high level state, other all I/O interfaces are in the weak drop-down input state of band, scan the I/O interface that all are in the weak drop-down input state of band, if the level saltus step of above-mentioned any I/O interface detected, output key detection signal, otherwise enter steps d 3;
D3. be in the I/O interface of output high level state in configuration step d2 for being with strong drop-down input state, other all I/O interfaces are the weak drop-down input state of band; If all I/O interfaces all are scanned, enter steps d 4, continue scanning otherwise return to steps d 2;
D4. configure all I/O interfaces and be in the weak drop-down input state of band, the detection that stops key is returned to steps d 1 according to the scan period of scanning monitor and is restarted scanning.
CN201210594660.8A 2012-12-31 2012-12-31 I/O interface circuit and comprise key scan device and the scan method of this circuit Active CN103095308B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210594660.8A CN103095308B (en) 2012-12-31 2012-12-31 I/O interface circuit and comprise key scan device and the scan method of this circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210594660.8A CN103095308B (en) 2012-12-31 2012-12-31 I/O interface circuit and comprise key scan device and the scan method of this circuit

Publications (2)

Publication Number Publication Date
CN103095308A true CN103095308A (en) 2013-05-08
CN103095308B CN103095308B (en) 2015-07-29

Family

ID=48207512

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210594660.8A Active CN103095308B (en) 2012-12-31 2012-12-31 I/O interface circuit and comprise key scan device and the scan method of this circuit

Country Status (1)

Country Link
CN (1) CN103095308B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297020A (en) * 2013-05-14 2013-09-11 福建师范大学 Key circuit capable of increasing quantities of keys
CN103354455A (en) * 2013-08-05 2013-10-16 杭州士兰微电子股份有限公司 Key scanning method and circuit of triangular keyboard and triangular keyboard device
CN107666323A (en) * 2016-07-27 2018-02-06 佛山市顺德区美的电热电器制造有限公司 Switch key scanning circuit and electrical equipment
WO2020099453A1 (en) * 2018-11-14 2020-05-22 Delphi Technologies Ip Limited Automotive circuit between ecu and powertrain component

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4263582A (en) * 1979-08-24 1981-04-21 Illinois Tool Works Inc. Keyboard with an externally programmable repeat rate and repeat delay rate counter
JPS58197542A (en) * 1982-05-14 1983-11-17 Hitachi Ltd Key code reader
CN101013896A (en) * 2006-11-01 2007-08-08 深圳市菉华半导体有限公司 Keyboard scanning circuit and scanning method thereof
CN101330294A (en) * 2007-06-19 2008-12-24 富士通株式会社 Key control circuit, electronic apparatus, portable device, and key control method
JP2009245026A (en) * 2008-03-28 2009-10-22 Kyocera Corp Key detection device and portable electronic equipment
CN201830241U (en) * 2010-08-10 2011-05-11 康佳集团股份有限公司 Keyboard scanning circuit
CN102075194A (en) * 2009-11-23 2011-05-25 鸿富锦精密工业(深圳)有限公司 Circuit and method for scanning keyboard and electronic equipment
CN102185614A (en) * 2011-05-27 2011-09-14 惠州Tcl移动通信有限公司 Key device and key scanning method thereof
CN202602621U (en) * 2012-06-07 2012-12-12 无锡华润矽科微电子有限公司 Tower type keyboard scanning circuit structure
CN203071915U (en) * 2012-12-31 2013-07-17 杭州士兰微电子股份有限公司 An I/O interface circuit and a button scanning device containing the same

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4263582A (en) * 1979-08-24 1981-04-21 Illinois Tool Works Inc. Keyboard with an externally programmable repeat rate and repeat delay rate counter
JPS58197542A (en) * 1982-05-14 1983-11-17 Hitachi Ltd Key code reader
CN101013896A (en) * 2006-11-01 2007-08-08 深圳市菉华半导体有限公司 Keyboard scanning circuit and scanning method thereof
CN101330294A (en) * 2007-06-19 2008-12-24 富士通株式会社 Key control circuit, electronic apparatus, portable device, and key control method
JP2009245026A (en) * 2008-03-28 2009-10-22 Kyocera Corp Key detection device and portable electronic equipment
CN102075194A (en) * 2009-11-23 2011-05-25 鸿富锦精密工业(深圳)有限公司 Circuit and method for scanning keyboard and electronic equipment
CN201830241U (en) * 2010-08-10 2011-05-11 康佳集团股份有限公司 Keyboard scanning circuit
CN102185614A (en) * 2011-05-27 2011-09-14 惠州Tcl移动通信有限公司 Key device and key scanning method thereof
CN202602621U (en) * 2012-06-07 2012-12-12 无锡华润矽科微电子有限公司 Tower type keyboard scanning circuit structure
CN203071915U (en) * 2012-12-31 2013-07-17 杭州士兰微电子股份有限公司 An I/O interface circuit and a button scanning device containing the same

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297020A (en) * 2013-05-14 2013-09-11 福建师范大学 Key circuit capable of increasing quantities of keys
CN103354455A (en) * 2013-08-05 2013-10-16 杭州士兰微电子股份有限公司 Key scanning method and circuit of triangular keyboard and triangular keyboard device
CN103354455B (en) * 2013-08-05 2016-08-10 杭州士兰微电子股份有限公司 The key scanning method of triangle keyboard, circuit and triangular key disc apparatus
CN107666323A (en) * 2016-07-27 2018-02-06 佛山市顺德区美的电热电器制造有限公司 Switch key scanning circuit and electrical equipment
CN107666323B (en) * 2016-07-27 2023-10-24 佛山市顺德区美的电热电器制造有限公司 Switch button scanning circuit and electric equipment
WO2020099453A1 (en) * 2018-11-14 2020-05-22 Delphi Technologies Ip Limited Automotive circuit between ecu and powertrain component

Also Published As

Publication number Publication date
CN103095308B (en) 2015-07-29

Similar Documents

Publication Publication Date Title
CN105988495B (en) A kind of LDO overshoot protections circuit
CN103095308B (en) I/O interface circuit and comprise key scan device and the scan method of this circuit
CN109347464A (en) Electrification reset/power-fail detection circuit and its implementation with zero quiescent dissipation
CN103023369A (en) Capacitance discharge circuit and power converter
CN203071915U (en) An I/O interface circuit and a button scanning device containing the same
CN106532902A (en) Mobile terminal dual-battery control device and method
CN102185305B (en) High-reliability power supply clamping ESD (Electronic Static Discharge) protection circuit
CN104111390A (en) Device for realizing automatic powering-on/off test
CN105610233B (en) Multi-power-supply parallel power supply system and power supply short-circuit protection circuit
CN202159236U (en) Standby switch circuit and miniature electronic device
CN105530339B (en) A kind of mobile terminal and its circuit for forced shutdown
CN206075091U (en) A kind of circuit arrangement of reserved to start up or close device
CN208797824U (en) Output driving circuit and chip
CN107707248A (en) Same OR circuit, adjusting method and NOR gate circuit
CN102487277B (en) Induction installation and inducing method
CN208796098U (en) Detection circuit and its CC logic control chip
CN215526397U (en) Wake-up circuit of controller and electronic equipment
CN206557302U (en) A kind of test device
CN109814437A (en) Zero-power-consumption standby wake-up circuit and electrical equipment
CN105005727A (en) Control system based on dynamic password and USBKEY and control method for control system
CN115425716A (en) Electronic device
CN205427710U (en) Start circuit, motherboard and computer of motherboard
CN209640425U (en) Power-on and power-off hookup, wiring board and equipment applied to electric car
CN101958652B (en) Power supply multigroup output circuit
CN109684762B (en) Chip and setting circuit of pin thereof

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