CN109061455B - Four-gear detection device of toggle switch and implementation method thereof - Google Patents
Four-gear detection device of toggle switch and implementation method thereof Download PDFInfo
- Publication number
- CN109061455B CN109061455B CN201810921501.1A CN201810921501A CN109061455B CN 109061455 B CN109061455 B CN 109061455B CN 201810921501 A CN201810921501 A CN 201810921501A CN 109061455 B CN109061455 B CN 109061455B
- Authority
- CN
- China
- Prior art keywords
- pin
- pull
- gear
- power supply
- resistor
- 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.)
- Active
Links
Images
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
Abstract
The invention discloses a four-gear detection device of a toggle switch, which comprises a single chip microcomputer pin and a four-gear toggle switch, wherein the single chip microcomputer pin comprises a pin I/O1 and a pin I/O2, the four-gear toggle switch comprises four gears and six groups of pins, two pins are connected with the single chip microcomputer pin, two pins are connected with a VSS end of a power supply, and two pins are connected with a VDD end of the power supply. The invention can effectively reduce the requirements on the available pin number of the singlechip, can effectively reduce the external pull-up resistor, namely reduces the requirements on the available pin number of the singlechip, also reduces the influence of the failure of an external device on the quality of a product, and has better product compatibility and cost advantage.
Description
Technical Field
The invention belongs to the technical field of gear detection of a single-chip microcomputer toggle switch, and particularly relates to a four-gear detection device of a toggle switch and an implementation method thereof.
Background
In the large background of the internet of things, more and more devices with control and networking are provided, the quantity is increased, the cost of products is also required to be higher and higher in the market, and in order to meet the requirement of low cost, when a singlechip is selected, people hope to realize more functions by using the singlechips with lower pin numbers in the same series, so that the product can be more competitive. Therefore, the prior toggle switch gear detection technology has the following technical problems: 1. the gear detection of the toggle switch is generally that one pin is required for identification of one gear; 2. the switch pins require a number of external pull-up resistors to match the voltage.
Disclosure of Invention
The invention aims to provide a four-gear detection device of a toggle switch, which aims to solve the problems in the background technology. The four-gear detection device for the toggle switch has the characteristics of good product compatibility and low cost.
The invention further aims to provide a four-gear detection device of the toggle switch and an implementation method thereof.
In order to achieve the above purpose, the present invention provides the following technical solutions: the utility model provides a four gear detection device of toggle switch, includes singlechip pin and four keeps off toggle switch, the singlechip pin includes pin I/O1 and pin I/O2, four keep off toggle switch includes four gears and six groups pins, and wherein, singlechip pin is connected to two pins, and VSS end of power is connected to two pins, and the VDD end of power is connected to two pins.
In the invention, the pin I/O1 and the pin I/O2 have the same structure and comprise a pull-up resistor and a pull-down resistor.
In the invention, one end of the pull-up resistor is connected with the pin I/O, the other end of the pull-up resistor is connected with the VDD end of the power supply, the pull-up resistor is connected with the switch with the VDD end of the power supply, one end of the pull-down resistor is connected with the pin I/O, the other end of the pull-down resistor is connected with the VSS end of the power supply, and the pull-down resistor is also connected with the switch with the VSS end of the power supply.
In the invention, the four gears are first gear, second gear, third gear and fourth gear in sequence from top to bottom.
In the invention, six groups of pins are 1 pin, 2 pin, 3 pin, 4 pin, 5 pin and 6 pin from top to bottom.
In the invention, the realization method of the four gear detection devices of the toggle switch comprises the following steps:
the 1 pin and the 2 pin of the four-gear toggle switch are connected with the VDD end of the power supply, the 5 pin and the 6 pin are connected with the VSS end of the power supply, and the 3 pin and the 4 pin are respectively connected with the pin I/O1 and the pin I/O2;
secondly, the pin I/O1 firstly turns on an internal pull-up resistor switch, at the moment, the 3 pin is connected with the VDD end of the power supply, and the pin I/O level is VDD;
thirdly, the pin I/O1 turns on an internal pull-down resistor switch, the 3 pin is still connected with the VDD of the power supply, and the pin I/O level is still the VDD;
fourthly, the pin I/O2 firstly turns on an internal pull-up resistor switch, at the moment, the 4 pin is suspended and is not connected with a power supply, and at the moment, the pin I/O level is VDD;
and fifthly, the pin I/O2 turns on the internal pull-down resistor switch, the 4 pins are suspended at the moment and are not connected with a power supply, and the pin I/O level is VSS at the moment.
In the invention, the pin I/O1 and the pin I/O2 have the same structure and comprise a pull-up resistor and a pull-down resistor; one end of the pull-up resistor is connected with the pin I/O, the other end of the pull-up resistor is connected with the VDD end of the power supply, the pull-up resistor is connected with the switch at the VDD end of the power supply, one end of the pull-down resistor is connected with the pin I/O, the other end of the pull-down resistor is connected with the VSS end of the power supply, and the pull-down resistor is also connected with the switch at the VSS end of the power supply; the four gears are a first gear, a second gear, a third gear and a fourth gear in sequence from top to bottom; the six groups of pins are 1 pin, 2 pin, 3 pin, 4 pin, 5 pin and 6 pin from top to bottom.
Compared with the prior art, the invention has the beneficial effects that:
the invention can effectively reduce the requirements on the available pin number of the singlechip, can effectively reduce the external pull-up resistor, namely reduces the requirements on the available pin number of the singlechip, also reduces the influence of the failure of an external device on the quality of a product, and has better product compatibility and cost advantage.
Drawings
FIG. 1 is a schematic diagram of the structure of a single-chip microcomputer pin and a four-gear toggle switch;
FIG. 2 is a schematic diagram of the structure of the connection between the pins of the singlechip and the first gear of the four-gear toggle switch;
FIG. 3 is a schematic diagram of the structure of the pin I/O1 pull-up resistor switch closure of the present invention;
FIG. 4 is a schematic diagram of the structure of the pin I/O1 pull-down resistor switch closure of the present invention;
FIG. 5 is a schematic diagram of the structure of the pin I/O2 pull-up resistor switch closure of the present invention;
FIG. 6 is a schematic diagram of the structure of the pin I/O2 pull-down resistor switch closure of the present invention;
in the figure: 1. a pin of the singlechip; 2. four-gear toggle switch.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Examples
Referring to fig. 1-6, the present invention provides the following technical solutions: the utility model provides a four gear detection device of toggle switch, includes singlechip pin 1 and four keeps off toggle switch 2, and singlechip pin 1 includes pin I/O1 and pin I/O2, and four keep off toggle switch 2 includes four gears and six groups pins, and wherein, singlechip pin 1 is connected to two pins, and VSS end of power is connected to two pins, and the VDD end of power is connected to two pins.
Further, the pin I/O1 and the pin I/O2 have the same structure and comprise a pull-up resistor and a pull-down resistor.
Further, one end of the pull-up resistor is connected with the pin I/O, the other end of the pull-up resistor is connected with the VDD end of the power supply, the pull-up resistor is connected with the switch at the VDD end of the power supply, one end of the pull-down resistor is connected with the pin I/O, the other end of the pull-down resistor is connected with the VSS end of the power supply, and the pull-down resistor is also connected with the switch at the VSS end of the power supply.
Further, the four gears are first gear, second gear, third gear and fourth gear in sequence from top to bottom.
Further, the six groups of pins are 1 pin, 2 pin, 3 pin, 4 pin, 5 pin and 6 pin from top to bottom.
Further, the implementation method of the four gear detection devices of the toggle switch comprises the following steps:
(I), the 1 pin and the 2 pin of the four-gear toggle switch 2 are connected with the VDD end of the power supply, the 5 pin and the 6 pin are connected with the VSS end of the power supply, the 3 pin and the 4 pin are respectively connected with the pin I/O1 and the pin I/O2, taking a first-gear judging method as an example, and the other gears are similar, as shown in figure 2;
secondly, the pin I/O1 firstly turns on an internal pull-up resistor switch, at the moment, the 3 pin is connected with the VDD end of the power supply, and as shown in figure 3, the pin I/O level is VDD;
thirdly, the pin I/O1 turns on an internal pull-down resistor switch, and the 3 pin is still connected with the VDD of the power supply, as shown in FIG. 4, and the pin I/O level is still the VDD;
(IV), the pin I/O2 turns on the internal pull-up resistor switch, the 4 pins are suspended at the moment and are not connected with a power supply, as shown in FIG. 5, and the pin I/O level is VDD at the moment;
and fifthly, the pin I/O2 turns on the internal pull-down resistor switch, the 4 pins are suspended and are not connected with a power supply, as shown in fig. 6, and the pin I/O level is VSS.
Step six, repeating the above two to five steps by adjusting gears, so as to obtain four combination relations shown in the following table;
status of | Default level | First gear level | Level of second gear | Three gear level | Four-gear level |
I/O-1 pull-up closure | VDD | VDD | VDD | VSS | VDD |
I/O-1 pulldown closure | VSS | VDD | VSS | VSS | VSS |
I/O-2 pull-up closure | VDD | VDD | VDD | VDD | VSS |
I/O-2 pulldown closure | VSS | VSS | VDD | VSS | VSS |
The table can show that four gears are realized, and the singlechip realizes four different combination states through the cooperation of two pins and an internal pull-up resistor, namely, the singlechip can judge what gear the fluctuation switch is in through the four states, so that the aim of realizing the device is achieved.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
Claims (5)
1. Four gear detection device of toggle switch, including singlechip pin (1) and four keep off toggle switch (2), its characterized in that: the single-chip microcomputer pin (1) comprises a pin I/O1 and a pin I/O2, the four-gear toggle switch (2) comprises four gears and six groups of pins, wherein two pins are connected with the single-chip microcomputer pin (1), two pins are connected with the VSS end of a power supply, and two pins are connected with the VDD end of the power supply;
the pin I/O1 and the pin I/O2 have the same structure and both comprise a pull-up resistor and a pull-down resistor;
one end of the pull-up resistor is connected with the pin I/O, the other end of the pull-up resistor is connected with the VDD end of the power supply, the pull-up resistor is connected with the switch at the VDD end of the power supply, one end of the pull-down resistor is connected with the pin I/O, the other end of the pull-down resistor is connected with the VSS end of the power supply, and the pull-down resistor is also connected with the switch at the VSS end of the power supply.
2. The four-gear detection device of a toggle switch of claim 1, wherein: the four gears are a first gear, a second gear, a third gear and a fourth gear in sequence from top to bottom.
3. The four-gear detection device of a toggle switch of claim 2, wherein: the six groups of pins are 1 pin, 2 pin, 3 pin, 4 pin, 5 pin and 6 pin from top to bottom.
4. A method of implementing a four gear detection device for a toggle switch as claimed in any one of claims 1 to 3, comprising the steps of:
the 1 pin and the 2 pin of the four-gear toggle switch (2) are connected with the VDD end of the power supply, the 5 pin and the 6 pin are connected with the VSS end of the power supply, and the 3 pin and the 4 pin are respectively connected with the pin I/O1 and the pin I/O2;
secondly, the pin I/O1 firstly turns on an internal pull-up resistor switch, at the moment, the 3 pin is connected with the VDD end of the power supply, and the level of the pin I/O1 is VDD;
thirdly, the pin I/O1 turns on an internal pull-down resistor switch, the 3 pin is still connected with the VDD of the power supply, and the pin I/O1 level is still the VDD;
the internal pull-up resistor switch is closed by the pin I/O2, the 4 pins are suspended and are not connected with a power supply, and the level of the pin I/O2 is VDD;
and fifthly, the pin I/O2 turns on the internal pull-down resistor switch, the 4 pins are suspended and are not connected with a power supply, and the pin I/O2 level is VSS.
5. The method for implementing the four gear detection devices of the toggle switch according to claim 4, wherein: the pin I/O1 and the pin I/O2 have the same structure and both comprise a pull-up resistor and a pull-down resistor; one end of the pull-up resistor is connected with the pin I/O, the other end of the pull-up resistor is connected with the VDD end of the power supply, the pull-up resistor is connected with the switch at the VDD end of the power supply, one end of the pull-down resistor is connected with the pin I/O, the other end of the pull-down resistor is connected with the VSS end of the power supply, and the pull-down resistor is also connected with the switch at the VSS end of the power supply; the four gears are a first gear, a second gear, a third gear and a fourth gear in sequence from top to bottom; the six groups of pins are 1 pin, 2 pin, 3 pin, 4 pin, 5 pin and 6 pin 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 CN109061455A (en) | 2018-12-21 |
CN109061455B true 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 (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
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 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005092480A (en) * | 2003-09-17 | 2005-04-07 | Hitachi Global Storage Technologies Netherlands Bv | Interface circuit and electronic equipment |
US9689490B2 (en) * | 2015-06-01 | 2017-06-27 | Caterpillar Inc. | Method of optimized gear selection on high speed directional shifts |
-
2018
- 2018-08-14 CN CN201810921501.1A patent/CN109061455B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
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 |
---|---|
CN109061455A (en) | 2018-12-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105049025B (en) | Low-voltage differential signal drive circuit | |
CN207473599U (en) | A kind of I2C bus control interfaces circuit | |
CN104242907A (en) | Programmable high-speed voltage-mode differential driver | |
CN106209069A (en) | A kind of integrated fuse of super low-power consumption numerical model analysis trims circuit and fuse method for repairing and regulating | |
CN104467769B (en) | Signal pin drive circuit on piece upper switch gradual control circuit and method, piece | |
CN109061455B (en) | Four-gear detection device of toggle switch and implementation method thereof | |
CN108123708A (en) | A kind of pull-up circuit for I/O circuit | |
CN208721769U (en) | A kind of four gear detection devices of toggle switch | |
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 | |
CN105763184B (en) | For driving the pre-driver of low-voltage differential signal driving circuit | |
CN107370485A (en) | Negative pressure level shifting circuit | |
CN206224465U (en) | The circuit of the variable bus address of IIC devices | |
CN202261207U (en) | High-speed complementary switch drive circuit with dead zone enhanced protection | |
CN106598900A (en) | Low-voltage differential signaling (LVDS) driver circuit | |
CN204633746U (en) | Output circuit in interface circuit | |
CN108712166A (en) | A kind of self-adaptive level conversion circuit | |
CN208353321U (en) | High-speed level conversion circuit and data transmission device | |
CN101369479A (en) | Electronic element row and its printed circuit board | |
CN209120162U (en) | A kind of high-speed bidirectional logic level converting circuit | |
CN110504953A (en) | A kind of low-power consumption selector | |
CN208956011U (en) | A kind of chip output interface circuit reducing power domain switching noise | |
CN203387492U (en) | LED brightness control device | |
CN207234696U (en) | A kind of driving device of electromagnetic coil | |
CN104333369B (en) | A kind of DDR3 PHY SSTL15 output driving circuits |
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 |