CN109061455A - A kind of four gear detection devices of toggle switch and its implementation - Google Patents
A kind of four gear detection devices of toggle switch and its implementation Download PDFInfo
- Publication number
- CN109061455A CN109061455A CN201810921501.1A CN201810921501A CN109061455A CN 109061455 A CN109061455 A CN 109061455A CN 201810921501 A CN201810921501 A CN 201810921501A CN 109061455 A CN109061455 A CN 109061455A
- Authority
- CN
- China
- Prior art keywords
- pin
- feet
- power supply
- resistor
- gear
- 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
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R31/00—Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
- G01R31/327—Testing of circuit interrupters, switches or circuit-breakers
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Control Of Transmission Device (AREA)
- Keying Circuit Devices (AREA)
Abstract
The invention discloses a kind of four gear detection devices of toggle switch, including single-chip microcontroller pin and four gear toggle switches, the single-chip microcontroller pin includes pin I/O1 and pin I/O2, the four gears toggle switch includes four gears and six groups of pins, wherein, two pins connect single-chip microcontroller pin, the end VSS of two pin connection power supplys, the vdd terminal of two pin connection power supplys, the invention also discloses a kind of implementation methods of four gear detection devices of toggle switch.The present invention can effectively reduce the requirement that can use single-chip microcontroller number of pins, and pull down resistor on outside can be effectively reduced, reduce to the requirement of the available number of pins of single-chip microcontroller, the influence that also less external devices fail to product quality has better Products Compatibility and cost advantage.
Description
Technical field
The invention belongs to single-chip microcontroller toggle switch shift detection technical fields, and in particular to a kind of four gears of toggle switch
Detection device and its implementation.
Background technique
Under the overall background of all things on earth interconnection, the equipment with control and networking is more and more, and amount is also more and more, and market is to production
The cost of product also require it is higher and higher, in order to adapt to low cost requirement, we are when selecting single-chip microcontroller, it is often desired to can use
The lower monolithic of homologous series number of pins is more competitive to realize more functions, such product ability.Therefore existing toggle switch
There are following technical problems for shift detection technology: 1, the shift detection of toggle switch is usually that a gear needs a pin to know
Not;2, switch pin needs on many outsides pull down resistor to do voltage matches.
Summary of the invention
The purpose of the present invention is to provide a kind of four gear detection devices of toggle switch, to solve in above-mentioned background technique
The problem of proposition.Four gear detection devices of a kind of toggle switch provided by the invention have Products Compatibility good and cost
Low feature.
Another object of the present invention is to provide a kind of four gear detection devices of toggle switch and its implementation.
To achieve the above object, the invention provides the following technical scheme: a kind of four gear detection devices of toggle switch, packet
Single-chip microcontroller pin and four gear toggle switches are included, the single-chip microcontroller pin includes pin I/O1 and pin I/O2, and four gear is stirred
Switch includes four gears and six groups of pins, wherein two pins connect single-chip microcontroller pin, the VSS of two pin connection power supplys
End, the vdd terminal of two pin connection power supplys.
In the present invention further, the pin I/O1 is identical with the structure of pin I/O2, include pull-up resistor and
Pull down resistor.
In the present invention further, one end of the pull-up resistor is connect with pin I/O, and the other end of pull-up resistor
It is connect with the vdd terminal of power supply, the vdd terminal of pull-up resistor and power supply is connected with switch, one end of the pull down resistor and pin I/O
Connection, and the end VSS of the other end of pull down resistor and power supply connects, the end VSS of pull down resistor and power supply is also connected with switch.
In the present invention further, four gears be followed successively by from top to bottom one grade, second gear, three gear and four gear.
In the present invention further, six groups of pins are followed successively by 1 foot, 2 feet, 3 feet, 4 feet, 5 feet and 6 feet from top to bottom.
In the present invention further, the implementation method of four gear detection devices of toggle switch, including it is following
Step:
(1), the vdd terminal of 1 foot of four gear toggle switches and 2 feet connection power supply, the end VSS of 5 feet and 6 feet connection power supply, 3
Foot and 4 feet are separately connected pin I/O1 and pin I/O2;
(2), pin I/O1 first closes the switch internal pull-up resistor, and the vdd terminal of 3 feet and power supply is connected at this time, pin
I/O level is VDD;
(3), pin I/O1 again closes the switch internal pull down resistor, and 3 feet are still connected with the VDD of power supply at this time, this
When pin I/O level be still VDD;
(4), pin I/O2 first closes the switch internal pull-up resistor, and 4 feet are hanging at this time, does not connect to power supply, at this time
Pin I/O level is VDD;
(5), pin I/O2 again closes the switch internal pull down resistor, and 4 feet are hanging at this time, does not connect to power supply, at this time
Pin I/O level is VSS.
In the present invention further, the implementation method of four gear detection devices of toggle switch, the pin
I/O1 is identical with the structure of pin I/O2, includes pull-up resistor and pull down resistor;One end of the pull-up resistor and pin I/O
Connection, and the vdd terminal of the other end of pull-up resistor and power supply connects, the vdd terminal of pull-up resistor and power supply is connected with switch, described
One end of pull down resistor is connect with pin I/O, and the end VSS of the other end of pull down resistor and power supply connects, pull down resistor and electricity
The end VSS in source is also connected with switch;Four gears be followed successively by from top to bottom one grade, second gear, three gear and four gear;Six groups of pins from
1 foot, 2 feet, 3 feet, 4 feet, 5 feet and 6 feet are followed successively by under.
Compared with prior art, the beneficial effects of the present invention are:
The present invention, which can be effectively reduced, can use the requirement of number of pins to single-chip microcontroller, and can effectively reduce on outside and pull down
Resistance reduces to the requirement of the available number of pins of single-chip microcontroller, the influence that also less external devices fail to product quality, tool
There are better Products Compatibility and cost advantage.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of single-chip microcontroller pin of the present invention and four gear toggle switches;
Fig. 2 is single-chip microcontroller pin of the present invention and four gear one grade of structural schematic diagram connecting of toggle switch;
Fig. 3 is the structural schematic diagram that pin I/O1 pull-up resistor of the present invention closes the switch;
Fig. 4 is the structural schematic diagram that pin I/O1 pull down resistor of the present invention closes the switch;
Fig. 5 is the structural schematic diagram that pin I/O2 pull-up resistor of the present invention closes the switch;
Fig. 6 is the structural schematic diagram that pin I/O2 pull down resistor of the present invention closes the switch;
In figure: 1, single-chip microcontroller pin;2, four gear toggle switch.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Embodiment
Please refer to Fig. 1-6, the present invention the following technical schemes are provided: a kind of four gear detection devices of toggle switch, including
Single-chip microcontroller pin 1 and four gear toggle switches 2, single-chip microcontroller pin 1 include pin I/O1 and pin I/O2, and four gear toggle switches 2 wrap
Include four gears and six groups of pins, wherein two pins connection single-chip microcontroller pins 1, the end VSS of two pins connection power supplys, two
The vdd terminal of a pin connection power supply.
Further, pin I/O1 is identical with the structure of pin I/O2, includes pull-up resistor and pull down resistor.
Further, one end of pull-up resistor is connect with pin I/O, and the vdd terminal of the other end of pull-up resistor and power supply
The vdd terminal of connection, pull-up resistor and power supply is connected with switch, and one end of the pull down resistor is connect with pin I/O, and pulls down electricity
The other end of resistance and the end VSS of power supply connect, and the end VSS of pull down resistor and power supply is also connected with switch.
Further, four gears be followed successively by from top to bottom one grade, second gear, three gear and four gear.
Further, six groups of pins are followed successively by 1 foot, 2 feet, 3 feet, 4 feet, 5 feet and 6 feet from top to bottom.
Further, the implementation method of four gear detection devices of toggle switch of the present invention, comprising the following steps:
(1), the vdd terminal of 1 foot of four gear toggle switches 2 and 2 feet connection power supply, the end VSS of 5 feet and 6 feet connection power supply, 3
Foot and 4 feet are separately connected pin I/O1 and pin I/O2, by taking one grade of judgment method as an example, other class and so on, such as Fig. 2
It is shown;
(2), pin I/O1 first closes the switch internal pull-up resistor, and the vdd terminal of 3 feet and power supply is connected at this time, such as schemes
Shown in 3, pin I/O level is VDD;
(3), pin I/O1 again closes the switch internal pull down resistor, and 3 feet are still connected with the VDD of power supply at this time, such as
Shown in Fig. 4, pin I/O level is still VDD at this time;
(4), pin I/O2 first closes the switch internal pull-up resistor, and 4 feet are hanging at this time, does not connect to power supply, and such as schemes
Shown in 5, pin I/O level is VDD at this time;
(5), pin I/O2 again closes the switch internal pull down resistor, and 4 feet are hanging at this time, does not connect to power supply, and such as schemes
Shown in 6, pin I/O level is VSS at this time.
(6), by adjusting gear, above two to five step is repeated, available four kinds of combinations as shown in the table are closed
System;
State | Default level | One grade of level | Two grades of level | Third gear level | Fourth gear level |
I/O-1 pull-up closure | VDD | VDD | VDD | VSS | VDD |
I/O-1 drop-down closure | VSS | VDD | VSS | VSS | VSS |
I/O-2 pull-up closure | VDD | VDD | VDD | VDD | VSS |
I/O-2 drop-down closure | VSS | VSS | VDD | VSS | VSS |
Four gears it can be seen from table, single-chip microcontroller realize four by the internal upper pull down resistor of two pin cooperations
Different assembled state, that is, single-chip microcontroller can determine what gear waved switch is in by these four states, reach
We want the purpose realized.
It although an embodiment of the present invention has been shown and described, for the ordinary skill in the art, can be with
A variety of variations, modification, replacement can be carried out to these embodiments without departing from the principles and spirit of the present invention by understanding
And modification, the scope of the present invention is defined by the appended.
Claims (7)
1. a kind of four gear detection devices of toggle switch, including single-chip microcontroller pin (1) and four gears toggle switch (2), feature
Be: the single-chip microcontroller pin (1) includes pin I/O1 and pin I/O2, and four gear toggle switch (2) includes four gears
With six groups of pins, wherein two pins connect single-chip microcontroller pin (1), and the end VSS of two pin connection power supplys, two pins connect
Connect the vdd terminal of power supply.
2. four gear detection devices of a kind of toggle switch according to claim 1, it is characterised in that: the pin I/O1
It is identical with the structure of pin I/O2, it include pull-up resistor and pull down resistor.
3. four gear detection devices of a kind of toggle switch according to claim 2, it is characterised in that: the pull-up resistor
One end connect with pin I/O, and the vdd terminal of the other end of pull-up resistor and power supply connect, the vdd terminal of pull-up resistor and power supply
It is connected with switch, one end of the pull down resistor is connect with pin I/O, and the end VSS of the other end of pull down resistor and power supply connects
It connects, the end VSS of pull down resistor and power supply is also connected with switch.
4. four gear detection devices of a kind of toggle switch according to claim 3, it is characterised in that: four gears are from upper
Be followed successively by under one grade, second gear, three gear and four gear.
5. four gear detection devices of a kind of toggle switch according to claim 4, it is characterised in that: six groups of pins are from upper
1 foot, 2 feet, 3 feet, 4 feet, 5 feet and 6 feet are followed successively by under.
6. the implementation method of four gear detection devices of toggle switch according to claim 1-5, feature exist
In, comprising the following steps:
(1), the vdd terminal of 1 foot of four gears toggle switch (2) and 2 feet connection power supply, the end VSS of 5 feet and 6 feet connection power supply, 3 feet
Pin I/O1 and pin I/O2 are separately connected with 4 feet;
(2), pin I/O1 first closes the switch internal pull-up resistor, and the vdd terminal of 3 feet and power supply is connected at this time, pin I/O
Level is VDD;
(3), pin I/O1 again closes the switch internal pull down resistor, and 3 feet are still connected with the VDD of power supply at this time, manages at this time
Foot I/O level is still VDD;
(4), pin I/O2 first closes the switch internal pull-up resistor, and 4 feet are hanging at this time, does not connect to power supply, at this time pin
I/O level is VDD;
(5), pin I/O2 again closes the switch internal pull down resistor, and 4 feet are hanging at this time, does not connect to power supply, at this time pin
I/O level is VSS.
7. the implementation method of four gear detection devices of toggle switch according to claim 6, it is characterised in that: the pipe
Foot I/O1 is identical with the structure of pin I/O2, includes pull-up resistor and pull down resistor;One end of the pull-up resistor and pin
I/O connection, and the vdd terminal of the other end of pull-up resistor and power supply connects, the vdd terminal of pull-up resistor and power supply is connected with switch,
One end of the pull down resistor is connect with pin I/O, and the end VSS of the other end of pull down resistor and power supply connects, pull down resistor
Switch is also connected with the end VSS of power supply;Four gears be followed successively by from top to bottom one grade, second gear, three gear and four gear;Six groups are drawn
Foot is followed successively by 1 foot, 2 feet, 3 feet, 4 feet, 5 feet and 6 feet from top to bottom.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810921501.1A CN109061455B (en) | 2018-08-14 | 2018-08-14 | Four-gear detection device of toggle switch and implementation method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810921501.1A CN109061455B (en) | 2018-08-14 | 2018-08-14 | Four-gear detection device of toggle switch and implementation method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109061455A true CN109061455A (en) | 2018-12-21 |
CN109061455B CN109061455B (en) | 2023-06-20 |
Family
ID=64678320
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810921501.1A Active CN109061455B (en) | 2018-08-14 | 2018-08-14 | Four-gear detection device of toggle switch and implementation method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109061455B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050073198A1 (en) * | 2003-09-17 | 2005-04-07 | Hitachi Global Storage Technologies Netherlands, B.V | Interface circuit power reduction |
CN101266283A (en) * | 2008-05-13 | 2008-09-17 | 保定天威集团有限公司 | Intelligent dial switch rapid detection device |
CN202392943U (en) * | 2011-12-08 | 2012-08-22 | 柳州五菱汽车有限责任公司 | Vehicular air-conditioning switch |
CN103701441A (en) * | 2013-12-31 | 2014-04-02 | 青岛歌尔声学科技有限公司 | Toggle switch circuit and electronic equipment with same |
CN204167216U (en) * | 2014-10-30 | 2015-02-18 | 北奔重型汽车集团有限公司 | The many driving switch of a kind of automobile |
US20160348785A1 (en) * | 2015-06-01 | 2016-12-01 | Caterpillar Inc. | Method of Optimized Gear Selection on High Speed Directional Shifts |
CN106931717A (en) * | 2017-03-21 | 2017-07-07 | 合肥美的电冰箱有限公司 | Gear conversion equipment and refrigerating plant |
CN207216333U (en) * | 2017-06-23 | 2018-04-10 | 九阳股份有限公司 | A kind of identification circuit and cooking apparatus of knob driving switch |
CN208721769U (en) * | 2018-08-14 | 2019-04-09 | 横店集团得邦照明股份有限公司 | A kind of four gear detection devices of toggle switch |
-
2018
- 2018-08-14 CN CN201810921501.1A patent/CN109061455B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050073198A1 (en) * | 2003-09-17 | 2005-04-07 | Hitachi Global Storage Technologies Netherlands, B.V | Interface circuit power reduction |
CN101266283A (en) * | 2008-05-13 | 2008-09-17 | 保定天威集团有限公司 | Intelligent dial switch rapid detection device |
CN202392943U (en) * | 2011-12-08 | 2012-08-22 | 柳州五菱汽车有限责任公司 | Vehicular air-conditioning switch |
CN103701441A (en) * | 2013-12-31 | 2014-04-02 | 青岛歌尔声学科技有限公司 | Toggle switch circuit and electronic equipment with same |
CN204167216U (en) * | 2014-10-30 | 2015-02-18 | 北奔重型汽车集团有限公司 | The many driving switch of a kind of automobile |
US20160348785A1 (en) * | 2015-06-01 | 2016-12-01 | Caterpillar Inc. | Method of Optimized Gear Selection on High Speed Directional Shifts |
CN106931717A (en) * | 2017-03-21 | 2017-07-07 | 合肥美的电冰箱有限公司 | Gear conversion equipment and refrigerating plant |
CN207216333U (en) * | 2017-06-23 | 2018-04-10 | 九阳股份有限公司 | A kind of identification circuit and cooking apparatus of knob driving switch |
CN208721769U (en) * | 2018-08-14 | 2019-04-09 | 横店集团得邦照明股份有限公司 | A kind of four gear detection devices of toggle switch |
Also Published As
Publication number | Publication date |
---|---|
CN109061455B (en) | 2023-06-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104242907A (en) | Programmable high-speed voltage-mode differential driver | |
CN105099173B (en) | Charge pump | |
CN106532867B (en) | A kind of charging circuit and mobile terminal | |
CN107070826A (en) | Data sending apparatus, data sink, data transmitting and reception system | |
CN105577166B (en) | Level shift circuit and power supply device | |
CN208721769U (en) | A kind of four gear detection devices of toggle switch | |
CN209072341U (en) | The level shifter and chip across voltage domain based on DMOS pipe | |
CN108123708A (en) | A kind of pull-up circuit for I/O circuit | |
CN109061455A (en) | A kind of four gear detection devices of toggle switch and its implementation | |
CN207560362U (en) | Voltage follower circuit and atomization plant | |
CN108616260A (en) | A kind of power circuit of power amplifier | |
CN105652994A (en) | Voltage switching device | |
CN106330172B (en) | The transmission gate of high voltage threshold device and its subsequent pull-down circuit structure | |
CN108933592A (en) | high-speed level conversion circuit, level conversion method and data transmission device | |
CN106332362B (en) | A kind of high-voltage linear LED control circuit reducing harmonic wave | |
CN204808088U (en) | Utilize threshold voltage to realize electric current source of electric current | |
CN203180766U (en) | Adapter input soft start protection circuit | |
CN103066976B (en) | Low shutoff-state current transistor circuit | |
CN207460131U (en) | A kind of low consumption circuit that power supply positive and negative can be connect using metal-oxide-semiconductor realization | |
CN208241644U (en) | A kind of transmission gate circuit that high input voltage is isolated | |
CN203708369U (en) | Control circuit shared by MHL interface and HDMI interface, and display device | |
CN202548595U (en) | Variable selection device of tandem type two-terminal elements | |
CN107659301A (en) | Level shifting circuit and interface communication systems | |
CN206619128U (en) | Voltage interface circuit | |
CN202548596U (en) | Variable selection device for parallel two-terminal element |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |