The utility model content
The purpose of the utility model is to provide a kind of simple and easy ternary LED display circuit of indicating operating status, and circuit is simple, and the effective various states of display circuit, thereby makes full use of the I/O interface resource of MCU.
To achieve these goals; The utility model provides a kind of simple and easy ternary LED display circuit of indicating operating status; Comprise first triode, second triode, the 3rd triode and two common anode light diodes; Two anodes that are total to the anode light diode connect power supply, and the base stage of said first triode connects I/O interface and power supply through one first resistance, and collector is connected with a said negative electrode that is total to the anode light diode through one first pull-up resistor; Grounded emitter, and a parallelly connected divider resistance between the base stage, emitter; The base stage of said second triode connects I/O interface and power supply through one second resistance, and collector connects direct supply, grounded emitter through one second pull-up resistor; The base stage of said the 3rd triode is connected to the collector of said second triode through one the 3rd resistance, and collector is connected grounded emitter through the negative electrode of the said common anode light diode of one the 3rd pull-up resistor and another.
Preferably; Be connected one the 3rd pull-up resistor between said power supply and the I/O interface; Said first resistance and said divider resistance are between said I/O interface and ground wire, and the output of the dividing potential drop of said first resistance and said divider resistance connects the base stage of said first triode.
Preferably, said first pull-up resistor, the 3rd pull-up resistor are current-limiting resistance, and resistance is by the real work electric current decision of said anode light diode altogether.
Preferably, the value ratio of said the 3rd pull-up resistor and first resistance, divider resistance should guarantee I/O interface dividing potential drop gained voltage greater than 0.7V, and the base stage dividing potential drop gained voltage of first triode is less than 0.5V.
Compared with prior art, the simple and easy ternary LED display circuit of the utility model indicating operating status is simple in structure, and effectively detects three kinds of different state of the I/O mouth output of single-chip microcomputer etc.: high level, low level and high-impedance state (input state).And effectively simplified system reduces the system design cost.
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.
Embodiment
To combine the accompanying drawing among the utility model embodiment below, the technical scheme among the embodiment is carried out clear, intactly description, obviously, described embodiment only is the utility model part embodiment, rather than whole 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.The utility model provides a kind of simple and easy ternary LED display circuit of indicating operating status, and circuit is simple, and the effective various states of display circuit, thereby makes full use of the I/O interface resource of MCU.
The circuit theory diagrams that are used for simple and easy ternary LED display circuit first embodiment of testing circuit state for the utility model shown in Figure 1.The simple and easy ternary LED display circuit 100 that the utility model is used for the testing circuit state comprises the first triode Q1, the second triode Q2, the 3rd triode Q3 and two anode light diode D1, D2 altogether; Two anodes that are total to anode light diode D1, D2 connect the VCC power supply; The base stage Q1b of the said first triode Q1 connects I/O interface 10 through one first resistance R 1; And said I/O interface 10 connects the VCC power supply through a divider resistance R5; The collector Q1c of the said first triode Q1 is connected with the said negative electrode of anode light diode D1 altogether through one first pull-up resistor R11; The emitter Q1e ground connection of the said first triode Q1, and a parallelly connected divider resistance R4 between the base stage Q1b of the said first triode Q1, emitter Q1e.The base stage Q2b of the said second triode Q2 connects said I/O interface 10 through one second resistance R 2, and the collector Q2c of the said second triode Q2 connects VCC power supply, the emitter Q2e ground connection of the said second triode Q2 through one second pull-up resistor R12; The base stage Q3b of said the 3rd triode Q3 is connected to the collector Q2c of the said second triode Q2 through one the 3rd resistance R 3; The collector Q3c of said the 3rd triode Q3 is connected the emitter Q3e ground connection of said the 3rd triode Q3 through one the 3rd pull-up resistor R13 with another said negative electrode of anode light diode D2 altogether.
Preferably; Be connected one the 3rd pull-up resistor R5 between said power supply and the I/O interface 10; Said first resistance R 1 and said divider resistance R4 are between said I/O interface 10 and ground wire, and said first resistance R 1 is exported the base stage Q1b that meets the said first triode Q1 with the dividing potential drop of said divider resistance R4.And the value ratio of said the 3rd pull-up resistor R5 and first resistance R 1, divider resistance R4 should guarantee I/O interface 10 dividing potential drop gained voltages greater than 0.7V, and the base stage Q1b dividing potential drop gained voltage of the first triode Q1 is less than 0.5V.
Preferably, the said first pull-up resistor R11, the 3rd pull-up resistor R13 are current-limiting resistance, and resistance is by the real work electric current decision of said anode light diode D1, D2 altogether.
Below in conjunction with Fig. 1, specifically describe the principle of work that the utility model is used for the simple and easy ternary LED display circuit of testing circuit state.
When said I/O interface is input as high level, said first triode Q1 and the equal conducting of the second triode Q2, the collector Q1c of the first triode Q1 and the collector Q2c of the second triode Q2 are low level at this moment.Because the base stage Q3b of said the 3rd triode Q3 is connected with the collector Q2c of the said second triode Q2; So the base stage Q3b of said the 3rd triode Q3 also is a low level; Therefore said the 3rd triode Q3 ends, and this moment, the collector Q3c of said the 3rd triode Q3 was a high level.Because the collector Q1c of the first triode Q1 is a low level; The collector Q3c of the 3rd triode Q3 is a high level; So first anode light diode D1 conducting altogether that is connected with the collector Q1c of the said first triode Q1; The second common anode light diode D2 that is connected with the collector Q3c of said the 3rd triode Q3 ends, thereby the first common anode light diode D1 lights, and second is total to anode light diode D2 does not work.
When said I/O interface is input as low level, the said first triode Q1 and second all not conductings of triode Q2, the collector Q1c of the first triode Q1 and the collector Q2c of the second triode Q2 are high level at this moment.Because the base stage Q3b of said the 3rd triode Q3 is connected with the collector Q2c of the said second triode Q2; So the base stage Q3b of said the 3rd triode Q3 also is a high level; Therefore said the 3rd triode Q3 conducting, this moment, the collector Q3c of said the 3rd triode Q3 was a low level.Because the collector Q1c of the first triode Q1 is a high level; The collector Q3c of the 3rd triode Q3 is a low level; So the first common anode light diode D1 that is connected with the collector Q1c of the said first triode Q1 ends; The second common anode light diode D2 conducting that is connected with the collector Q3c of said the 3rd triode Q3, thus the first common anode light diode D1 does not work, and the second common anode light diode D2 is bright.
When said I/O interface is input as input state (high-impedance state); The said second triode Q2 conducting; And the said first triode Q1 is owing to a parallelly connected divider resistance R4 between collector Q1c, the emitter Q1e; Make the collector Q1c of the said first triode Q1, the dividing potential drop between the emitter Q1e to reduce; Make the value ratio of the 3rd pull-up resistor R5 and first resistance R 1, divider resistance R4 should guarantee I/O interface dividing potential drop gained voltage greater than 0.7V through setting, the base stage Q1b dividing potential drop gained voltage of the first triode Q1 is less than 0.5V, when making the I/O interface be input as input state; The collector Q1c of the said first triode Q1, the virtual voltage between the emitter Q1e be less than the voltage of convincing by patient analysis of the said first triode Q1 collector Q1c, emitter Q1e, thereby the said first triode Q1 is ended; Like this, because the said first triode Q1 ends, the collector Q1c of the first triode Q1 is a high level, and the said second triode Q2 conducting, the collector Q2c of the second triode Q2 is a low level.Because the base stage Q3b of said the 3rd triode Q3 is connected with the collector Q2c of the said second triode Q2; So the base stage Q3b of said the 3rd triode Q3 also is a low level; Therefore said the 3rd triode Q3 ends, and this moment, the collector Q3c of said the 3rd triode Q3 was a high level.So the first common anode light diode D1 that is connected with the collector Q1c of the said first triode Q1 ends; The second common anode light diode D2 that is connected with the collector Q3c of said the 3rd triode Q3 ends; Do not work thereby first is total to anode light diode D1, second is total to anode light diode D2 does not work.
In this example; The said first triode Q1, the second triode Q2, the 3rd triode Q3 are negative-positive-negative transistor; But be appreciated that ground; The said first triode Q1, the second triode Q2, the 3rd triode Q3 also can be the positive-negative-positive transistor, and as the said first triode Q1, the second triode Q2, when the 3rd triode Q3 is the positive-negative-positive transistor, the first light emitting diode D1 and the second light emitting diode D2 are the common cathode light emitting diode; Only need the corresponding connection that changes element to get final product, do not influence effective enforcement of the utility model.
More than combine most preferred embodiment that the utility model is described, but the utility model 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.