The IO port expansion circuit
Technical field
The utility model relates to a kind of IO mouth circuit, relates in particular to a kind of IO port expansion circuit.
Background technology
Single-chip microcomputer is penetrated into our various fields in life at present, almost is difficult to find which field not have the trace of single-chip microcomputer.The guider of guided missile, the control of various instrument on the aircraft, the network communication of computing machine and data transmission; The real-time control and the data processing of industrial automation process; Widely used various intellective IC card, the safe-guard system of civilian limousine, the control of video recorder, video camera, automatic washing machine; And program control toy, electronic pet or the like, these all be unable to do without single-chip microcomputer.It is thus clear that single-chip microcomputer is widely used in fields such as intelligent management and the process control of instrument and meter, household electrical appliance, medical equipment, Aero-Space, specialized equipment.
In each application scenario, use single-chip microcomputer to control the work of various instruments and electrical equipment as main control chip usually.Because the number of the IO mouth of single-chip microcomputer is fixed, and an IO mouth is merely able to export one tunnel control signal, when controlled device more for a long time, run into the not enough situation of IO mouth of single-chip microcomputer through regular meeting.Solution to the problems described above mainly contained two kinds in the past, and a kind of is to change the more single-chip microcomputer of IO mouth number, yet mounted single-chip microcomputer is changed, and can cause the loaded down with trivial details of production process, thereby increases production cost; Another kind of solution is to expand the IO mouth through increasing special extended chip, yet the price comparison of extended chip is high, therefore has the high problem of production cost equally.
Therefore, be necessary to provide a kind of follow-on IO port expansion circuit to overcome above-mentioned defective.
The utility model content
The purpose of the utility model provides a kind of IO port expansion circuit, simple, the with low cost and easy control of the circuit structure of said IO port expansion circuit.
To achieve these goals; The utility model provides a kind of IO port expansion circuit; Comprise input port, first expanded circuit, second expanded circuit, first output port and second output port; The input end of said first, second expanded circuit is connected with said input port respectively, and the output terminal of said first expanded circuit is connected with said first output port, and the output terminal of said second expanded circuit is connected with said second output port.
Preferably; Said first expanded circuit comprises first resistance, second resistance, the 3rd resistance and first triode; One end of said first resistance is connected with said input port; One end of the other end of said first resistance and said second resistance is connected with the base stage of said first triode respectively; One end of said the 3rd resistance is connected with the collection utmost point of said first triode, the other end connects power supply, the emitter grounding of the other end of said second resistance and said first triode, and said first output port is located between the collection utmost point of said the 3rd resistance and said first triode.
Preferably; Said second expanded circuit comprises the 4th resistance, the 5th resistance, the 6th resistance, the 7th resistance and second triode; An end that one end of said the 4th resistance is connected with said input port, the other end connects said the 5th resistance respectively and an end of the 6th resistance; The other end of said the 5th resistance connects the base stage of said second triode, and the other end of said the 6th resistance connects power supply, and an end of said the 7th resistance connects the collection utmost point of said second triode, the other end connects power supply; Said second output port is located between the collection utmost point of said the 7th resistance and said second triode, the emitter grounding of said second triode.
Preferably, said first, second triode is NPN type triode.
Compared with prior art; The input port of the utility model IO port expansion circuit can be connected with the IO mouth of single-chip microcomputer; Through first expanded circuit and second expanded circuit of said IO port expansion circuit, the signal of importing from the IO mouth of said single-chip microcomputer can expand to multiple signals output, thereby has solved single-chip microcomputer IO mouth problem of shortage; In addition; The component number that said IO port expansion circuit adopts is few and circuit structure is simple, thereby cost is low and easy control, so the IO port expansion circuit of the utility model can solve single-chip microcomputer IO mouth problem of shortage under lower-cost prerequisite.
Through following description and combine accompanying drawing, it is more clear that the utility model will become, and these accompanying drawings are used to explain the embodiment of the utility model.
Description of drawings
Fig. 1 is the circuit theory diagrams of the utility model IO port expansion circuit.
Embodiment
With reference now to accompanying drawing, describe the embodiment of the utility model, the similar elements label is represented similar elements in the accompanying drawing.As stated, the utility model provides a kind of IO port expansion circuit, simple, the with low cost and easy control of the circuit structure of said IO port expansion circuit.
With reference to figure 1; In a specific embodiment of the utility model; Said IO port expansion circuit comprises an input port IN, first expanded circuit 1, second expanded circuit 2, the first output port OUT_1 and the second output port OUT_2; The input end of said first, second expanded circuit 1,2 is connected with said input port IN respectively; The output terminal of said first expanded circuit 1 is connected with the said first output port OUT_1, and the output terminal of said second expanded circuit 2 is connected with the said second output port OUT_2.
Particularly; Said first expanded circuit 1 comprises first resistance R 1, second resistance R 2, the 3rd resistance R 3 and the first triode Q1; One end of said first resistance R 1 is connected with said input port IN; One end of the other end of said first resistance R 1 and said second resistance R 2 is connected with the base stage B1 of the said first triode Q1 respectively; One end of said the 3rd resistance R 3 is connected with the collection utmost point C1 of the said first triode Q1, the other end connects power supply VCC, the emitter-base bandgap grading E1 ground connection of the other end of said second resistance R 2 and the said first triode Q1, and the said first output port OUT_1 is located between the collection utmost point C1 of said the 3rd resistance R 3 and the said first triode Q1.In the present embodiment, said first triode is a NPN type triode, and the said first output port OUT_1 can be used for connecting LED lamp, loudspeaker or other electron devices, and alternatively, said IO port expansion circuit also can comprise a plurality of said first expanded circuits 1.
More specifically; Said second expanded circuit 2 comprises the 4th resistance R 4, the 5th resistance R 5, the 6th resistance R 6, the 7th resistance R 7 and the second triode Q2; An end that one end of said the 4th resistance R 4 is connected with said input port IN, the other end connects said the 5th resistance R 5 respectively and an end of the 6th resistance R 6; The other end of said the 5th resistance R 5 connects the base stage B2 of the said second triode Q2; The other end of said the 6th resistance R 6 connects power supply VCC; Collection utmost point C2, the other end that one end of said the 7th resistance R 7 connects the said second triode Q2 connect power supply VCC, and the said second output port OUT_2 is located between the collection utmost point C2 of said the 7th resistance R 7 and the said second triode Q2, the emitter-base bandgap grading E2 ground connection of the said second triode Q2.In the present embodiment, the said second triode Q2 is a NPN type triode, and the said second output port OUT_2 can be used for connecting USB or other electron devices, and alternatively, said IO port expansion circuit also can comprise a plurality of said second expanded circuits 2.
Below in conjunction with Fig. 1 the principle of work of the utility model IO port expansion circuit is described, specific as follows:
The input port IN of said IO port expansion circuit links to each other with exterior I O mouth; In the present embodiment; The IO mouth that said exterior I O mouth is a single-chip microcomputer; When high level signal of the IO of said single-chip microcomputer mouth output is given the input port IN of said IO port expansion circuit, said first, second triode Q1, the equal conducting of Q2, thereby said first output port OUT_1 and the equal output low level signal of the second output port OUT_2; When low level signal of the IO of said single-chip microcomputer mouth output is given the input port IN of said IO port expansion circuit; Said first, second triode Q1, Q2 all end, thereby the said first output port OUT_1 and the second output port OUT_2 all export high level signal; When the IO of said single-chip microcomputer mouth was output as high-impedance state, the said first triode Q1 ended, and the said second triode Q2 conducting, thereby the said first output port OUT_1 exports high level signal, the second output port OUT_2 output low level signal.
In sum; The input port IN of the utility model IO port expansion circuit can be connected with the IO mouth of single-chip microcomputer; Through first expanded circuit 1 and second expanded circuit 2 of said IO port expansion circuit, the signal of importing from the IO mouth of said single-chip microcomputer can expand to multiple signals output, thereby has solved single-chip microcomputer IO mouth problem of shortage; In addition; The component number that said IO port expansion circuit adopts is few and circuit structure is simple, thereby cost is low and easy control, so the IO port expansion circuit of the utility model can solve single-chip microcomputer IO mouth problem of shortage under lower-cost prerequisite.
More than combine most preferred embodiment that the utility model is described, but the present invention is not limited to the embodiment of above announcement, and should contains various modification, equivalent combinations of carrying out according to the essence of the utility model.