CN110708787A - Control device and method of double-color lamp, storage medium and equipment - Google Patents
Control device and method of double-color lamp, storage medium and equipment Download PDFInfo
- Publication number
- CN110708787A CN110708787A CN201910891314.8A CN201910891314A CN110708787A CN 110708787 A CN110708787 A CN 110708787A CN 201910891314 A CN201910891314 A CN 201910891314A CN 110708787 A CN110708787 A CN 110708787A
- Authority
- CN
- China
- Prior art keywords
- signal
- color
- frequency
- led
- double
- 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
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02B—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
- Y02B20/00—Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
- Y02B20/40—Control techniques providing energy savings, e.g. smart controller or presence detection
Landscapes
- Circuit Arrangement For Electric Light Sources In General (AREA)
Abstract
The embodiment of the application provides a control device and a method of a bicolor lamp, a storage medium and equipment, wherein the device comprises: the control device and the double-pin double-color lamp connected with the control device; the control device is used for receiving a clock signal from the outside; performing frequency division processing on the clock signal to obtain a first frequency division signal, a second frequency division signal and a base frequency signal; generating a control signal based on at least the first frequency-divided signal, the second frequency-divided signal and the base frequency signal; and sending a control signal to the double-color lamp with the double pins, and controlling the double-color lamp with the double pins to display the first color and the second color in turn at a preset flashing frequency so as to realize mixing of a third color, wherein the third color is different from the first color and the second color. So, can realize that the double-colored lamp of two pins of control demonstrates with first colour and the all different third colour of second colour to, realize richening the control effect of the double-colored lamp of two pins, improve the application effect of the double-colored lamp of two pins.
Description
Technical Field
The present disclosure relates to the field of computer device manufacturing, and in particular, to a device and a method for controlling a two-color lamp, a storage medium, and a device.
Background
In the field of computer device manufacturing, such as in the design of a motherboard of a server or a memory, a dual color lamp packaged as a dual pin is often used as a debugging lamp, or a dual color lamp packaged as a dual pin is often applied to a power key.
However, since the dual-pin dual-color lamp has only two pins, the dual-pin dual-color lamp can only display one color at the same time, and therefore, only one color can be controlled in the design of the main board of the server or the memory. For example, taking the application of a dual-pin dual-color lamp to a power key as an example, it can only be realized to represent different states by two colors, such as a first color for representing power on and a second color for representing power abnormality.
Therefore, the problem that a third color different from the first color and the second color cannot be generated when the double-pin double-color lamp is controlled at present is solved, so that the control effect of the double-pin double-color lamp is single, and the application effect is poor.
Disclosure of Invention
In view of this, embodiments of the present application provide a control device and method for a dual-color lamp, a storage medium, and a device, in which a dual-color lamp with two pins is controlled to alternately display a first color and a second color at a preset flicker frequency, and a third color different from the first color and the second color can be displayed by controlling the dual-color lamp with two pins according to a persistence of vision phenomenon, so that a control effect of the dual-color lamp with two pins can be enriched, and an application effect of the dual-color lamp with two pins can be improved.
The embodiment of the application mainly provides the following technical scheme:
in a first aspect, an embodiment of the present application provides a control apparatus for a two-color lamp, the apparatus includes: the double-color lamp comprises a control device and a double-pin double-color lamp connected with the control device; wherein,
the dual-pin dual-color lamp comprises: a first LED (Light Emitting Diode) capable of displaying a first color when lit and a second LED capable of displaying a second color different from the first color when lit, the first LED and the second LED not being lit at the same time;
the control device is used for receiving a clock signal from the outside; performing frequency division processing on the clock signal to obtain a first frequency division signal, a second frequency division signal and a base frequency signal; generating a control signal based on at least the first frequency divided signal, the second frequency divided signal and the fundamental frequency signal; and sending the control signal to the double-color lamp with the double pins, and controlling the double-color lamp with the double pins to alternately display the first color and the second color at a preset flashing frequency so as to realize mixing of a third color, wherein the third color is different from the first color and the second color.
In a second aspect, an embodiment of the present application provides a control method for a dual-color lamp, which is applied to a control device for a dual-color lamp, where the device includes: a control device and a dual-pin bi-color lamp connected to the control device, the dual-pin bi-color lamp comprising: a first LED capable of displaying a first color when illuminated, and a second LED capable of displaying a second color different from the first color when illuminated, the first LED and the second LED not being simultaneously illuminated;
the method comprises the following steps: receiving a clock signal from the outside; performing frequency division processing on the clock signal to obtain a first frequency division signal, a second frequency division signal and a base frequency signal; generating a control signal based on at least the first frequency divided signal, the second frequency divided signal and the fundamental frequency signal; and sending the control signal to the double-color lamp with the double pins, and controlling the double-color lamp with the double pins to alternately display the first color and the second color at a preset flashing frequency so as to realize mixing of a third color, wherein the third color is different from the first color and the second color.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, where the storage medium includes a stored program, where when the program runs, the computer device on which the storage medium is located is controlled to execute the steps of the above-mentioned control method for a two-color lamp.
In a fourth aspect, an embodiment of the present application provides a computer device, where the computer device includes: at least one processor; and at least one memory, bus connected with the processor; the processor and the memory complete mutual communication through the bus; the processor is used for calling the program instructions in the memory so as to execute the steps of the control method of the bicolor lamp.
The control device and method, storage medium and device for a two-color lamp provided by the embodiment of the application, the control device for a two-color lamp comprises: the double-colored lamp of double-pin that controlling means and be connected with controlling means, wherein, the double-colored lamp of double-pin includes: the LED display device comprises a first LED and a second LED, wherein the first LED can display a first color when being lightened, the second LED can display a second color different from the first color when being lightened, and the first LED and the second LED cannot be lightened simultaneously; a control device for receiving a clock signal from the outside; performing frequency division processing on the clock signal to obtain a first frequency division signal, a second frequency division signal and a base frequency signal; generating a control signal based on at least the first frequency-divided signal, the second frequency-divided signal and the base frequency signal; and sending a control signal to the double-color lamp with the double pins, and controlling the double-color lamp with the double pins to display the first color and the second color in turn at a preset flashing frequency so as to realize mixing of a third color, wherein the third color is different from the first color and the second color. Like this, through the double-colored lamp of control double pin with predetermineeing flicker frequency and show first colour and second colour in turn, according to the persistence of vision phenomenon, just can realize the double-colored lamp of control double pin and produce the effect of mixing light, produce the third colour different with first colour and second colour promptly to, the control effect of the double-colored lamp of double pin can be richened, the effect of application of the double-colored lamp of double pin is improved.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. Other advantages of the application may be realized and attained by the instrumentalities and combinations particularly pointed out in the specification, claims, and drawings.
Drawings
The accompanying drawings are included to provide an understanding of the present disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the examples serve to explain the principles of the disclosure and not to limit the disclosure.
Fig. 1 is a schematic structural diagram of a control device of a bicolor lamp in an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a method for controlling a bi-color lamp according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a control device in an embodiment of the present application;
FIG. 4 is a waveform diagram of a control signal according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a computer device in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The embodiment of the application provides a control device of a bicolor lamp. Fig. 1 is a schematic structural diagram of a control device of a two-color lamp in an embodiment of the present application, and referring to fig. 1, the control device of the two-color lamp may include: a control device 101 and a two-leg two-color lamp 102 connected to the control device 101; wherein,
the dual pin, two color lamp 102 includes: a first LED 1021 and a second LED 1022, the first LED 1021 being capable of displaying a first color when lit, the second LED 1022 being capable of displaying a second color different from the first color when lit, and the first LED 1021 and the second LED 1022 being incapable of being lit at the same time;
a control device 101 for receiving a clock signal from the outside; performing frequency division processing on the clock signal to obtain a first frequency division signal, a second frequency division signal and a base frequency signal; generating a control signal based on at least the first frequency-divided signal, the second frequency-divided signal and the base frequency signal; and sending a control signal to the dual-pin dual-color lamp 102, and controlling the dual-color lamp 102 to alternately display the first color and the second color at a preset flashing frequency so as to realize mixing of a third color, wherein the third color is different from the first color and the second color.
Here, the clock signal may be a signal generated from an external signal source, such as a crystal oscillator.
Here, the control signal is used to control the dual-color lamp of the dual-pin to alternately display the first color and the second color at a preset flashing frequency. The control signal is a signal with a preset flicker frequency.
In practical applications, still referring to FIG. 1, a dual pin, dual color lamp 102 may comprise: the first pin and the second pin, then, two GPIO (General Purpose Input/Output) pins of the control device 101 need to be used to connect the control device 101 and the two-pin two-color lamp 102, so that the first GPIO pin of the control device 101 can be connected to the first pin of the two-pin two-color lamp 102, and the second GPIO pin of the control device can be connected to the second pin of the two-pin two-color lamp 102.
In practical application, in the process that the LED in the double-color lamp of the double-pin is controlled by the control device to light, if the control device controls the first GPIO pin to output a high-level electric signal and controls the second GPIO pin to output a low-level electric signal at the same time, the first LED can be lightened, the double-color lamp of the double-pin displays a first color, and if the control device controls the first GPIO pin to output a low-level electric signal and controls the second GPIO pin to output a high-level electric signal at the same time, the second LED can be lightened, and the double-color lamp of the double-pin displays a second color. Then, in order to realize lighting the first LED and the second LED in a light mixing manner, the first GPIO pin may output a high-level electrical signal and the second GPIO pin may output a low-level electrical signal at the same time at a proper preset frequency, and the first GPIO pin may output a low-level electrical signal and the second GPIO pin may output a high-level electrical signal at the same time, so that the first LED and the second LED may be lighted in turn based on the preset frequency, that is, the dual-color lamps of the dual pins may display the first color and the second color in turn, thereby achieving a light mixing effect, that is, based on a persistence of vision, the user may see a third color generated after the first color and the second color are mixed.
In a specific implementation, the control signal may include: and the first GPIO signal and the second GPIO signal accord with the preset flicker frequency, wherein the first GIPO signal and the second GPIO signal have different levels.
Further, the control device may be specifically configured to send the first GPIO signal to the first pin through the first GPIO pin and send the second GPIO signal to the second pin through the second GPIO pin, so that the dual-color lamp with the dual pins alternately displays the first color and the second color at a preset flicker frequency, and a third color different from the first color and the second color is mixed according to a persistence of vision phenomenon. Therefore, the double-pin double-color lamp can generate more than two colors by only using the two GPIO pins of the control device, and the control effect of the double-pin double-color lamp can be improved. Therefore, when the control device of the double-color lamp is applied to practical application, different colors can be displayed by controlling the double-color lamp of the double pins to indicate different information to a user, and the user can distinguish the difference easily due to the different colors, so that the user can achieve more efficient judgment, and the application effect of the double-color lamp of the double pins can be improved.
For example, if the control device of the two-color lamp is applied to the field of a debugging lamp, a power button, and other server fields, it is possible to indicate different types of information with different colors, for example, in the field of the debugging lamp, a native first color may represent a power abnormality, a light-mixed third color may represent a power-on/power-off state, and a native second color may represent a Port 80 of a PCH (Platform path Controller ); in the field of power keys, a native first color may represent that a server power is turned on/off, a third color of mixed light represents that a power is abnormal, and a native second color represents that a BMC (Baseboard Management Controller) is abnormal. Therefore, the user can more intuitively and clearly know what kind of information the two-color lamp is currently representing.
In practical applications, the control Device may be implemented by an IC (Integrated Circuit) chip having a control function, such as a BMC (baseboard management controller), a CPLD (Complex Programmable logic Device), an MCU (micro control Unit), an FPGA (Field Programmable Gate Array), a PCH (Integrated Circuit), and the like. Of course, other implementations are possible, and the embodiments of the present application are not limited in detail herein.
In practical applications, because two LEDs in a dual-pin dual-color lamp have differences in color, intensity, and the like, in order to achieve a better light mixing effect, the respective lighting weights of the two LEDs need to be adjusted, that is, the respective action times of the two LEDs need to be determined, and in one pulse period, an LED with a longer action time is brighter, and an LED with a shorter action time is darker. Thus, by assigning different operation times to the two LEDs, a different third color can be mixed based on the first color of different brightness and the second color of different brightness.
In other embodiments of the present application, in order to achieve a better light mixing effect, the above control device may be further specifically configured to: generating a first arbitration signal for controlling the action time of a first LED in the dual-pin dual-color lamp and a second arbitration signal for controlling the action time of a second LED in the dual-pin dual-color lamp based on the fundamental frequency signal; acquiring mode selection information for indicating a preset flicker frequency; the control signal is generated based on the mode selection information, the first frequency divided signal, the second frequency divided signal, the first arbitration signal, and the second arbitration signal.
In practical applications, the mode selection information may be used to indicate the action mode of each LED, for example, one or more combinations of behaviors of constant on, constant off, flashing at 2Hz, flashing at 0.5Hz, and the like. The mode selection information may be set by a person skilled in the art according to actual needs, and the embodiments of the present application are not limited in detail herein.
In practical applications, the control device may be connected to an external storage device, such as a register, etc., and the mode selection information may be preset by the control device according to the requirements of practical applications. Thus, it is possible to realize the mode selection information stored in the external storage device. Next, when the behavior of the dual-pin two-color lamp needs to be controlled by the control device, the control device may read the mode selection information from the external memory device to generate a corresponding control signal based on the mode selection information, the frequency division signal, and the arbitration signal.
As an example, taking the control device to obtain the mode selection information from the temporary storage as an example, 2 bits (bits) can be used to represent the behaviors of the LED such as 2Hz blinking, 0.5Hz blinking, constant on and constant off, and 6 bits can be used if the behaviors of three colors are to be represented. In this case, an 8-bit temporary storage can be used to store the 6-bit information.
Further for example, if the control device is a BMC, the register may be set by the BMC through an I2C (Inter-Integrated Circuit) bus; if the control device is a PCH, the register can be set by the PCH through an LPC (Low Pin Count) bus or an eSPI (Serial Peripheral Interface) bus. The specific implementation manner in the practical application depends on the actual hardware condition and the user requirement, and can be set by a person skilled in the art according to the practical application situation, and the embodiment of the present application is not specifically limited herein.
In a specific implementation process, in order to generate a control signal for controlling a dual-color lamp with dual pins to alternately display a first color and a second color at a preset flashing frequency, the control device may further specifically be configured to: generating a driving signal according with a preset flicker frequency based on the mode selection information, the first frequency-dividing signal and the second frequency-dividing signal; the control signal is generated based on the drive signal, the first arbitration signal, and the second arbitration signal.
In practical applications, the frequency of the first frequency-dividing signal is related to the frequency of the flashing behavior of one LED, and the frequency of the second frequency-dividing signal is related to the frequency of the flashing behavior of another LED.
In a specific implementation process, in order to generate an arbitration signal for controlling the actuation time of the first LED and the second LED, the control device may further include: counting based on the fundamental frequency signal to obtain a count value; allocating the action time of the first LED and the action time of the second LED according to the count value; a first arbitration signal is generated based on an action time of a first LED, and a second arbitration signal is generated based on an action time of a second LED.
As can be seen from the above, the control device for a dual-color lamp provided in the embodiment of the present application, after receiving a clock signal from the outside, may perform frequency division processing on the clock signal to obtain a first frequency division signal, a second frequency division signal, and a fundamental frequency signal; and then, generating a control signal based on the first frequency-removing signal, the second frequency-removing signal and the fundamental frequency signal, finally, sending the control signal to the double-pin double-color lamp, and controlling the double-pin double-color lamp to alternately display the first color and the second color at a preset flashing frequency so as to realize mixing of a third color, wherein the third color is different from the first color and the second color. Like this, through the control device based on the control signal that clock signal after the frequency cut generated, control the double-colored lamp of double-pin and show first colour and second colour in turn with predetermineeing flicker frequency, according to the persistence of vision phenomenon, just can realize controlling the double-colored lamp of double-pin and produce the effect of mixing light, produce the third colour different with first colour and second colour promptly, thereby, can enrich the control effect of the double-colored lamp of double-pin, improve the application effect of the double-colored lamp of double-pin.
Based on the same inventive concept, the embodiment of the application provides a control method of a bicolor lamp. In practical applications, the control method of the dual-color lamp can be applied to the control device of the dual-color lamp in one or more of the above embodiments, and the control device of the dual-pin dual-color lamp includes: the double-colored lamp of double-barrelled foot includes with the double-colored lamp of double-barrelled foot that controlling means and be connected with controlling means: the LED display device comprises a first LED and a second LED, wherein the first LED can display a first color when being lightened, the second LED can display a second color different from the first color when being lightened, and the first LED and the second LED can not be lightened simultaneously.
Fig. 2 is a schematic flow chart of a control method of a bi-color lamp in an embodiment of the present application, and referring to fig. 2, the control method of the bi-color lamp may include:
s201: the control device receives a clock signal from the outside;
here, the clock signal may be a signal generated from an external signal source, such as a crystal oscillator.
S202: the control device carries out frequency removal processing on the clock signal to obtain a first frequency removal signal, a second frequency removal signal and a base frequency signal;
s203: the control device generates a control signal at least based on the first frequency-dividing signal, the second frequency-dividing signal and the base frequency signal;
here, the control signal is used to control the dual-color lamp of the dual-pin to alternately display the first color and the second color at a preset flashing frequency. The control signal is a signal with a preset flicker frequency.
In practical applications, because two LEDs in a dual-pin dual-color lamp have differences in color, intensity, and the like, in order to achieve a better light mixing effect, the respective lighting weights of the two LEDs need to be adjusted, that is, the respective action times of the two LEDs need to be determined, and in one pulse period, an LED with a longer action time is brighter, and an LED with a shorter action time is darker. Thus, by assigning different operation times to the two LEDs, a different third color can be mixed based on the first color of different brightness and the second color of different brightness.
Then, in order to achieve a better light mixing effect, in other embodiments of the present application, the step S203 may include the following steps 2031 to 2033:
step 2031: the control device generates a first arbitration signal for controlling the action time of a first LED in the dual-pin dual-color lamp and a second arbitration signal for controlling the action time of a second LED in the dual-pin dual-color lamp based on the fundamental frequency signal;
here, the operation time of the first LED and the operation time of the second LED may be the same or different, as required. The method can be set by a person skilled in the art according to the actual application, and the embodiments of the present application are not limited in detail.
Step 2032: the control device acquires mode selection information for indicating a preset flicker frequency;
in practical applications, the mode selection information may be used to indicate the behavior mode of the LED, for example, the mode selection information may be one or more combinations of behaviors of constant on, constant off, flashing at 2Hz, flashing at 0.5Hz, and the like. Then, when the dual-color lamp with the dual pins needs to be controlled by the control device to mix other colors, the control device can acquire the mode selection information for indicating the preset flashing frequency.
In practical applications, the control device may be connected to an external storage device, such as a register, etc., and the mode selection information may be preset by the control device according to the requirements of practical applications. Thus, it is possible to realize the mode selection information stored in the external storage device. Next, when the behavior of the dual-pin two-color lamp needs to be controlled by the control device, the control device may read the mode selection information from the external memory device to generate a corresponding control signal based on the mode selection information, the frequency division signal, and the arbitration signal.
As an example, taking the control device to obtain the mode selection information from the temporary storage as an example, 2 bits can be used to represent the behaviors of the LED such as 2Hz blinking, 0.5Hz blinking, constant on and off, and 6 bits can be used if the behaviors of three colors are to be represented. In this case, an 8-bit temporary storage can be used to store the 6-bit information.
Further for example, if the control device is a BMC, the register may be set by the BMC via the I2C bus; if the control device is a PCH, the register can be set by the PCH through the LPC bus or the eSPI bus. The specific implementation manner in the practical application depends on the actual hardware condition and the user requirement, and can be set by a person skilled in the art according to the practical application situation, and the embodiment of the present application is not specifically limited herein.
Step 2033: the control device generates a control signal based on the mode selection information, the first frequency-divided signal, the second frequency-divided signal, the first arbitration signal, and the second arbitration signal.
As an example, in order to generate the arbitration signal for controlling the action time of the first LED and the second LED, in a specific implementation, the step 2031 may include the following steps 2031a to 2031 c:
step 2031 a: the control device counts based on the fundamental frequency signal to obtain a count value;
step 2031 b: the control device distributes the action time of the first LED and the action time of the second LED according to the count value;
step 2031 c: the control device generates a first arbitration signal based on an action time of the first LED and a second arbitration signal based on an action time of the second LED.
As an example, in order to generate a control signal for controlling a dual-color lamp with dual pins to alternately display a first color and a second color at a preset flashing frequency, in a specific implementation, the step 2033 may include the following steps 2033a to 2033 b:
step 2033 a: the control device generates a driving signal which accords with a preset flicker frequency based on the mode selection information, the first frequency eliminating signal and the second frequency eliminating signal;
in practical applications, the frequency of the first frequency-dividing signal is related to the frequency of the flashing behavior of one LED, and the frequency of the second frequency-dividing signal is related to the frequency of the flashing behavior of another LED.
Step 2033 b: the control device generates a control signal based on the drive signal, the first arbitration signal, and the second arbitration signal.
S204: the control device sends a control signal to the double-pin double-color lamp, and the double-pin double-color lamp is controlled to alternately display the first color and the second color at a preset flashing frequency so as to realize mixing of the third color.
Wherein the third color is different from both the first color and the second color.
Thus, the process of controlling the dual-pin dual-color lamp is completed.
As can be seen from the above, in the control method of the dual-color lamp provided in the embodiment of the present application, after the control device receives the clock signal from the outside, the clock signal may be subjected to frequency division processing to obtain the first frequency division signal, the second frequency division signal, and the fundamental frequency signal; and then, generating a control signal based on the first frequency-removing signal, the second frequency-removing signal and the fundamental frequency signal, finally, sending the control signal to the double-pin double-color lamp, and controlling the double-pin double-color lamp to alternately display the first color and the second color at a preset flashing frequency so as to realize mixing of a third color, wherein the third color is different from the first color and the second color. Like this, through the control device based on the control signal that clock signal after the frequency cut generated, control the double-colored lamp of double-pin and show first colour and second colour in turn with predetermineeing flicker frequency, according to the persistence of vision phenomenon, just can realize controlling the double-colored lamp of double-pin and produce the effect of mixing light, produce the third colour different with first colour and second colour promptly, thereby, can enrich the control effect of the double-colored lamp of double-pin, improve the application effect of the double-colored lamp of double-pin.
Based on the same inventive concept, the embodiment of the application provides a control device. In practical applications, the control device may be applied to the control device of the two-color lamp in one or more of the above embodiments. The control device of the double-pin double-color lamp comprises: the double-colored lamp of double-barrelled foot includes with the double-colored lamp of double-barrelled foot that controlling means and be connected with controlling means: the LED display device comprises a first LED and a second LED, wherein the first LED can display a first color when being lightened, the second LED can display a second color different from the first color when being lightened, and the first LED and the second LED can not be lightened simultaneously.
Fig. 3 is a schematic structural diagram of a control device in an embodiment of the present application, and referring to fig. 3, the control device 30 may include: a frequency dividing module 301, a counting module 302, an arbitration module 303, an LED behavior control module 304 and an LED driving module 305; wherein the control device 30 is connected with the double-pin two-color lamp 306 through the LED driving module 305.
A frequency dividing module 301, configured to receive a clock signal from the outside; performing frequency division processing on the clock signal to obtain a first frequency division signal, a second frequency division signal and a base frequency signal; sending the first frequency-divided signal and the second frequency-divided signal to the LED behavior control module 304, and sending the fundamental frequency signal to the counting module 302;
a counting module 302, configured to receive the baseband signal sent by the frequency dividing module 301; counting based on the fundamental frequency signal to obtain a count value; sending the count value to the arbitration module 303;
an arbitration module 303, configured to receive the count value sent by the counting module 302; generating a first arbitration signal for controlling an operation time of the first LED 306a in the dual-pin dual-color lamp 306 and a second arbitration signal for controlling an operation time of the second LED 306b in the dual-pin dual-color lamp based on the count value; sending the first arbitration signal and the second arbitration signal to the LED driver module 305;
the LED behavior control module 304 is configured to receive the first frequency-dividing signal and the second frequency-dividing signal sent by the frequency-dividing module 301; acquiring mode selection information for indicating a preset flicker frequency; generating a driving signal according with a preset flicker frequency based on the mode selection information, the first frequency-dividing signal and the second frequency-dividing signal; sending a drive signal to the LED driver module 305;
in practical applications, the mode selection information may be used to indicate the behavior mode of the LED, for example, the mode selection information may be one or more combinations of behaviors of constant on, constant off, flashing at 2Hz, flashing at 0.5Hz, and the like. Then, when the dual-color lamp with the dual pins needs to be controlled by the control device to mix other colors, the control device can acquire the mode selection information for indicating the preset flashing frequency.
In practical applications, the control device may be connected to an external storage device, such as a register, etc., and the mode selection information may be preset by the control device according to the requirements of practical applications. By way of example, the behaviors of the LEDs such as 2Hz blinking, 0.5Hz blinking, constant on and off, etc. can be represented by 2 bits, respectively, and then 6 bits can be used if the behaviors of three colors are intended to be represented. In this case, an 8-bit temporary storage can be used to store the 6-bit information.
For example, taking the control device connected to an external register as an example, the LED behavior control module may obtain the required mode selection information from the register.
The LED driving module 305 is configured to receive the first arbitration signal and the second arbitration signal sent by the arbitration module 303; receiving a driving signal sent by the LED behavior control module 304; generating a control signal based on the driving signal, the first arbitration signal and the second arbitration signal; and sending a control signal to the dual-pin dual-color lamp 306, and controlling the dual-pin dual-color lamp 306 to alternately display the first color and the second color at a preset flashing frequency so as to realize mixing of a third color, wherein the third color is different from the first color and the second color.
In practical application, the double-leg double-color lamp is integrated with the first LED and the second LED, the first LED can display a first color when being lightened, the second LED can display a second color different from the first color when being lightened, and the first LED and the second LED cannot be lightened simultaneously.
In the embodiment of the present application, the arbitration module is specifically configured to allocate an action time of the first LED and an action time of the second LED according to the count value; a first arbitration signal is generated based on an action time of a first LED, and a second arbitration signal is generated based on an action time of a second LED.
For example, for a dual-pin dual-color lamp integrated with a green LED and an amber LED, assuming that the clock signal is a clock signal with a frequency of 25Mhz generated by an external crystal oscillator, then after the frequency-dividing module receives the clock signal with a frequency of 25Mhz from the external crystal oscillator, three signals with frequencies of 2Hz, 0.5Hz, and 1KHz can be obtained, and then the signal with 2Hz can be used as a first frequency-dividing signal to be sent to the LED behavior control module, the signal with 0.5Hz can be used as a second frequency-dividing signal to be sent to the LED behavior control module, and the signal with 1KHz can be used as a fundamental frequency signal to be sent to the counting module, that is, 2Hz and 0.5Hz are frequencies of the LED blinking behavior. Thus, the control signal of the waveform pattern shown in fig. 4 can be generated based on the signals of three frequencies of 2Hz, 0.5Hz and 1KHz, and the control signal is sent to the double-pin double-color lamp, so that the amber LED can be independently lightened, the green LED can be independently lightened, and the amber LED and the green LED can be alternately lightened at a preset flashing frequency.
In practical applications, the frequency dividing module, the counting module, the arbitration module, the LED behavior control module and the LED driving module may be implemented by an IC chip having a control function, such as BMC, CPLD, MCU, FPGA, PCH, etc. Of course, other implementations are possible, and the embodiments of the present application are not limited in detail herein.
As can be seen from the above, an embodiment of the present application provides a control device, including: the LED driving module comprises a frequency eliminating module, a counting module, an arbitration module, an LED behavior control module and an LED driving module, wherein after the frequency eliminating module receives a clock signal from the outside, the frequency eliminating module can eliminate the frequency of the clock signal to obtain a first frequency eliminating signal, a second frequency eliminating signal and a base frequency signal, and sends the first frequency eliminating signal and the second frequency eliminating signal to the LED behavior control module and sends the base frequency signal to the counting module; then, after receiving the fundamental frequency signal sent by the frequency-dividing module, the counting module can count based on the fundamental frequency signal to obtain a count value, and send the count value to the arbitration module; after receiving the count value sent by the counting module, the arbitration module may generate a first arbitration signal for controlling an action time of a first LED in the dual-pin dual-color lamp and a second arbitration signal for controlling an action time of a second LED in the dual-pin dual-color lamp based on the count value, and send the first arbitration signal and the second arbitration signal to the LED driving module; after receiving the first frequency-dividing signal and the second frequency-dividing signal sent by the frequency-dividing module and receiving mode selection information from the outside and used for indicating a preset flicker frequency, the LED behavior control module can generate a driving signal conforming to the preset flicker frequency based on the mode selection information, the first frequency-dividing signal and the second frequency-dividing signal and send the driving signal to the LED driving module; and finally, after receiving the first arbitration signal and the second arbitration signal sent by the arbitration module and the driving signal sent by the LED behavior control module, the LED driving module can generate a control signal based on the driving signal, the first arbitration signal and the second arbitration signal, and send the control signal to the double-color lamp with double pins, and the double-color lamp with double pins is controlled to alternately display the first color and the second color at a preset flicker frequency so as to realize mixing of a third color, wherein the third color is different from the first color and the second color. In this way, the control device is used for scanning and controlling the double-color lamp, and the double-color lamp with the double pins is controlled to alternately display the first color and the second color at the preset flicker frequency. Therefore, according to the phenomenon of visual persistence, the effect of controlling the double-color lamp with double pins to generate mixed light can be realized, namely, a third color different from the first color and the second color is generated, and then the control effect of the double-color lamp with double pins can be enriched, and the application effect of the double-color lamp with double pins is improved.
Based on the same inventive concept, the embodiment of the application provides computer equipment. Fig. 5 is a schematic structural diagram of a computer device in an embodiment of the present application, and referring to fig. 5, the computer device 50 includes: at least one processor 51; and at least one memory 52, a bus 53 connected to the processor 51; wherein, the processor 51 and the memory 52 complete the communication with each other through the bus 53; the processor 51 is adapted to call program instructions in the memory 52 to perform the steps of the method for controlling a bi-color lamp in one or more of the embodiments described above.
Accordingly, based on the same inventive concept, embodiments of the present application further provide a processor, where the processor is configured to execute a program, where the program executes the steps of the method for controlling a bi-color lamp in one or more embodiments described above.
The Processor may be implemented by a Central Processing Unit (CPU), a MicroProcessor Unit (MPU), a Digital Signal Processor (DSP), an FPGA, or the like. The Memory may include volatile Memory in a computer readable medium, Random Access Memory (RAM), and/or nonvolatile Memory such as Read Only Memory (ROM) or Flash Memory (Flash RAM), and the Memory includes at least one Memory chip.
It should be noted that, in the embodiments of the present application, if the control method of the two-color lamp in one or more of the above embodiments is implemented in the form of a software functional module, and is sold or used as a stand-alone product, it may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof that contribute to the prior art may be embodied in the form of a software product stored in a storage medium, and including several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods of the embodiments of the present application.
Accordingly, based on the same inventive concept, embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, the computer device in which the storage medium is controlled to execute the steps of the method for controlling a bi-color lamp in one or more embodiments described above.
Here, it should be noted that: the above description of the apparatus, computer device or computer-readable storage medium embodiments is similar to the description of the method embodiments above, with similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus, the computer device or the computer-readable storage medium of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
The present application describes embodiments, but the description is illustrative rather than limiting and it will be apparent to those of ordinary skill in the art that many more embodiments and implementations are possible within the scope of the embodiments described herein. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are possible. Any feature or element of any embodiment may be used in combination with or instead of any other feature or element in any other embodiment, unless expressly limited otherwise.
The present application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements disclosed in this application may also be combined with any conventional features or elements to form a unique inventive concept as defined by the claims. Any feature or element of any embodiment may also be combined with features or elements from other inventive aspects to form yet another unique inventive aspect, as defined by the claims. Thus, it should be understood that any of the features shown and/or discussed in this application may be implemented alone or in any suitable combination. Accordingly, the embodiments are not limited except as by the appended claims and their equivalents. Furthermore, various modifications and changes may be made within the scope of the appended claims.
Further, in describing representative embodiments, the specification may have presented the method and/or process as a particular sequence of steps. However, to the extent that the method or process does not rely on the particular order of steps set forth herein, the method or process should not be limited to the particular sequence of steps described. Other orders of steps are possible as will be understood by those of ordinary skill in the art. Therefore, the particular order of the steps set forth in the specification should not be construed as limitations on the claims. Further, the claims directed to the method and/or process should not be limited to the performance of their steps in the order written, and one skilled in the art can readily appreciate that the sequences may be varied and still remain within the spirit and scope of the embodiments of the present application.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
Claims (10)
1. A control device for a bi-color lamp, said device comprising: the double-color lamp comprises a control device and a double-pin double-color lamp connected with the control device; wherein,
the dual-pin dual-color lamp comprises: a first LED capable of displaying a first color when illuminated, and a second LED capable of displaying a second color different from the first color when illuminated, and the first LED and the second LED are not simultaneously illuminated;
the control device is used for receiving a clock signal from the outside; performing frequency division processing on the clock signal to obtain a first frequency division signal, a second frequency division signal and a base frequency signal; generating a control signal based on at least the first frequency divided signal, the second frequency divided signal and the fundamental frequency signal; and sending the control signal to the double-color lamp with the double pins, and controlling the double-color lamp with the double pins to alternately display the first color and the second color at a preset flashing frequency so as to realize mixing of a third color, wherein the third color is different from the first color and the second color.
2. The apparatus of claim 1, wherein the control device is configured to generate a first arbitration signal for controlling an actuation time of a first LED in the dual-pin dual-color lamp and a second arbitration signal for controlling an actuation time of a second LED in the dual-pin dual-color lamp based on the fundamental frequency signal;
acquiring mode selection information for indicating the preset flicker frequency;
generating the control signal based on the mode selection information, the first frequency divided signal, the second frequency divided signal, the first arbitration signal, and the second arbitration signal.
3. The apparatus according to claim 2, wherein the control device is configured to generate a driving signal conforming to the preset flicker frequency based on the mode selection information, the first frequency-divided signal and the second frequency-divided signal; generating the control signal based on the drive signal, the first arbitration signal, and the second arbitration signal.
4. The apparatus according to claim 2 or 3, wherein the control device is configured to count based on the fundamental frequency signal to obtain a count value; distributing the action time of the first LED and the action time of the second LED according to the counting value; the first arbitration signal is generated based on an action time of the first LED and the second arbitration signal is generated based on an action time of the second LED.
5. A method of controlling a bi-color lamp, the method being applied to a device for controlling a bi-color lamp, the device comprising: a control device and a dual-pin bi-color lamp connected to the control device, the dual-pin bi-color lamp comprising: a first LED capable of displaying a first color when illuminated, and a second LED capable of displaying a second color different from the first color when illuminated, and the first LED and the second LED are not simultaneously illuminated;
the method comprises the following steps:
receiving a clock signal from the outside;
performing frequency division processing on the clock signal to obtain a first frequency division signal, a second frequency division signal and a base frequency signal;
generating a control signal based on at least the first frequency divided signal, the second frequency divided signal and the fundamental frequency signal;
and sending the control signal to the double-color lamp with the double pins, and controlling the double-color lamp with the double pins to alternately display the first color and the second color at a preset flashing frequency so as to realize mixing of a third color, wherein the third color is different from the first color and the second color.
6. The method of claim 5, wherein generating a control signal based on at least the first divided signal, the second divided signal, and the baseband signal comprises:
generating a first arbitration signal for controlling an action time of a first LED in the dual-pin dual-color lamp and a second arbitration signal for controlling an action time of a second LED in the dual-pin dual-color lamp based on the fundamental frequency signal;
acquiring mode selection information for indicating the preset flicker frequency;
generating the control signal based on the mode selection information, the first frequency divided signal, the second frequency divided signal, the first arbitration signal, and the second arbitration signal.
7. The method of claim 6, wherein generating the control signal based on the mode selection information, the first frequency divided signal, the second frequency divided signal, the first arbitration signal, and the second arbitration signal comprises:
generating a driving signal conforming to the preset flicker frequency based on the mode selection information, the first frequency-divided signal and the second frequency-divided signal;
generating the control signal based on the drive signal, the first arbitration signal, and the second arbitration signal.
8. The method of claim 6 or 7, wherein generating a first arbitration signal for controlling an actuation time of a first LED in the dual pin dual color lamp and a second arbitration signal for controlling an actuation time of a second LED in the dual pin dual color lamp based on the fundamental frequency signal comprises:
counting based on the fundamental frequency signal to obtain a counting value;
distributing the action time of the first LED and the action time of the second LED according to the counting value;
the first arbitration signal is generated based on an action time of the first LED and the second arbitration signal is generated based on an action time of the second LED.
9. A computer-readable storage medium, characterized in that the storage medium comprises a stored program, wherein the steps of the method for controlling a computer device on which the storage medium is located are controlled to perform according to any of claims 5 to 8 when the program is run.
10. A computer device, characterized in that the computer device comprises:
at least one processor;
and at least one memory, bus connected with the processor;
the processor and the memory complete mutual communication through the bus; the processor is adapted to invoke program instructions in the memory to perform the steps of the method of controlling a bi-color lamp according to any one of claims 5 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910891314.8A CN110708787B (en) | 2019-09-20 | 2019-09-20 | A control device and method for a two-color lamp, storage medium and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910891314.8A CN110708787B (en) | 2019-09-20 | 2019-09-20 | A control device and method for a two-color lamp, storage medium and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110708787A true CN110708787A (en) | 2020-01-17 |
CN110708787B CN110708787B (en) | 2022-06-07 |
Family
ID=69195867
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910891314.8A Active CN110708787B (en) | 2019-09-20 | 2019-09-20 | A control device and method for a two-color lamp, storage medium and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110708787B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030178950A1 (en) * | 2002-03-25 | 2003-09-25 | Chih-Yuan Hsu | Circuit for intermittently illuminating light-emitting device |
US20070166148A1 (en) * | 2006-01-13 | 2007-07-19 | Middleton Harold G | Temperature displaying fan |
CN101331800A (en) * | 2005-12-23 | 2008-12-24 | 香港应用科技研究院有限公司 | light emitting device |
CN101562934A (en) * | 2009-05-13 | 2009-10-21 | 华为技术有限公司 | Method and system for displaying third color by dual-color indicator lamp |
TW201201621A (en) * | 2010-06-23 | 2012-01-01 | Solytech Entpr Coropration | Power supply device of LED lamp |
CN102307413A (en) * | 2011-06-07 | 2012-01-04 | 青岛海信宽带多媒体技术有限公司 | Method and device for displaying any color by using RGB (Red, Green and Blue) three-color indicating lamps |
CN102316635A (en) * | 2011-06-29 | 2012-01-11 | 冠捷显示科技(厦门)有限公司 | Method and system for displaying various operating states by bicolor indicating lamp |
CN202931622U (en) * | 2012-11-01 | 2013-05-08 | 西安华科光电有限公司 | Indicating lamp for controlling two-color light-emitting diodes by two wires |
CN203340343U (en) * | 2013-04-24 | 2013-12-11 | 建荣集成电路科技(珠海)有限公司 | Double-color LED drive circuit |
TWM476436U (en) * | 2010-06-23 | 2014-04-11 | Solytech Entpr Corporation | Power supply device of LED lamp |
-
2019
- 2019-09-20 CN CN201910891314.8A patent/CN110708787B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030178950A1 (en) * | 2002-03-25 | 2003-09-25 | Chih-Yuan Hsu | Circuit for intermittently illuminating light-emitting device |
CN101331800A (en) * | 2005-12-23 | 2008-12-24 | 香港应用科技研究院有限公司 | light emitting device |
US20070166148A1 (en) * | 2006-01-13 | 2007-07-19 | Middleton Harold G | Temperature displaying fan |
CN101562934A (en) * | 2009-05-13 | 2009-10-21 | 华为技术有限公司 | Method and system for displaying third color by dual-color indicator lamp |
TW201201621A (en) * | 2010-06-23 | 2012-01-01 | Solytech Entpr Coropration | Power supply device of LED lamp |
TWM476436U (en) * | 2010-06-23 | 2014-04-11 | Solytech Entpr Corporation | Power supply device of LED lamp |
CN102307413A (en) * | 2011-06-07 | 2012-01-04 | 青岛海信宽带多媒体技术有限公司 | Method and device for displaying any color by using RGB (Red, Green and Blue) three-color indicating lamps |
CN102316635A (en) * | 2011-06-29 | 2012-01-11 | 冠捷显示科技(厦门)有限公司 | Method and system for displaying various operating states by bicolor indicating lamp |
CN202931622U (en) * | 2012-11-01 | 2013-05-08 | 西安华科光电有限公司 | Indicating lamp for controlling two-color light-emitting diodes by two wires |
CN203340343U (en) * | 2013-04-24 | 2013-12-11 | 建荣集成电路科技(珠海)有限公司 | Double-color LED drive circuit |
Also Published As
Publication number | Publication date |
---|---|
CN110708787B (en) | 2022-06-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI441564B (en) | Method and device for driving an array of light sources | |
JP2008535208A (en) | Electronic device having light bus for light emission control | |
US7129654B2 (en) | Flashing light control apparatus and method thereof | |
US10952294B2 (en) | Driving method and driving apparatus for light emitting diodes in keyboard | |
US20170164444A1 (en) | Computing apparatus and led driver | |
CN110708787A (en) | Control device and method of double-color lamp, storage medium and equipment | |
CN110738199A (en) | display device and its driving method | |
CN102054465B (en) | Display driving circuit and display driving system | |
CN104754798B (en) | The brightness control method and device of key-press backlight | |
CN206003503U (en) | Memory module | |
CN110379376B (en) | A liquid crystal display for SSVEP and its stimulation pattern display method | |
US9293933B2 (en) | Charging indication apparatus and method thereof | |
CN107871478B (en) | Driving circuit and method of display module and display equipment | |
CN112805775B (en) | LCD display backlight control system | |
CN102054467B (en) | Display driving circuit and display driving system | |
US9078316B2 (en) | LED device with built-in fast self-test circuit | |
US20110109669A1 (en) | Display driving circuit and display driving system | |
CN101562934A (en) | Method and system for displaying third color by dual-color indicator lamp | |
US20180324912A1 (en) | Display device | |
CN107369414A (en) | A kind of control method, display screen and electronic equipment | |
CN219087348U (en) | Light source driving device and projection equipment | |
CN205082031U (en) | Light-emitting diode control system and drive circuit board | |
KR20130039141A (en) | Dimming data generating apparatus for a large-size led display | |
CN118379967A (en) | Brightness adjusting method and display device | |
JP2017207634A (en) | Electronic apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |