CN203038265U - General-purpose input/output (GPIO) multiplex circuit - Google Patents
General-purpose input/output (GPIO) multiplex circuit Download PDFInfo
- Publication number
- CN203038265U CN203038265U CN 201220651738 CN201220651738U CN203038265U CN 203038265 U CN203038265 U CN 203038265U CN 201220651738 CN201220651738 CN 201220651738 CN 201220651738 U CN201220651738 U CN 201220651738U CN 203038265 U CN203038265 U CN 203038265U
- Authority
- CN
- China
- Prior art keywords
- gpio
- circuit
- led
- state
- output
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Images
Landscapes
- Led Devices (AREA)
Abstract
The utility model provides a general purpose input/output (GPIO) multiplex circuit which comprises a key circuit, a light-emitting diode (LED) circuit and a GPIO port simultaneously connected with the key circuit and the LED circuit. The GPIO performs input in a key circuit state and performs output in an LED circuit state. An effective state of the GPIO port is a low level state, a current-limiting resistor is further in series connection between the GPIO port and the LED circuit, and the GPIO port is further connected with a pull-up resistor. Key input and LED state output multiplex the same GPIO port. The GPIO multiplex circuit is particularly suitable for some embedded systems which are provided with limited I/O ports and require a plurality of functions, not only saves use of the GPIO port, but also shortens a product researching period, and is simple and practical in design and low in cost.
Description
Technical field
The utility model relates to the embedded system technology field, relates in particular to a kind of GPIO multiplex circuit that is applicable to embedded system.
Background technology
The English full name General-Purpose Input/Output Ports of GPIO, the Chinese meaning is general purpose I/O port.In embedded system, often need the many external units simple in structure of control or circuit, what these equipment had need control by CPU, and the CPU that needs that has provides input signal.And many equipment or circuit have only required that the ON/OFF two states is just much of that, such as the light on and off of LED.To the control of these equipment, use traditional serial ports or the parallel port more complicated that just seems, so, on embedded microprocessor, provide a kind of " general programmable I/O port " usually, just GPIO.
A GPIO port needs two registers at least, " a general purpose I port controling register " of doing control usefulness, and also having one is " general purpose I/O port data register " of store data.Each of data register is with the hardware pin correspondence of GPIO, and the direction of transfer of data arranges by control register, and the data flow of each pin can be set by control register.
Yet not every processor can both provide enough GPIO to use to the designer.On particularly the DSL gateway product is used, GPIO will be used as power light (double-colored), dialing status lamp, network connection state pilot lamp (double-colored), the wireless switching pilot lamp, wireless to sign indicating number (WPS) pilot lamp, USB pilot lamp, voice call pilot lamp (VOIP), reset key, the wireless switching button, wireless to sign indicating number button etc.When processor GPIO quantity is not enough, though perhaps GPIO quantity is enough, some GPIO has been defined as specific function by chip manufacturer and has come usefulness, revises the software code of its function and does not open to the outside world.At this moment, just may occur to realize because of not enough some function of GPIO.Though expanding the method for GPIO can realize by external GPIO extended chip such as shift register, but need to increase extended chip on the one hand and can increase hardware cost, and design circuit is more complicated, and the another side software modification is bigger, increases the software development workload.The competitiveness of product in market has been produced adverse effect.
Summary of the invention
The purpose of this utility model is to provide a kind of GPIO multiplex circuit, solves the problem of GPIO lazy weight, simplifies hardware design, reduces the research and development of products cycle and effectively reduces cost of products, improves the product profit rate.
The purpose of this utility model is achieved through the following technical solutions:
A kind of GPIO multiplex circuit comprises: key circuit, led circuit, and a GPIO who is connected simultaneously with described key circuit and led circuit; Described GPIO is as the state input of key circuit and the state output of led circuit;
The effective status of described GPIO is low level state, also is in series with current-limiting resistance between GPIO and the led circuit, and GPIO also is connected with pull-up resistor.
Wherein, described GPIO also is connected with filter capacitor.
Wherein, described key circuit end also is placed with the esd protection device.
Wherein, the resistance of described current-limiting resistance is 220 ohm.
The utility model embodiment has following beneficial effect:
GPIO only has single input or output state in use in the prior art, and GPIO has the input and output two states in the utility model.Thereby originally two states needs two-way GPIO control, and a GPIO can control two states in the utility model, namely detects the input state of button and the output state of LED indication.The utility model is specially adapted to some I/O interface limited amount and requires the Embedded System Design that realizes that function is more, and not only save GPIO and use, and reduce the research and development of products cycle, the simplicity of design practicality, cost is lower.
Description of drawings
Fig. 1 is the GPIO multiplex circuit figure that the utility model embodiment provides.
Embodiment
In order to make the purpose of this utility model, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the utility model is further elaborated.Should be appreciated that specific embodiment described herein only in order to explaining the present invention, and be not used in restriction the utility model.
See also shown in Figure 1, in the present embodiment in the GPIO multiplex circuit GPIO be connected with led circuit with key circuit simultaneously, it is effective that key circuit and led circuit are respectively low level.
Input state to GPIO during CPU work detects employing interruption or inquiry mode.Because it is effective that present embodiment is designed to low level, need stablize its level with drawing on the GPIO, prevent false triggering, thereby GPIO is connected with pull-up resistor R1.When CPU detects the stable low imput of one of external key, can carry out corresponding control program and realize keypress function.Button generally has metal material, in order to prevent the damage of the GPIO of ESD, places the point discharge device of anti-ESD at the input circuit end of GPIO.
GPIO exports to control the light on and off of LED as led status, and when a certain function operate as normal of system or abnormal work, GPIO output high-low level is controlled LED, indicates the state of this function.When GPIO was output as low level, current direction GPIO inside show as the filling electric current, and the current capacity that GPIO can bear was limited, was generally a milliampere level.Therefore, current-limiting resistance R2 is necessary, and the too little meeting of choosing of R2 causes the GPIO electric current excessive, and it is not enough that R2 chooses too greatly then LED brightness.Calculate the size of current-limiting resistance R2 during design according to actual conditions, the value of present embodiment current-limiting resistance R2 is chosen 220 ohm.
Button and GPIO of LED two states multiplexing functions in above-described embodiment use in the DSL gateway product and realize well.
The above only is preferred embodiment of the present utility model; not in order to limit the utility model; all any modifications of within spirit of the present utility model and principle, doing, be equal to and replace and improvement etc., all should be included within the protection domain of the present utility model.
Claims (4)
1. a GPIO multiplex circuit is characterized in that, this circuit comprises: key circuit, led circuit, and a GPIO who is connected simultaneously with described key circuit and led circuit; Described GPIO is as the state input of key circuit and the state output of led circuit;
The effective status of described GPIO is low level state, also is in series with current-limiting resistance between GPIO and the led circuit, and GPIO also is connected with pull-up resistor.
2. GPIO multiplex circuit according to claim 1 is characterized in that described GPIO also is connected with filter capacitor.
3. as GPIO multiplex circuit as described in the claim 2, it is characterized in that described key circuit end also is placed with the esd protection device.
4. GPIO multiplex circuit according to claim 1 is characterized in that the resistance of described current-limiting resistance is 220 ohm.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201220651738 CN203038265U (en) | 2012-12-03 | 2012-12-03 | General-purpose input/output (GPIO) multiplex circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201220651738 CN203038265U (en) | 2012-12-03 | 2012-12-03 | General-purpose input/output (GPIO) multiplex circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
CN203038265U true CN203038265U (en) | 2013-07-03 |
Family
ID=48690368
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201220651738 Expired - Lifetime CN203038265U (en) | 2012-12-03 | 2012-12-03 | General-purpose input/output (GPIO) multiplex circuit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN203038265U (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103684544A (en) * | 2013-12-11 | 2014-03-26 | 电子科技大学 | Portable bluetooth control device |
CN105093996A (en) * | 2014-05-13 | 2015-11-25 | 佛山市顺德区美的电热电器制造有限公司 | I/O port expansion control device and control method |
CN110190841A (en) * | 2019-06-06 | 2019-08-30 | 深圳市兆威机电股份有限公司 | I/O port multiplexing control circuit and electronic equipment |
-
2012
- 2012-12-03 CN CN 201220651738 patent/CN203038265U/en not_active Expired - Lifetime
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103684544A (en) * | 2013-12-11 | 2014-03-26 | 电子科技大学 | Portable bluetooth control device |
CN105093996A (en) * | 2014-05-13 | 2015-11-25 | 佛山市顺德区美的电热电器制造有限公司 | I/O port expansion control device and control method |
CN105093996B (en) * | 2014-05-13 | 2017-11-10 | 佛山市顺德区美的电热电器制造有限公司 | The control device and control method of I/O mouths extension |
CN110190841A (en) * | 2019-06-06 | 2019-08-30 | 深圳市兆威机电股份有限公司 | I/O port multiplexing control circuit and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN203038265U (en) | General-purpose input/output (GPIO) multiplex circuit | |
CN104881387A (en) | USB connection method and USB concentrator | |
CN102768648B (en) | Gatherer, the system with this gatherer and correlation technique are interrupted in low delay | |
CN109491946A (en) | A kind of chip and method for I2C bus extension | |
CN100480923C (en) | Controller soft realizing method from I2C bus | |
CN104394101A (en) | Dial switch-based multi-functional switch and quick configuration method thereof | |
CN106301804B (en) | A kind of server that realizing Wake on LAN, system and method | |
CN103546138B (en) | Touch key-press control circuit | |
CN202143108U (en) | Universal Ethernet/IP communication interface apparatus | |
CN204515451U (en) | Learning-oriented scene panel circuit | |
CN205608716U (en) | Multiunit optical module communication interface switching circuit | |
CN205902151U (en) | LED wireless receiving controller | |
CN202334470U (en) | Delay circuit and switch power supply controller with same | |
CN202886025U (en) | Intelligent pressure transmitter | |
CN201928255U (en) | Household electronic appliance automation wire holder with sending data line management by serial port | |
CN203070337U (en) | Wireless secure digital card with network detection function | |
CN205210621U (en) | Control system with total line type intelligence switch | |
CN205179077U (en) | Intelligent control device based on network flow | |
CN205594383U (en) | Microcontroller and input/output pin mapping circuit thereof | |
CN203941523U (en) | Serial expanded circuit | |
CN204795797U (en) | LED backlight controller | |
CN202854803U (en) | Input/output (I/O) port expanded circuit of micro controller unit (MCU) | |
CN109213040A (en) | Control circuit, electronic equipment and its control method | |
CN201994958U (en) | Intelligent communication node between CAN (controller area network) bus and Ethernet | |
CN203658791U (en) | Switching value input expander circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CX01 | Expiry of patent term | ||
CX01 | Expiry of patent term |
Granted publication date: 20130703 |