A kind of LED lamp drive circuit
Technical field
The utility model is a kind of LED lamp drive circuit, belongs to the renovation technique of LED lamp drive circuit.
Background technology
At present, in most of small household appliances controlling Design, all require with the least possible resource and the original realization of one-tenth functional requirement as much as possible.The I/O interface driving LED of existing common single-chip microcomputer adopts unidirectional matrix form connection shown in Figure 1, in this unidirectional matrix form connection, the single-chip processor i/o interface serves as to drive 6 LED at most in the mode of 2*3, and the driving force of the I/O interface of single-chip microcomputer does not make full use of.
Summary of the invention
The purpose of this utility model is to consider the problems referred to above and a kind of LED lamp drive circuit of realizing controlling with limited less single-chip processor i/o interface LED light-emitting diode as much as possible is provided, the single-chip processor i/o interface that the utility model takies control reduces, and has improved cost performance of product greatly.Particularly tight in cost control, the single-chip processor i/o interface resource is few, functional requirement LED lamp shows under many situations can highlight its advantage.
The technical solution of the utility model is: LED lamp drive circuit of the present utility model, include current-limiting circuit and LED matrix circuit, and the LED matrix circuit is connected with the interface of single-chip microcomputer by current-limiting circuit, and wherein the LED matrix circuit is two-way incidence matrix circuit.
Above-mentioned current-limiting circuit includes R1, R2, R3, R4, the R5 of current-limiting resistance, the LED matrix circuit includes LED 1-LED20, and wherein the two-way incidence matrix formula of LED 1-LED20 is connected with I/O interface P1, P2, P3, P4, the P5 of single-chip microcomputer by current-limiting resistance R1, R2, R3, R4, R5 respectively after connecting.
Above-mentioned single-chip microcomputer adopts the mode driven for emitting lights diode of timesharing scanning.
The whole scan period of above-mentioned single-chip microcomputer, frequency was greater than 50Hz smaller or equal to 20ms.
The utility model is owing to adopt the method for two-way incidence matrix formula to realize controlling with limited less single-chip processor i/o interface the purpose of LED light-emitting diode as much as possible, reduce owing to take the single-chip processor i/o interface of control, improved cost performance of product greatly.Particularly tight in cost control, the single-chip processor i/o interface resource is few, functional requirement LED lamp shows under many situations can highlight its advantage.The utility model can make full use of the state of single-chip processor i/o interface, makes full use of the hardware resource of single-chip processor i/o interface, has reduced taking the single-chip processor i/o interface.The utility model is that a kind of design is ingenious, can improve the product price ratio, convenient and practical LED lamp drive circuit.
Description of drawings
Fig. 1 is the schematic diagram of existing common matrix LED drive circuit;
Fig. 2 is the schematic diagram of the two-way incidence matrix formula of the utility model led drive circuit.
Embodiment
Embodiment:
The schematic diagram of the utility model led drive circuit as shown in Figure 2, LED lamp drive circuit of the present utility model, include current-limiting circuit and LED matrix circuit, the LED matrix circuit is connected with the interface of single-chip microcomputer by current-limiting circuit, and wherein the LED matrix circuit is two-way incidence matrix circuit.
In the present embodiment, above-mentioned current-limiting circuit includes R1, R2, R3, R4, the R5 of current-limiting resistance, the LED matrix circuit includes LED 1-LED20, and wherein the two-way incidence matrix formula of LED 1-LED20 is connected with I/O interface P1, P2, P3, P4, the P5 of single-chip microprocessor MCU by current-limiting resistance R1, R2, R3, R4, R5 respectively after connecting.
In the present embodiment, above-mentioned single-chip microprocessor MCU adopts the mode driven for emitting lights diode of timesharing scanning.The whole scan period of above-mentioned single-chip microprocessor MCU, frequency was greater than 50Hz smaller or equal to 20ms.
Operation principle of the present utility model is as follows: with reference to Fig. 2, driving 5*4=20 LED with 5 I/O is example, single-chip microprocessor MCU adopts the mode driven for emitting lights diode of timesharing scanning by software processes, the whole scan period must be smaller or equal to 20ms, frequency is greater than 50Hz, to guarantee the stable of display effect, the whole scan period is interior every 1ms, whether take turns each LED lamp of continuous query successively needs to light, for example LED1 need light, then as long as add forward voltage (lighting duration 1ms) at the LED1 two ends by I/O mouth output high-low level, i.e. P2 mouth output 1, P1 mouth output 0, other three I/O mouths all are made as input state.It also is like this that other LED lamp is handled.