CN103439905A - IO input port expansion circuit - Google Patents
IO input port expansion circuit Download PDFInfo
- Publication number
- CN103439905A CN103439905A CN2013103848662A CN201310384866A CN103439905A CN 103439905 A CN103439905 A CN 103439905A CN 2013103848662 A CN2013103848662 A CN 2013103848662A CN 201310384866 A CN201310384866 A CN 201310384866A CN 103439905 A CN103439905 A CN 103439905A
- Authority
- CN
- China
- Prior art keywords
- input port
- expanded circuit
- input
- port
- 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.)
- Granted
Links
- 239000004065 semiconductor Substances 0.000 claims description 50
- 238000009795 derivation Methods 0.000 description 5
- 238000004519 manufacturing process Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000000034 method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000004886 process control Methods 0.000 description 1
Images
Landscapes
- Microcomputers (AREA)
- Semiconductor Integrated Circuits (AREA)
Abstract
The invention discloses an IO input port expansion circuit, wherein the IO input port has an analog voltage acquisition function, the IO input port expansion circuit comprises an output port, at least two expansion circuits and at least two input ports, the input end of each expansion circuit is correspondingly connected with one input port, the output end of each expansion circuit is connected with the output port, and the output port is connected with the IO input port; at least two digital voltages input by the at least two input ports are converted into a common analog voltage through the corresponding expansion circuits and then output to the IO input port through the output port. By implementing the IO input port expansion circuit, the state of the IO port can be effectively read by collecting the input voltage of the IO input port, the purpose of expansion of the IO port can be achieved without other IO port control, and the circuit is simple and low in cost.
Description
Technical field
The present invention relates to Analog Electronics Technique and Digital Electronic Technique field, relate in particular to a kind of IO input port expanded circuit.
Background technology
In the fields such as the intelligent management of every field and process control, usually with single-chip microcomputer, as main control chip, control the work of various instruments and electrical equipment.
Because the number of the IO mouth of single-chip microcomputer is fixed, and an IO mouth generally is merely able to I/O one road signal, when the signal that is input to single-chip microcomputer is more, often can run into the not enough situation in IO input port of single-chip microcomputer.
Solution to the problems described above mainly contained two kinds in the past, a kind of is to change the more single-chip microcomputer of IO mouth number, yet mounted single-chip microcomputer is changed, can cause the loaded down with trivial details of production process, thereby increase production cost: another kind of solution is to expand the IO mouth by increasing special extended chip, yet the price comparison of extended chip is high, therefore there is equally the problem that production cost is high.
Therefore, be necessary to provide a kind of follow-on IO input port expanded circuit to overcome above-mentioned defect.
Summary of the invention
Many aspects of the present invention provide a kind of IO input port expanded circuit, by the input voltage that gathers the IO input port, can effectively realize reading IO mouth state, control the purpose that can reach the expansion of IO mouth without other IO mouths, and circuit is simple and cost is low.
The invention provides a kind of IO input port expanded circuit, wherein, described IO input port has the analog voltage acquisition function, described IO input port expanded circuit comprises output port, at least two expanded circuits and at least two input ports, the input end of each expanded circuit is connected respectively a described input port, the output terminal of each expanded circuit all connects described output port, and described output port connects described IO input port; At least two digital voltages inputting by described at least two input ports, by after changing after corresponding expanded circuit, generate a common analog voltage and export to described IO input port by described output port.
As improvement of the technical scheme, the digital voltage that can obtain uniquely each described input port input by described analog voltage is high level/low level.
As improvement of the technical scheme, described IO input port is the ADC input port.
In one embodiment of the invention, described expanded circuit is two, and described input port is two.
In another embodiment of the present invention, described expanded circuit is three, and described input port is three.
In another embodiment of the present invention, each described expanded circuit comprises metal-oxide-semiconductor, stake resistance and two divider resistances; The grid of described metal-oxide-semiconductor connects a described input port on the one hand, on the other hand by described ground resistance earth; The source ground of described metal-oxide-semiconductor; The drain electrode of described metal-oxide-semiconductor connects power supply by a described divider resistance on the one hand, connects described output port by another described divider resistance on the other hand.
In another embodiment of the present invention, each described expanded circuit comprises metal-oxide-semiconductor, stake resistance and divider resistance; The grid of described metal-oxide-semiconductor connects a described input port on the one hand, on the other hand by described ground resistance earth; The source ground of described metal-oxide-semiconductor; The drain electrode of described metal-oxide-semiconductor connects power supply by a shared divider resistance on the one hand, connects described output port by described divider resistance on the other hand.
In another embodiment of the present invention, each described expanded circuit comprises triode and two divider resistances, and the base stage of described triode connects a described input port; The grounded emitter of described triode; The collector of described triode connects power supply by described two divider resistances series connection is rear, and the tie point between described two divider resistances connects described output port.
In another embodiment of the present invention, each described expanded circuit comprises triode and divider resistance, and the base stage of described triode connects a described input port; The grounded emitter of described triode; The collector of described triode connects described divider resistance and connects power supply by a shared divider resistance, and described divider resistance is connected described output port with the tie point between described shared divider resistance.
Compared with prior art, IO disclosed by the invention input port expanded circuit has following beneficial effect:
1, the digital voltage of a plurality of inputs is exported to analog voltage to the IO input port with analog voltage acquisition function by the present invention by IO input port expanded circuit, corresponding relation according to output voltage and input voltage, can effectively read IO mouth input state by the input voltage (being the output voltage of expanded circuit) that gathers the IO input port, control the purpose that can reach the expansion of IO mouth without other IO mouths;
2, circuit is simple, and cost is low; IO of the present invention input port expanded circuit only need to utilize simple resistance and metal-oxide-semiconductor (or triode) circuit to realize, low compared with the DAC converter cost that can realize identical function in prior art, and this circuit is compared the DAC converter and has been lacked some and control IO mouths, only need small current driving, circuit is simple easily to be realized.
The accompanying drawing explanation
Fig. 1 is the structural representation of a kind of IO input port expanded circuit in the embodiment of the present invention 1;
Fig. 2 is the structural representation of a kind of IO input port expanded circuit in the embodiment of the present invention 2;
Fig. 3 is the structural representation of a kind of IO input port expanded circuit in the embodiment of the present invention 3;
Fig. 4 is the structural representation of a kind of IO input port expanded circuit in the embodiment of the present invention 4;
Fig. 5 is the structural representation of a kind of IO input port expanded circuit in the embodiment of the present invention 5;
Fig. 6 is the structural representation of a kind of IO input port expanded circuit in the embodiment of the present invention 6.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making under the creative work prerequisite the every other embodiment obtained, belong to the scope of protection of the invention.
The invention provides a kind of IO input port expanded circuit, wherein, described IO input port (for example has the analog voltage acquisition function, the ADC mouth), described IO input port expanded circuit comprises output port, at least two expanded circuits and at least two input ports, the input end of each expanded circuit is connected respectively a described input port, and the output terminal of each expanded circuit all connects described output port, and described output port connects described IO input port; Export to described IO input port by described output port after converting a common analog voltage by least two digital voltages of described at least two input ports input to after by corresponding expanded circuit.The digital voltage that can obtain uniquely each described input port input by described analog voltage is high level/low level.
IO of the present invention input port expanded circuit, can realize reading IO mouth state effectively by the input voltage that gathers the IO input port, controls the purpose that can reach the expansion of IO mouth without other IO mouths, and circuit is simple and cost is low.
Below, in conjunction with Fig. 1~Fig. 6, the structure of IO of the present invention input port expanded circuit is described by a plurality of specific embodiments.
Embodiment 1
Referring to Fig. 1, it is the structural representation of a kind of IO input port expanded circuit of providing of the embodiment of the present invention.This IO input port expanded circuit comprises output port output, three expanded circuits 11,12,13 and three input port input1, input2, input3, the input end of each expanded circuit 11,12,13 is connected respectively a described input port input1, input2, input3, the output terminal of each expanded circuit all connects described output port output, described output port output connects the IO input port of single-chip microcomputer, wherein, the IO input port of this single-chip microcomputer has the analog voltage acquisition function, for example the ADC mouth.Convert the IO input port of after a common analog voltage, by described output port output, exporting to single-chip microcomputer by three digital voltages of described three input port input1, input2, input3 input to after by corresponding expanded circuit, and, by each component parameters in circuit is set, make the analog voltage of the IO input port by knowing single-chip microcomputer, can be directly also unique three digital voltages deriving described three input port input1, input2, input3 input be high level or low level.
In the present embodiment, each expanded circuit is a topological structure unit, and the circuit structure of each topological structure unit is identical, can realize the numeral input is converted to the function of Voltage-output.In the time the IO input port of single-chip microcomputer need to being extended to N input port, utilize N topological structure unit to realize.In the present embodiment, utilize 3 topological structure unit to realize an IO input port of single-chip microcomputer is extended to 3 input ports, i.e. the first expanded circuit 11, the second expanded circuit 12 and the 3rd expanded circuit 13.
Concrete, the first expanded circuit 11 comprises metal-oxide-semiconductor Q1, stake resistance R7 and two divider resistance R1, R2; It is the first input end mouth that the grid of described metal-oxide-semiconductor Q1 connects a described input port input1(on the one hand), on the other hand by described stake resistance R7 ground connection; The source ground of described metal-oxide-semiconductor Q1; The drain electrode of described metal-oxide-semiconductor Q1 connects power supply VCC by divider resistance R1 on the one hand, connects described output port output by divider resistance R2 on the other hand.
The second expanded circuit 12 comprises metal-oxide-semiconductor Q2, stake resistance R8 and two divider resistance R3, R4; The grid of described metal-oxide-semiconductor Q2 connects i.e. the second input port of a described input port input2(on the one hand), on the other hand by described stake resistance R8 ground connection; The source ground of described metal-oxide-semiconductor Q2; The drain electrode of described metal-oxide-semiconductor Q2 connects power supply VCC by divider resistance R3 on the one hand, connects described output port output by divider resistance R4 on the other hand.
The 3rd expanded circuit 13 comprises metal-oxide-semiconductor Q3, stake resistance R9 and two divider resistance R5, R6; The grid of described metal-oxide-semiconductor Q3 connects i.e. the 3rd input port of a described input port input3(on the one hand), on the other hand by described stake resistance R9 ground connection; The source ground of described metal-oxide-semiconductor Q3; The drain electrode of described metal-oxide-semiconductor Q3 connects power supply VCC by divider resistance R5 on the one hand, connects described output port output by divider resistance R6 on the other hand.
Therefore, by each component parameters in circuit is set, utilize the IO input port (ADC mouth) of single-chip microcomputer to gather the analog voltage of described output port output output, can be directly also unique digital voltage of deriving described first input end mouth input1, the second input port input2 and the 3rd input port input3 input be high level or low level.For example, if power supply is VCC, as input port input1, input2, when input3 is input as entirely for low level, output port output is output as VCC voltage; If input port input1, input2, when the input3 input is high level entirely, output port output is output as 0V; If input port input1, input2, the input3 input is respectively 1,0,0 o'clock, and output port output exports output=VCC* (R2/ ((R3+R4) // (R5+R6)+R2)), in formula // parallel connection of expression resistance; If input port input1, input2, the input3 input is respectively 1,1,0 o'clock, and output port output exports output=VCC* (R2//R4/ (R2//R4+R5+R6)), in formula // parallel connection of expression resistance; By that analogy, can calculate circuit element parameter for example is set is VCC=3.3V, R1=3.9K, and R2=20K, R3=22K, R4=20K, R5=27K, during R6=47K, the relation of input logic and output voltage is as following table 1:
Input1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
Input2 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 |
Input3 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
Output(V) | 3.3 | 2.11 | 1.73 | 1.07 | 1.41 | 0.71 | 0.39 | 0 |
Table 1
Visible, the IO input port expanded circuit of the present embodiment has been realized the function of easy non-linear DA converter, inputs different logic levels, exports different voltage.By the adjusting resistance resistance, make the analog voltage that gathers described output port output output, can be directly also unique digital voltage of deriving described first input end mouth input1, the second input port input2 and the 3rd input port input3 input be high level or low level.
Embodiment 2
Referring to Fig. 2, it is the structural representation of a kind of IO input port expanded circuit of providing of the embodiment of the present invention.The same with the circuit structure of embodiment 1, the IO input port expanded circuit of the present embodiment comprises output port output, three expanded circuits 11, 12, 13 and three input port input1, input2, input3, each expanded circuit 11, 12, 13 input end is connected respectively a described input port input1, input2, input3, the output terminal of each expanded circuit all connects described output port output, described output port output connects the IO input port of single-chip microcomputer, wherein, the IO input port of this single-chip microcomputer has the analog voltage acquisition function, ADC mouth for example.Convert the IO input port of after a common analog voltage, by described output port output, exporting to single-chip microcomputer by three digital voltages of described three input port input1, input2, input3 input to after by corresponding expanded circuit, and, by each component parameters in circuit is set, make the analog voltage of the IO input port by knowing single-chip microcomputer, can be directly also unique three digital voltages deriving described three input port input1, input2, input3 input be high level or low level.
In the present embodiment, each expanded circuit is a topological structure unit, and the circuit structure of each topological structure unit is identical, can realize the numeral input is converted to the function of Voltage-output.In the time the IO input port of single-chip microcomputer need to being extended to N input port, utilize N topological structure unit to realize.In the present embodiment, utilize 3 topological structure unit to realize an IO input port of single-chip microcomputer is extended to 3 input ports, i.e. the first expanded circuit 11, the second expanded circuit 12 and the 3rd expanded circuit 13.
Different from the circuit structure of embodiment 1, the concrete structure of the first expanded circuit 11, the second expanded circuit 12 and the 3rd expanded circuit 13 of the present embodiment is different with the 3rd expanded circuit 13 from the first expanded circuit 11, the second expanded circuit 12 of embodiment 1.
Concrete, the first expanded circuit 11 comprises metal-oxide-semiconductor Q1, stake resistance R7 and divider resistance R2; It is the first input end mouth that the grid of described metal-oxide-semiconductor Q1 connects a described input port input1(on the one hand), on the other hand by described stake resistance R7 ground connection; The source ground of described metal-oxide-semiconductor Q1; The drain electrode of described metal-oxide-semiconductor Q1 connects power supply VCC by a shared divider resistance R on the one hand, connects described output port output by described divider resistance R2 on the other hand.
The second expanded circuit 12 comprises metal-oxide-semiconductor Q2, stake resistance R8 and divider resistance R4; The grid of described metal-oxide-semiconductor Q2 connects i.e. the second input port of a described input port input2(on the one hand), on the other hand by described stake resistance R8 ground connection; The source ground of described metal-oxide-semiconductor Q2; The drain electrode of described metal-oxide-semiconductor Q2 connects power supply VCC by a shared divider resistance R on the one hand, connects described output port output by described divider resistance R4 on the other hand.
The 3rd expanded circuit 13 comprises metal-oxide-semiconductor Q3, stake resistance R9 and divider resistance R6; The grid of described metal-oxide-semiconductor Q3 connects i.e. the 3rd input port of a described input port input3(on the one hand), on the other hand by described stake resistance R9 ground connection; The source ground of described metal-oxide-semiconductor Q3; The drain electrode of described metal-oxide-semiconductor Q3 connects power supply VCC by a shared divider resistance R on the one hand, connects described output port output by described divider resistance R6 on the other hand.
Equally, by each component parameters in circuit is set, utilize the IO input port (ADC mouth) of single-chip microcomputer to gather the analog voltage of described output port output output, can be directly also unique digital voltage of deriving described first input end mouth input1, the second input port input2 and the 3rd input port input3 input be high level or low level.It calculates and derivation can reference example 1, at this, is not described in detail.
Embodiment 3
Referring to Fig. 3, it is the structural representation of a kind of IO input port expanded circuit of providing of the embodiment of the present invention.This IO input port expanded circuit comprises output port output, two expanded circuits 11,12 and two input port input1, input2, the input end of each expanded circuit 11,12 is connected respectively described input port input1, an input2, the output terminal of each expanded circuit all connects described output port output, described output port output connects the IO input port of single-chip microcomputer, wherein, the IO input port of this single-chip microcomputer has the analog voltage acquisition function, for example the ADC mouth.Convert the IO input port of after a common analog voltage, by described output port output, exporting to single-chip microcomputer by two digital voltages of described two input port input1, input2 input to after by corresponding expanded circuit, and, by each component parameters in circuit is set, make the analog voltage of the IO input port by knowing single-chip microcomputer, can be directly also unique two digital voltages deriving described two input port input1, input2 input be high level or low level.
In the present embodiment, each expanded circuit is a topological structure unit, and the circuit structure of each topological structure unit is identical, can realize the numeral input is converted to the function of Voltage-output.In the time the IO input port of single-chip microcomputer need to being extended to N input port, utilize N topological structure unit to realize.In the present embodiment, utilize 2 topological structure unit to realize an IO input port of single-chip microcomputer is extended to 2 input ports, i.e. the first expanded circuit 11 and the second expanded circuit 12.
Concrete, the first expanded circuit 11 comprises metal-oxide-semiconductor Q1, stake resistance R7 and two divider resistance R1, R2; It is the first input end mouth that the grid of described metal-oxide-semiconductor Q1 connects a described input port input1(on the one hand), on the other hand by described stake resistance R7 ground connection; The source ground of described metal-oxide-semiconductor Q1; The drain electrode of described metal-oxide-semiconductor Q1 connects power supply VCC by divider resistance R1 on the one hand, connects described output port output by divider resistance R2 on the other hand.
The second expanded circuit 12 comprises metal-oxide-semiconductor Q2, stake resistance R8 and two divider resistance R3, R4; The grid of described metal-oxide-semiconductor Q2 connects i.e. the second input port of a described input port input2(on the one hand), on the other hand by described stake resistance R8 ground connection; The source ground of described metal-oxide-semiconductor Q2; The drain electrode of described metal-oxide-semiconductor Q2 connects power supply VCC by divider resistance R3 on the one hand, connects described output port output by divider resistance R4 on the other hand.
Equally, by each component parameters in circuit is set, utilize the IO input port (ADC mouth) of single-chip microcomputer to gather the analog voltage of described output port output output, can be directly also unique digital voltage of deriving described first input end mouth input1 and the second input port input2 input be high level or low level.It calculates and derivation can reference example 1, at this, is not described in detail.
Embodiment 4
Referring to Fig. 4, it is the structural representation of a kind of IO input port expanded circuit of providing of the embodiment of the present invention.This IO input port expanded circuit comprises output port output, two expanded circuits 11,12 and two input port input1, input2, the input end of each expanded circuit 11,12 is connected respectively described input port input1, an input2, the output terminal of each expanded circuit all connects described output port output, described output port output connects the IO input port of single-chip microcomputer, wherein, the IO input port of this single-chip microcomputer has the analog voltage acquisition function, for example the ADC mouth.Convert the IO input port of after a common analog voltage, by described output port output, exporting to single-chip microcomputer by two digital voltages of described two input port input1, input2 input to after by corresponding expanded circuit, and, by each component parameters in circuit is set, make the analog voltage of the IO input port by knowing single-chip microcomputer, can be directly also unique two digital voltages deriving described two input port input1, input2 input be high level or low level.
In the present embodiment, each expanded circuit is a topological structure unit, and the circuit structure of each topological structure unit is identical, can realize the numeral input is converted to the function of Voltage-output.In the time the IO input port of single-chip microcomputer need to being extended to N input port, utilize N topological structure unit to realize.In the present embodiment, utilize 2 topological structure unit to realize an IO input port of single-chip microcomputer is extended to 2 input ports, i.e. the first expanded circuit 11 and the second expanded circuit 12.
Concrete, the first expanded circuit 11 comprises triode Q1 and divider resistance R1; It is the first input end mouth that the base stage of described triode Q1 connects a described input port input1(); The grounded emitter of described triode Q1; The collector of described triode Q1 connects described divider resistance R1 and connects power supply VCC by a shared divider resistance R, and described divider resistance R1 is connected described output port output with the tie point between described shared divider resistance R.
The second expanded circuit 12 comprises triode Q2 and divider resistance R2; The base stage of described triode Q2 connects i.e. the second input port of a described input port input2(); The grounded emitter of described triode Q2; The collector of described triode Q2 connects described divider resistance R2 and connects power supply VCC by a shared divider resistance R, and described divider resistance R2 is connected described output port output with the tie point between described shared divider resistance R.Equally, by each component parameters in circuit is set, utilize the IO input port (ADC mouth) of single-chip microcomputer to gather the analog voltage of described output port output output, can be directly also unique digital voltage of deriving described first input end mouth input1 and the second input port input2 input be high level or low level.It calculates and derivation can reference example 1, at this, is not described in detail.
Embodiment 5
Referring to Fig. 5, it is the structural representation of a kind of IO input port expanded circuit of providing of the embodiment of the present invention.This IO input port expanded circuit comprises output port output, two expanded circuits 11,12 and two input port input1, input2, the input end of each expanded circuit 11,12 is connected respectively described input port input1, an input2, the output terminal of each expanded circuit all connects described output port output, described output port output connects the IO input port of single-chip microcomputer, wherein, the IO input port of this single-chip microcomputer has the analog voltage acquisition function, for example the ADC mouth.Convert the IO input port of after a common analog voltage, by described output port output, exporting to single-chip microcomputer by two digital voltages of described two input port input1, input2 input to after by corresponding expanded circuit, and, by each component parameters in circuit is set, make the analog voltage of the IO input port by knowing single-chip microcomputer, can be directly also unique two digital voltages deriving described two input port input1, input2 input be high level or low level.
In the present embodiment, each expanded circuit is a topological structure unit, and the circuit structure of each topological structure unit is identical, can realize the numeral input is converted to the function of Voltage-output.In the time the IO input port of single-chip microcomputer need to being extended to N input port, utilize N topological structure unit to realize.In the present embodiment, utilize 2 topological structure unit to realize an IO input port of single-chip microcomputer is extended to 2 input ports, i.e. the first expanded circuit 11 and the second expanded circuit 12.
Concrete, the first expanded circuit 11 comprises triode Q1 and two divider resistance R1, R1 '; It is the first input end mouth that the base stage of described triode Q1 connects a described input port input1(); The grounded emitter of described triode Q1; The collector of described triode Q1 connects power supply VCC by described two divider resistance R1, R1 ' series connection is rear, and the tie point between described two divider resistance R1, R1 ' connects described output port output.
The second expanded circuit 12 comprises triode Q2 and two divider resistance R2, R2 '; The base stage of described triode Q2 connects i.e. the second input port of a described input port input2(); The grounded emitter of described triode Q2; The collector of described triode Q2 connects power supply VCC by described two divider resistance R2, R2 ' series connection is rear, and the tie point between described two divider resistance R2, R2 ' connects described output port output.
Equally, by each component parameters in circuit is set, utilize the IO input port (ADC mouth) of single-chip microcomputer to gather the analog voltage of described output port output output, can be directly also unique digital voltage of deriving described first input end mouth input1 and the second input port input2 input be high level or low level.It calculates and derivation can reference example 1, at this, is not described in detail.
Embodiment 6
Referring to Fig. 6, it is the structural representation of a kind of IO input port expanded circuit of providing of the embodiment of the present invention.This IO input port expanded circuit comprises output port output, three expanded circuits 11,12,13 and three input port input1, input2, input3, the input end of each expanded circuit 11,12,13 is connected respectively a described input port input1, input2, input3, the output terminal of each expanded circuit all connects described output port output, described output port output connects the IO input port of single-chip microcomputer, wherein, the IO input port of this single-chip microcomputer has the analog voltage acquisition function, for example the ADC mouth.Convert the IO input port of after a common analog voltage, by described output port output, exporting to single-chip microcomputer by three digital voltages of described three input port input1, input2, input3 input to after by corresponding expanded circuit, and, by each component parameters in circuit is set, make the analog voltage of the IO input port by knowing single-chip microcomputer, can be directly also unique three digital voltages deriving described three input port input1, input2, input3 input be high level or low level.
In the present embodiment, each expanded circuit is a topological structure unit, and the circuit structure of each topological structure unit is identical, can realize the numeral input is converted to the function of Voltage-output.In the time the IO input port of single-chip microcomputer need to being extended to N input port, utilize N topological structure unit to realize.In the present embodiment, utilize 3 topological structure unit to realize an IO input port of single-chip microcomputer is extended to 3 input ports, i.e. the first expanded circuit 11, the second expanded circuit 12 and the 3rd expanded circuit 13.
Concrete, the first expanded circuit 11 comprises triode Q1 and divider resistance R1; It is the first input end mouth that the base stage of described triode Q1 connects a described input port input1(); The grounded emitter of described triode Q1; The collector of described triode Q1 connects described divider resistance R1 and connects power supply VCC by a shared divider resistance R, and described divider resistance R1 is connected described output port output with the tie point between described shared divider resistance R.
The second expanded circuit 12 comprises triode Q2 and divider resistance R2; The base stage of described triode Q2 connects i.e. the second input port of a described input port input2(); The grounded emitter of described triode Q2; The collector of described triode Q2 connects described divider resistance R2 and connects power supply VCC by a shared divider resistance R, and described divider resistance R2 is connected described output port output with the tie point between described shared divider resistance R.
The 3rd expanded circuit 13 comprises triode Q3 and divider resistance R3; The base stage of described triode Q3 connects i.e. the 3rd input port of a described input port input3(); The grounded emitter of described triode Q3; The collector of described triode Q3 connects described divider resistance R3 and connects power supply VCC by a shared divider resistance R, and described divider resistance R3 is connected described output port output with the tie point between described shared divider resistance R.
Equally, by each component parameters in circuit is set, utilize the IO input port (ADC mouth) of single-chip microcomputer to gather the analog voltage of described output port output output, can be directly also unique digital voltage of deriving described first input end mouth input1, the second input port input2 and the 3rd input port input3 input be high level or low level.It calculates and derivation can reference example 1, at this, is not described in detail.
Understandable, the expanded circuit (topological structure unit) of IO of the present invention input port expanded circuit is not limited to 2 or 3 that mention in above-mentioned all embodiment, when above-mentioned IO input port expanded circuit increases a topological structure unit, can increase by a road input.Can expand to N road input, and the resistance of each resistance in corresponding Circuit tuning, make the analog voltage that gathers output port output, can be directly also unique to derive the digital voltage that each input port enters be high level or low level.
In sum, IO disclosed by the invention input port expanded circuit has following beneficial effect:
1, the digital voltage of a plurality of inputs is exported to analog voltage to the IO input port with analog voltage acquisition function by the present invention by IO input port expanded circuit, corresponding relation according to output voltage and input voltage, can effectively read IO mouth input state by the input voltage (being the output voltage of expanded circuit) that gathers the IO input port, control the purpose that can reach the expansion of IO mouth without other IO mouths;
2, circuit is simple, and cost is low; IO of the present invention input port expanded circuit only need to utilize simple resistance and metal-oxide-semiconductor (or triode) circuit to realize, low compared with the DAC converter cost that can realize identical function in prior art, and this circuit is compared the DAC converter and has been lacked some and control IO mouths, only need small current driving, circuit is simple easily to be realized.
The above is the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also are considered as protection scope of the present invention.
Claims (9)
1. an IO input port expanded circuit, wherein, described IO input port has the analog voltage acquisition function, it is characterized in that, described IO input port expanded circuit comprises output port, at least two expanded circuits and at least two input ports, the input end of each expanded circuit is connected respectively a described input port, and the output terminal of each expanded circuit all connects described output port, and described output port connects described IO input port; At least two digital voltages inputting by described at least two input ports, by after changing after corresponding expanded circuit, generate a common analog voltage and export to described IO input port by described output port.
2. IO as claimed in claim 1 input port expanded circuit, is characterized in that, the digital voltage that can obtain uniquely each described input port input by described analog voltage is high level/low level.
3. IO as claimed in claim 1 input port expanded circuit, is characterized in that, described IO input port is the ADC input port.
4. IO as claimed in claim 1 input port expanded circuit, is characterized in that, described expanded circuit is two, and described input port is two.
5. IO as claimed in claim 1 input port expanded circuit, is characterized in that, described expanded circuit is three, and described input port is three.
6. IO as described as any one in claim 1~5 input port expanded circuit, is characterized in that, each described expanded circuit comprises metal-oxide-semiconductor, stake resistance and two divider resistances; The grid of described metal-oxide-semiconductor connects a described input port on the one hand, on the other hand by described ground resistance earth; The source ground of described metal-oxide-semiconductor; The drain electrode of described metal-oxide-semiconductor connects power supply by a described divider resistance on the one hand, connects described output port by another described divider resistance on the other hand.
7. IO as described as any one in claim 1~5 input port expanded circuit, is characterized in that, each described expanded circuit comprises metal-oxide-semiconductor, stake resistance and divider resistance; The grid of described metal-oxide-semiconductor connects a described input port on the one hand, on the other hand by described ground resistance earth; The source ground of described metal-oxide-semiconductor; The drain electrode of described metal-oxide-semiconductor connects power supply by a shared divider resistance on the one hand, connects described output port by described divider resistance on the other hand.
8. IO as described as any one in claim 1~5 input port expanded circuit, is characterized in that, each described expanded circuit comprises triode and two divider resistances, and the base stage of described triode connects a described input port; The grounded emitter of described triode; The collector of described triode connects power supply by described two divider resistances series connection is rear, and the tie point between described two divider resistances connects described output port.
9. IO as described as any one in claim 1~5 input port expanded circuit, is characterized in that, each described expanded circuit comprises triode and divider resistance, and the base stage of described triode connects a described input port; The grounded emitter of described triode; The collector of described triode connects described divider resistance and connects power supply by a shared divider resistance, and described divider resistance is connected described output port with the tie point between described shared divider resistance.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310384866.2A CN103439905B (en) | 2013-08-29 | 2013-08-29 | IO input port expansion circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310384866.2A CN103439905B (en) | 2013-08-29 | 2013-08-29 | IO input port expansion circuit |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103439905A true CN103439905A (en) | 2013-12-11 |
CN103439905B CN103439905B (en) | 2015-12-23 |
Family
ID=49693600
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310384866.2A Active CN103439905B (en) | 2013-08-29 | 2013-08-29 | IO input port expansion circuit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103439905B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103984268A (en) * | 2014-05-28 | 2014-08-13 | 大连美恒时代科技有限公司 | Input and output device of signal logic controller and signal logic controller |
CN107196642A (en) * | 2017-05-30 | 2017-09-22 | 长沙方星腾电子科技有限公司 | A kind of tri-state generation circuit |
CN108173544A (en) * | 2017-12-30 | 2018-06-15 | 惠州市蓝微新源技术有限公司 | A kind of compatible input or the I/O port circuit of output control |
CN110989457A (en) * | 2019-12-23 | 2020-04-10 | 广东速美达自动化股份有限公司 | Expansion method of IO points |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201754168U (en) * | 2009-12-24 | 2011-03-02 | 北京航天拓扑高科技有限责任公司 | Position control instruct converter test bench |
CN202102275U (en) * | 2011-03-07 | 2012-01-04 | 广州视源电子科技有限公司 | IO port expansion circuit |
CN102880088A (en) * | 2012-10-26 | 2013-01-16 | 中联重科股份有限公司 | Expansion circuit of switching value input interface |
-
2013
- 2013-08-29 CN CN201310384866.2A patent/CN103439905B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201754168U (en) * | 2009-12-24 | 2011-03-02 | 北京航天拓扑高科技有限责任公司 | Position control instruct converter test bench |
CN202102275U (en) * | 2011-03-07 | 2012-01-04 | 广州视源电子科技有限公司 | IO port expansion circuit |
CN102880088A (en) * | 2012-10-26 | 2013-01-16 | 中联重科股份有限公司 | Expansion circuit of switching value input interface |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103984268A (en) * | 2014-05-28 | 2014-08-13 | 大连美恒时代科技有限公司 | Input and output device of signal logic controller and signal logic controller |
CN103984268B (en) * | 2014-05-28 | 2016-11-23 | 大连美恒时代科技有限公司 | The input/output unit of a kind of signal logic controller and signal logic controller |
CN107196642A (en) * | 2017-05-30 | 2017-09-22 | 长沙方星腾电子科技有限公司 | A kind of tri-state generation circuit |
CN108173544A (en) * | 2017-12-30 | 2018-06-15 | 惠州市蓝微新源技术有限公司 | A kind of compatible input or the I/O port circuit of output control |
CN110989457A (en) * | 2019-12-23 | 2020-04-10 | 广东速美达自动化股份有限公司 | Expansion method of IO points |
Also Published As
Publication number | Publication date |
---|---|
CN103439905B (en) | 2015-12-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103439905B (en) | IO input port expansion circuit | |
CN104375551A (en) | Band gap voltage generation circuit | |
CN104122970A (en) | Power circuit | |
CN104679084B (en) | Voltage calibration circuit and low pressure difference linearity voltage-stabilizing system | |
CN103134994A (en) | Testing circuit based on double level laminated busbar random induction and method thereof | |
CN109004919B (en) | Current/frequency conversion circuit and conversion method based on triangular wave modulation | |
CN204515579U (en) | A kind of overvoltage crowbar | |
CN204314764U (en) | Band gap voltage generative circuit | |
CN204517773U (en) | A kind of single ended input hysteresis comparator circuit | |
CN207490898U (en) | The logic level transition device and amplifying circuit of dual power supply amplifier | |
CN203882223U (en) | Voltage-controlled current source circuit | |
CN202586873U (en) | Frequency multiplier circuit and Bluetooth three dimensional glasses phase tester | |
CN207732622U (en) | Output voltage constant-voltage control circuit | |
CN201440168U (en) | E-load machine | |
CN206759416U (en) | Difference type analog input interface circuit | |
CN205123696U (en) | Self -maintained circuit suitable for direct -current converter | |
CN104300804B (en) | Spm | |
CN204316474U (en) | For the pwm circuit of Switching Power Supply remote control benchmark | |
CN103869875A (en) | Signal generator with clock reference source circuit | |
CN102710130A (en) | High precision AC/DC (alternating current/direct current) converter current-limit circuit | |
CN103956997B (en) | A kind of PWM wave generation circuit | |
CN201820158U (en) | Voltage stabilizing circuit based on three-terminal adjustable shunt reference source | |
CN221305898U (en) | Square wave generating circuit and equipment | |
CN221283176U (en) | Digital quantity acquisition circuit, chip and device | |
CN207530707U (en) | A kind of electric power output voltage conditioned circuit |
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 |