[go: up one dir, main page]

CN110708787B - A control device and method for a two-color lamp, storage medium and equipment - Google Patents

A control device and method for a two-color lamp, storage medium and equipment Download PDF

Info

Publication number
CN110708787B
CN110708787B CN201910891314.8A CN201910891314A CN110708787B CN 110708787 B CN110708787 B CN 110708787B CN 201910891314 A CN201910891314 A CN 201910891314A CN 110708787 B CN110708787 B CN 110708787B
Authority
CN
China
Prior art keywords
signal
color
led
frequency
pin
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.)
Active
Application number
CN201910891314.8A
Other languages
Chinese (zh)
Other versions
CN110708787A (en
Inventor
陈正川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201910891314.8A priority Critical patent/CN110708787B/en
Publication of CN110708787A publication Critical patent/CN110708787A/en
Application granted granted Critical
Publication of CN110708787B publication Critical patent/CN110708787B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

本申请实施例提供一种双色灯的控制装置及方法、存储介质和设备,所述装置包括:控制器件和与控制器件连接的双管脚的双色灯;其中,控制器件,用于接收来自外部的时钟信号;对时钟信号进行除频处理,获得第一除频信号、第二除频信号和基频信号;至少基于第一除频信号、第二除频信号和基频信号,生成控制信号;将控制信号发送给双管脚的双色灯,控制双管脚的双色灯以预设闪烁频率轮流显示第一颜色和第二颜色,以实现混合出第三颜色,其中,第三颜色与第一颜色和第二颜色均不相同。如此,能够实现控制双管脚的双色灯显示出与第一颜色和第二颜色均不相同的第三颜色,从而,实现丰富双管脚的双色灯的控制效果,提高双管脚的双色灯的应用效果。

Figure 201910891314

Embodiments of the present application provide a control device, method, storage medium, and device for a bi-color lamp, the device includes: a control device and a dual-pin bi-color lamp connected to the control device; wherein the control device is used to receive external the clock signal; perform frequency division processing on the clock signal to obtain a first frequency division signal, a second frequency division signal and a base frequency signal; generate a control signal based on at least the first frequency division signal, the second frequency division signal and the base frequency signal ; Send the control signal to the two-pin two-color lamp, and control the two-pin two-color lamp to display the first color and the second color in turn at the preset flashing frequency, so as to realize the mixing of the third color, wherein the third color and the first color are mixed. Neither the first color nor the second color is the same. In this way, it is possible to control the two-pin two-color lamp to display a third color that is different from the first color and the second color, thereby enriching the control effect of the two-pin two-color lamp and improving the two-pin two-color lamp. application effect.

Figure 201910891314

Description

一种双色灯的控制装置及方法、存储介质和设备A control device and method for a two-color lamp, storage medium and equipment

技术领域technical field

本申请涉及计算机设备制造领域,尤其涉及一种双色灯的控制装置及方法、存储介质和设备。The present application relates to the field of computer equipment manufacturing, and in particular, to a control device and method for a bi-color lamp, a storage medium and a device.

背景技术Background technique

在计算机设备制造领域,如在服务器或存储器的主板设计中,经常采用封装为双管脚的双色灯作为除错灯,或着经常将双管脚的双色灯应用到电源按键上。In the field of computer equipment manufacturing, for example, in the design of motherboards for servers or memory, two-pin dual-color lights are often used as debugging lights, or two-pin dual-color lights are often applied to power buttons.

但是,因为双管脚的双色灯只有两个管脚,导致在同一时间双管脚的双色灯仅能显示一种颜色,所以在服务器或存储器的主板设计中往往只能实现单颜色的控制。例如,以将双管脚的双色灯应用到电源按键上为例,仅能实现通过两种颜色来表示不同的状态,如以第一颜色表示电源启动,以第二颜色表示电源异常。However, because the two-pin two-color light has only two pins, the two-pin two-color light can only display one color at the same time, so in the motherboard design of the server or storage, only a single color can often be controlled. For example, taking a two-pin two-color light on the power button as an example, only two colors can be used to indicate different states, such as the first color to indicate power on, and the second color to indicate power failure.

可见,目前在控制双管脚的双色灯时存在无法产生与第一颜色和第二颜色不相同的第三颜色的问题,导致双管脚的双色灯的控制效果较单一,应用效果较差。It can be seen that there is a problem that a third color different from the first color and the second color cannot be generated when controlling a dual-pin dual-color lamp at present, resulting in a single control effect and poor application effect of the dual-pin dual-color lamp.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本申请实施例提供一种双色灯的控制装置及方法、存储介质和设备,通过控制双管脚的双色灯以预设闪烁频率轮流显示所述第一颜色和所述第二颜色,根据视觉暂留现象,能够实现控制双管脚的双色灯显示出与第一颜色和第二颜色均不相同的第三颜色,从而,能够丰富双管脚的双色灯的控制效果,提高双管脚的双色灯的应用效果。In view of this, embodiments of the present application provide a control device and method, a storage medium and a device for a two-color lamp, by controlling the two-pin two-color lamp to alternately display the first color and the second color at a preset flickering frequency , according to the visual persistence phenomenon, it can be realized that the two-pin two-color lamp can be controlled to display a third color that is different from the first color and the second color, thereby enriching the control effect of the two-pin two-color lamp and improving the dual The application effect of the two-color light of the pin.

本申请实施例主要提供如下技术方案:The embodiments of the present application mainly provide the following technical solutions:

第一方面,本申请实施例提供了一种双色灯的控制装置,所述装置包括:控制器件和与所述控制器件连接的双管脚的双色灯;其中,In a first aspect, an embodiment of the present application provides a control device for a bi-color lamp, the device comprising: a control device and a dual-pin bi-color lamp connected to the control device; wherein,

所述双管脚的双色灯,包括:第一LED(Light Emitting Diode,发光二极管)和第二LED,所述第一LED被点亮时能够显示第一颜色,所述第二LED被点亮时能够显示与所述第一颜色不同的第二颜色,且所述第一LED与所述第二LED不能同时被点亮;The two-pin two-color lamp includes: a first LED (Light Emitting Diode, light-emitting diode) and a second LED, the first LED can display a first color when lit, and the second LED is lit can display a second color different from the first color, and the first LED and the second LED cannot be lit at the same time;

所述控制器件,用于接收来自外部的时钟信号;对所述时钟信号进行除频处理,获得第一除频信号、第二除频信号和基频信号;至少基于所述第一除频信号、所述第二除频信号和所述基频信号,生成控制信号;将所述控制信号发送给所述双管脚的双色灯,控制所述双管脚的双色灯以预设闪烁频率轮流显示所述第一颜色和所述第二颜色,以实现混合出第三颜色,其中,所述第三颜色与所述第一颜色和所述第二颜色均不相同。The control device is used for receiving a clock signal from the outside; frequency division processing is performed on the clock signal to obtain a first frequency division signal, a second frequency division signal and a base frequency signal; at least based on the first frequency division signal , the second frequency division signal and the base frequency signal, to generate a control signal; send the control signal to the two-pin bi-color lamp, and control the two-pin bi-color lamp to alternate at a preset flickering frequency The first color and the second color are displayed to achieve a third color mixed, wherein the third color is different from the first color and the second color.

第二方面,本申请实施例提供了一种双色灯的控制方法,应用于双色灯的控制装置,所述装置包括:控制器件和与所述控制器件连接的双管脚的双色灯,所述双管脚的双色灯包括:第一LED和第二LED,所述第一LED被点亮时能够显示第一颜色,所述第二LED被点亮时能够显示与所述第一颜色不同的第二颜色,且所述第一LED与所述第二LED不能同时被点亮;In a second aspect, an embodiment of the present application provides a method for controlling a bi-color lamp, which is applied to a control device for a bi-color lamp. The device includes: a control device and a dual-pin bi-color lamp connected to the control device, the The two-pin two-color lamp includes: a first LED and a second LED, the first LED can display a first color when lit, and the second LED can display a different color from the first color when lit the second color, and the first LED and the second LED cannot be lit at the same time;

所述方法包括:接收来自外部的时钟信号;对所述时钟信号进行除频处理,获得第一除频信号、第二除频信号和基频信号;至少基于所述第一除频信号、所述第二除频信号和所述基频信号,生成控制信号;将所述控制信号发送给所述双管脚的双色灯,控制所述双管脚的双色灯以预设闪烁频率轮流显示所述第一颜色和所述第二颜色,以实现混合出第三颜色,其中,所述第三颜色与所述第一颜色和所述第二颜色均不相同。The method includes: receiving an external clock signal; 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; The second frequency division signal and the fundamental frequency signal are used to generate a control signal; the control signal is sent to the two-pin two-color lamp, and the two-pin two-color lamp is controlled to display all the colors in turn at a preset flashing frequency. The first color and the second color are mixed to achieve 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, wherein when the program runs, a computer device where the storage medium is located is controlled to perform the above-mentioned control of a two-color lamp steps of the method.

第四方面,本申请实施例提供了一种计算机设备,所述计算机设备包括:至少一个处理器;以及与所述处理器连接的至少一个存储器、总线;其中,所述处理器、存储器通过所述总线完成相互间的通信;所述处理器用于调用所述存储器中的程序指令,以执行上述的双色灯的控制方法的步骤。In a fourth aspect, an embodiment of the present application provides a computer device, the computer device includes: at least one processor; and at least one memory and a bus connected to the processor; wherein the processor and the memory pass through all the The bus completes mutual communication; the processor is used for calling the program instructions in the memory to execute the steps of the above-mentioned control method for a two-color lamp.

本申请实施例提供的双色灯的控制装置及方法、存储介质和设备,该双色灯的控制装置包括:控制器件和与控制器件连接的双管脚的双色灯,其中,双管脚的双色灯,包括:第一LED和第二LED,第一LED被点亮时能够显示第一颜色,第二LED被点亮时能够显示与第一颜色不同的第二颜色,且第一LED与第二LED不能同时被点亮;控制器件,用于接收来自外部的时钟信号;对时钟信号进行除频处理,获得第一除频信号、第二除频信号和基频信号;至少基于第一除频信号、第二除频信号和基频信号,生成控制信号;将控制信号发送给双管脚的双色灯,控制双管脚的双色灯以预设闪烁频率轮流显示第一颜色和第二颜色,以实现混合出第三颜色,其中,第三颜色与第一颜色和第二颜色均不相同。这样,通过控制双管脚的双色灯以预设闪烁频率轮流显示第一颜色和第二颜色,根据视觉暂留现象,就能够实现控制双管脚的双色灯产生混光的效果,即产生与第一颜色和第二颜色不相同的第三颜色,从而,能够丰富双管脚的双色灯的控制效果,提高双管脚的双色灯的应用效果。The control device and method, storage medium and device for a two-color lamp provided by the embodiments of the present application, the control device for a two-color lamp includes: a control device and a two-pin two-color lamp connected to the control device, wherein the two-pin two-color lamp , including: a first LED and a second LED, the first LED can display a first color when it is lit, the second LED can display a second color different from the first color when it is lit, and the first LED and the second The LEDs cannot be lit at the same time; the control device is used to receive the clock signal from the outside; the frequency division process is performed on the clock signal to obtain the first frequency division signal, the second frequency division signal and the fundamental frequency signal; based on at least the first frequency division signal signal, the second frequency division signal and the base frequency signal, and generate a control signal; send the control signal to the two-pin dual-color lamp, and control the dual-pin dual-color lamp to display the first color and the second color alternately at the preset flashing frequency, In order to realize the mixing of a third color, the third color is different from the first color and the second color. In this way, by controlling the two-pin two-color lamp to display the first color and the second color in turn at a preset flickering frequency, according to the phenomenon of persistence of vision, the effect of controlling the two-pin two-color lamp to produce mixed light can be achieved, that is, to produce a mixed light with The third color that is different from the first color and the second color can enrich the control effect of the two-pin two-color lamp and improve the application effect of the two-pin two-color lamp.

本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的其他优点可通过在说明书、权利要求书以及附图中所描述的方案来实现和获得。Other features and advantages of the present application will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the present application. Other advantages of the present application may be realized and attained by the means described in the specification, claims and drawings.

附图说明Description of drawings

附图用来提供对本申请技术方案的理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本申请的技术方案,并不构成对本申请技术方案的限制。The accompanying drawings are used to provide an understanding of the technical solutions of the present application, and constitute a part of the specification. They are used to explain the technical solutions of the present application together with the embodiments of the present application, and do not constitute a limitation on the technical solutions of the present application.

图1为本申请实施例中的双色灯的控制装置的结构示意图;1 is a schematic structural diagram of a control device for a two-color lamp in an embodiment of the application;

图2为本申请实施例中的双色灯的控制方法的流程示意图;2 is a schematic flowchart of a method for controlling a bi-color lamp in an embodiment of the present application;

图3为本申请实施例中的控制器件的结构示意图;3 is a schematic structural diagram of a control device in an embodiment of the application;

图4为本申请实施例中的控制信号的波形示意图;4 is a schematic waveform diagram of a control signal in an embodiment of the present application;

图5为本申请实施例中的计算机设备的结构示意图。FIG. 5 is a schematic structural diagram of a computer device in an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.

本申请实施例提供了一种双色灯的控制装置。图1为本申请实施例中的双色灯的控制装置的结构示意图,参见图1所示,该双色灯的控制装置可以包括:控制器件101和与控制器件101连接的双管脚的双色灯102;其中,The embodiment of the present application provides a control device for a bi-color lamp. FIG. 1 is a schematic structural diagram of a control device for a two-color lamp in an embodiment of the present application. Referring to FIG. 1 , the control device for a two-color lamp may include: a control device 101 and a two-pin dual-color lamp 102 connected to the control device 101 . ;in,

双管脚的双色灯102包括:第一LED 1021和第二LED 1022,第一LED 1021被点亮时能够显示第一颜色,第二LED 1022被点亮时能够显示与第一颜色不同的第二颜色,且第一LED 1021与第二LED 1022不能同时被点亮;The dual-pin dual-color lamp 102 includes: a first LED 1021 and a second LED 1022, the first LED 1021 can display the first color when it is lit, and the second LED 1022 can display the first color when it is lit. Two colors, and the first LED 1021 and the second LED 1022 cannot be lit at the same time;

控制器件101,用于接收来自外部的时钟信号;对时钟信号进行除频处理,获得第一除频信号、第二除频信号和基频信号;至少基于第一除频信号、第二除频信号和基频信号,生成控制信号;将控制信号发送给双管脚的双色灯102,控制双管脚的双色灯102以预设闪烁频率轮流显示第一颜色和第二颜色,以实现混合出第三颜色,其中,第三颜色与第一颜色和第二颜色均不相同。The control device 101 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; based on at least the first frequency division signal and the second frequency division signal signal and fundamental frequency signal to generate a control signal; send the control signal to the two-pin two-color lamp 102, and control the two-pin two-color lamp 102 to alternately display the first color and the second color at a preset flickering frequency to achieve mixed output. A third color, wherein the third color is different from both the first color and the second color.

这里,上述时钟信号可以是来自外部信号源,如晶体振荡器所产生的信号。Here, the above-mentioned clock signal may be a signal generated from an external signal source, such as a crystal oscillator.

这里,上述控制信号,用于控制双管脚的双色灯以预设闪烁频率轮流显示第一颜色和第二颜色。上述控制信号为预设闪烁频率的信号。Here, the above-mentioned control signal is used to control the two-pin two-color lamp to alternately display the first color and the second color at a preset flickering frequency. The above-mentioned control signal is a signal with a preset flickering frequency.

在实际应用中,仍然参见图1所示,双管脚的双色灯102可以包括:第一管脚和第二管脚,那么,就需要使用控制器件101的两个GPIO(General Purpose Input/Output,通用型的输入/输出)管脚,才能实现将控制器件101与双管脚的双色灯102连接起来,这样,可以将控制器件101的第一GPIO管脚与该双管脚的双色灯102的第一管脚连接,并将控制器件的第二GPIO管脚与该双管脚的双色灯102的第二管脚连接。In practical applications, still referring to FIG. 1 , the two-pin two-color lamp 102 may include: a first pin and a second pin, then, two GPIOs (General Purpose Input/Output) of the control device 101 need to be used , general-purpose input/output) pins, can realize the connection between 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 with the two-pin two-color lamp 102 The second GPIO pin of the control device is connected to the second pin of the dual-pin dual-color lamp 102 .

在实际应用中,在控制器件控制双管脚的双色灯中的LED点亮的过程中,若控制器件控制第一GPIO管脚输出高电平的电信号,并控制第二GPIO管脚同时输出低电平的电信号,就可以实现点亮第一LED,使得双管脚的双色灯显示第一颜色,而若控制器件控制第一GPIO管脚输出低电平的电信号,并控制第二GPIO管脚同时输出高电平的电信号,就可以实现点亮第二LED,使得双管脚的双色灯显示第二颜色。那么,为了实现以混光的方式点亮第一LED和第二LED,就可以以合适的预先设定的频率让第一GPIO管脚输出高电平的电信号、第二GPIO管脚同时输出低电平的电信号,以及让第一GPIO管脚输出低电平的电信号、第二GPIO管脚同时输出高电平的电信号,这样,第一LED与第二LED将基于预先设定的频率轮流点亮,即双管脚的双色灯会轮流显示第一颜色和第二颜色,从而就可以达到混光效果,即基于视觉暂留现象,用户就可以看到第一颜色与第二颜色混合后所产生的第三颜色。In practical applications, when the control device controls the LED in the dual-pin dual-color lamp to light up, if the control device controls the first GPIO pin to output a high-level electrical signal, and controls the second GPIO pin to output a high-level electrical signal at the same time A low-level electrical signal can light up the first LED, so that the two-pin two-color lamp displays the first color, and if the control device controls the first GPIO pin to output a low-level electrical signal, and controls the second GPIO pin to output a low-level electrical signal The GPIO pin outputs a high-level electrical signal at the same time, so that the second LED can be turned on, so that the two-pin two-color light can display the second color. Then, in order to light up the first LED and the second LED in a mixed light manner, the first GPIO pin can output a high-level electrical signal at a suitable preset frequency, and the second GPIO pin can output a high-level electrical signal at the same time. Low-level electrical signal, and let the first GPIO pin output a low-level electrical signal, and the second GPIO pin output a high-level electrical signal at the same time, so that the first LED and the second LED will be based on presets. The frequency of the two-pin two-color lights will alternately display the first color and the second color, so that the mixed light effect can be achieved, that is, based on the visual persistence phenomenon, the user can see the first color and the second color. The third color produced after mixing.

那么,在具体实施过程中,上述控制信号可以包括:符合预设闪烁频率的第一GPIO信号和第二GPIO信号,其中,第一GIPO信号与第二GPIO信号的电平不同。Then, in a specific implementation process, the above-mentioned control signal may include: a first GPIO signal and a second GPIO signal conforming to the preset flickering frequency, wherein the levels of the first GIPO signal and the second GPIO signal are different.

进一步地,上述控制器件,可以具体用于将第一GPIO信号通过第一GPIO管脚发送至第一管脚,并将第二GPIO信号通过第二GPIO管脚发送至第二管脚,以使双管脚的双色灯以预设闪烁频率轮流显示第一颜色和第二颜色,以实现根据视觉暂留现象混合出与第一颜色和第二颜色均不相同的第三颜色。这样,仅使用控制器件的两只GPIO管脚,便可让双管脚的双色灯产生两种以上的颜色,能够提高双管脚的双色灯的控制效果。从而,将该双色灯的控制装置应用到实际应用中时,就可以实现通过控制双管脚的双色灯显示不同颜色,来向用户指示不同的信息,而由于不同的颜色可以让使用者更容易分辨其差异,那么,就可以让使用者达到更有效率的判断,能够提高双管脚的双色灯的应用效果。Further, the above control device can be specifically used 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 The two-pin two-color lamp alternately displays the first color and the second color at a preset flickering frequency, so as to realize the mixing of a third color different from the first color and the second color according to the visual persistence phenomenon. In this way, by using only two GPIO pins of the control device, the dual-pin dual-color lamp can generate more than two colors, which can improve the control effect of the dual-pin dual-color lamp. Therefore, when the control device of the two-color lamp is applied to practical applications, it can be realized by controlling the two-pin two-color lamp to display different colors to indicate different information to the user, and the different colors can make it easier for the user to display different colors. By distinguishing the differences, users can make more efficient judgments, and the application effect of the two-pin two-color lamp can be improved.

示例性地,若将该双色灯的控制装置应用于除错灯领域、电源按键领域等伺服器领域中,便可以实现以不同颜色来指示不同的类别的信息,例如,在除错灯领域中可以以原生的第一颜色表示电源异常,以混光的第三颜色表示上电/下电状态,以原生的第二颜色表示PCH(Platform Controller Hub,平台路径控制器)的Port 80;在电源按键领域中,可以以原生的第一颜色表示服务器电源启动/关闭,以混光的第三颜色表示电源异常,以原生的第二颜色表示BMC(Baseboard Management Controller,基板管理控制器)异常。如此,使用者便可更直观且明确地知道双色灯目前正表示何种类别的信息。Exemplarily, if the control device for the two-color light is applied to the field of servers such as the field of debug lights and the field of power buttons, different colors can be used to indicate different types of information, for example, in the field of debug lights. You can use the native first color to indicate the power supply abnormality, the third color of mixed light to indicate the power-on/power-off state, and the native second color to indicate the Port 80 of the PCH (Platform Controller Hub, platform path controller). In the field of buttons, the first native color can be used to indicate that the server is powered on/off, the third color of mixed light can indicate abnormal power supply, and the second native color can indicate BMC (Baseboard Management Controller, baseboard management controller) anomalies. In this way, the user can more intuitively and clearly know what kind of information the bi-color lamp is currently representing.

在实际应用中,上述控制器件可以由诸如BMC、CPLD(Complex ProgrammableLogic Device,复杂可编程逻辑器件)、MCU(Microcontroller Unit,微控制单元)、FPGA(Field Programmable Gate Array,现场可编程门阵列)、PCH等具有控制功能的IC(Integrated Circuit,集成电路)芯片来实现。当然,还可以有其它实现方式,这里,本申请实施例不做具体限定。In practical applications, the above-mentioned control device can be composed of, for example, BMC, CPLD (Complex Programmable Logic Device, complex programmable logic device), MCU (Microcontroller Unit, micro control unit), FPGA (Field Programmable Gate Array, field programmable gate array), It is realized by an IC (Integrated Circuit, integrated circuit) chip having a control function such as PCH. Of course, there may also be other implementation manners, which are not specifically limited in this embodiment of the present application.

在实际应用中,由于双管脚的双色灯中的两颗LED,在颜色、强度等方面之间是存在差异的,那么,为了达到更好的混光效果,就需要针对该两颗LED调整各自点亮的权重,即需要确定两颗LED各自的动作时间,在一个脉冲周期内,动作时间越长的LED就会越亮,动作时间越短的LED就会越暗。这样,通过给两颗LED分配不同的动作时间,就可以基于不同亮度的第一颜色和不同亮度的第二颜色混合出不同的第三颜色。In practical applications, since the two LEDs in the two-pin dual-color lamp are different in terms of color and intensity, in order to achieve a better light mixing effect, it is necessary to adjust the two LEDs. The respective lighting weights need to determine the respective action time of the two LEDs. In a pulse cycle, the LED with a longer action time will be brighter, and the LED with a shorter action time will be darker. In this way, by assigning different action times to the two LEDs, different third colors can be mixed based on the first color with different brightness and the second color with different brightness.

那么,在本申请其它实施例中,为了达到更好的混光效果,上述控制器件,还可以具体用于:基于基频信号,生成用于控制双管脚的双色灯中的第一LED的动作时间的第一仲裁信号和用于控制双管脚的双色灯中的第二LED的动作时间的第二仲裁信号;获取用于指示预设闪烁频率的模式选择信息;基于模式选择信息、第一除频信号、第二除频信号、第一仲裁信号和第二仲裁信号,生成控制信号。Then, in other embodiments of the present application, in order to achieve a better light mixing effect, the above-mentioned control device may also be specifically used to: based on the fundamental frequency signal, generate a control device for controlling the first LED in the two-pin two-color lamp. The first arbitration signal of the action time and the second arbitration signal used to control the action time of the second LED in the two-pin two-color lamp; obtain the mode selection information used to indicate the preset flickering frequency; based on the mode selection information, the first A frequency division signal, a second frequency division signal, a first arbitration signal, and a second arbitration signal generate a control signal.

在实际应用中,模式选择信息可以用于指示各个LED的动作模式,例如,恒亮、恒灭、闪烁2Hz、闪烁0.5Hz等行为的一种或多种组合。模式选择信息可由本领域技术人员根据实际需要来自行设定,这里,本申请实施例不做具体限定。In practical applications, the mode selection information can be used to indicate the action mode of each LED, for example, one or more combinations of behaviors such as constant on, constant off, blinking at 2 Hz, and blinking at 0.5 Hz. The mode selection information can be set by those skilled in the art according to actual needs, which is not specifically limited in this embodiment of the present application.

在实际应用中,可以将控制器件与外部的存储器件,如暂存器、寄存器等连接,可由本领域技术人员根据实际应用需求通过控制器件来预先设定模式选择信息。这样,就可以实现将模式选择信息存储在外部的存储器件中。接下来,在需要通过控制器件对双管脚的双色灯的行为进行控制时,控制器件就可以从外部的存储器件中读取到该模式选择信息,以便基于模式选择信息、除频信号和仲裁信号来生成对应的控制信号。In practical applications, the control device can be connected to an external storage device, such as a temporary register, a register, etc., and the mode selection information can be preset by a person skilled in the art through the control device according to actual application requirements. In this way, the mode selection information can be stored in the external storage device. Next, when the behavior of the dual-pin dual-color lamp needs to be controlled by the control device, the control device can read the mode selection information from the external storage device, so as to be based on the mode selection information, frequency division signal and arbitration signal to generate the corresponding control signal.

作为示例,以控制器件从暂存器中获取模式选择信息为例,可以分别用2bit(比特)来表示LED的诸如闪烁2Hz、闪烁0.5Hz、恒亮及恒灭等行为,那么,若想要表示三种颜色的行为就可以用到6bit。此时,通常可以采用一个8bit的暂存器去存放这6bit的信息。As an example, taking the control device to obtain the mode selection information from the temporary register as an example, 2 bits (bits) can be used to represent the behaviors of LEDs such as blinking 2Hz, blinking 0.5Hz, constant on and constant off, then, if you want to 6bit can be used to represent the behavior of three colors. At this time, an 8-bit temporary register can usually be used to store the 6-bit information.

进一步举例来说,若控制器件为BMC,则此暂存器可由BMC通过I2C(Inter-Integrated Circuit,内置集成电路)总线来设定;若控制器件为PCH,则此暂存器可由PCH通过LPC(Low Pin Count,低引脚数)总线或者eSPI(Serial Peripheral Interface,串行外设接口)总线来设定。在实际应用中具体实现方式取决于实际的硬件条件及用户需求,可由本领域技术人员根据实际应用情况自行设定,这里,本申请实施例不做具体限定。For further example, if the control device is a BMC, the register can be set by the BMC through the I2C (Inter-Integrated Circuit) bus; if the control device is a PCH, the register can be set by the PCH through the LPC (Low Pin Count, low pin count) bus or eSPI (Serial Peripheral Interface, serial peripheral interface) bus to set. In practical applications, the specific implementation manner depends on actual hardware conditions and user requirements, and can be set by those skilled in the art according to actual application conditions, which are not specifically limited in the embodiments of the present application.

在具体实施过程中,为了生成用于控制双管脚的双色灯以预设闪烁频率轮流显示第一颜色和第二颜色的控制信号,上述控制器件,还可以具体用于:基于模式选择信息、第一除频信号和第二除频信号,生成符合预设闪烁频率的驱动信号;基于驱动信号、第一仲裁信号和第二仲裁信号,生成控制信号。In a specific implementation process, in order to generate a control signal for controlling a two-pin two-color lamp to alternately display the first color and the second color at a preset flickering frequency, the above-mentioned control device can also be specifically used for: selecting information based on the mode, The first frequency dividing signal and the second frequency dividing signal generate a driving signal conforming to a preset flickering frequency; and a control signal is generated based on the driving signal, the first arbitration signal and the second arbitration signal.

在实际应用中,上述第一除频信号的频率与一个LED闪烁行为的频率有关,第二除频信号的频率与另一个LED闪烁行为的频率有关。In practical applications, the frequency of the first frequency dividing signal is related to the frequency of the blinking behavior of one LED, and the frequency of the second frequency dividing signal is related to the frequency of the blinking behavior of another LED.

在具体实施过程中,为了生成用于控制第一LED和第二LED动作时间的仲裁信号,上述控制器件,还可以包括:基于基频信号进行计数,得到计数值;根据计数值,分配第一LED的动作时间和第二LED的动作时间;基于第一LED的动作时间生成第一仲裁信号,并基于第二LED的动作时间生成第二仲裁信号。In a specific implementation process, in order to generate an arbitration signal for controlling the action time of the first LED and the second LED, the above control device may further include: counting based on the fundamental frequency signal to obtain a count value; according to the count value, assigning the first The operation time of the LED and the operation time of the second LED; the first arbitration signal is generated based on the operation time of the first LED, and the second arbitration signal is generated based on the operation time of the second LED.

由上述内容可知,本申请实施例提供的双色灯的控制装置,在控制器件接收到来自外部的时钟信号后,就可以对该时钟信号进行除频处理,获得第一除频信号、第二除频信号和基频信号;接下来,就可以基于第一除频信号、第二除频信号和基频信号,生成控制信号,最后,将控制信号发送给双管脚的双色灯,控制双管脚的双色灯以预设闪烁频率轮流显示第一颜色和第二颜色,以实现混合出第三颜色,其中,第三颜色与第一颜色和第二颜色均不相同。这样,通过控制器件基于除频后的时钟信号所生成的控制信号,来控制双管脚的双色灯以预设闪烁频率轮流显示第一颜色和第二颜色,根据视觉暂留现象,就能够实现控制双管脚的双色灯产生混光的效果,即产生与第一颜色和第二颜色不相同的第三颜色,从而,能够丰富双管脚的双色灯的控制效果,提高双管脚的双色灯的应用效果。It can be seen from the above content that, in the control device for a two-color lamp provided by the embodiment of the present application, after the control device receives the clock signal from the outside, it can perform frequency division processing on the clock signal to obtain the first frequency division signal and the second frequency division signal. The frequency signal and the base frequency signal; next, the control signal can be generated based on the first frequency division signal, the second frequency division signal and the base frequency signal, and finally, the control signal is sent to the dual-pin dual-color lamp to control the dual-tube The two-color light of the foot alternately displays the first color and the second color at a preset flashing frequency, so as to realize the mixing of the third color, wherein the third color is different from the first color and the second color. In this way, by controlling the control device based on the control signal generated by the frequency-divided clock signal, the two-pin two-color lamp is controlled to display the first color and the second color alternately at the preset flickering frequency. According to the visual persistence phenomenon, it is possible to realize Controlling the two-pin two-color lamp to produce a mixed light effect, that is, generating a third color that is different from the first color and the second color, thereby enriching the control effect of the two-pin two-color lamp and improving the two-pin two-color lamp. Light application effect.

基于同一发明构思,本申请实施例提供一种双色灯的控制方法。在实际应用中,该双色灯的控制方法可应用于上述一个或多个实施例中双色灯的控制装置,双管脚的双色灯的控制装置包括:控制器件以及与控制器件连接的双管脚的双色灯,双管脚的双色灯包括:第一LED和第二LED,第一LED被点亮时能够显示第一颜色,第二LED被点亮时能够显示与第一颜色不同的第二颜色,且第一LED与第二LED不能同时被点亮。Based on the same inventive concept, an embodiment of the present application provides a control method for a two-color lamp. In practical applications, the method for controlling a two-color lamp can be applied to the control device for a two-color lamp in one or more of the above embodiments. The control device for a two-pin two-color lamp includes: a control device and a two-pin connection connected to the control device. The two-color lamp with two pins includes: a first LED and a second LED, the first LED can display the first color when it is lit, and the second LED can display a second color different from the first color when the second LED is lit. color, and the first LED and the second LED cannot be lit at the same time.

图2为本申请实施例中的双色灯的控制方法的流程示意图,参见图2所示,该双色灯的控制方法可以包括:FIG. 2 is a schematic flowchart of a method for controlling a two-color lamp in an embodiment of the present application. Referring to FIG. 2 , the method for controlling a two-color lamp may include:

S201:控制器件接收来自外部的时钟信号;S201: the control device receives a clock signal from the outside;

这里,上述时钟信号可以是来自外部信号源,如晶体振荡器所产生的信号。Here, the above-mentioned clock signal may be a signal generated from an external signal source, such as a crystal oscillator.

S202:控制器件对时钟信号进行除频处理,获得第一除频信号、第二除频信号和基频信号;S202: The control device performs frequency division processing on the clock signal to obtain a first frequency division signal, a second frequency division signal and a base frequency signal;

S203:控制器件至少基于第一除频信号、第二除频信号和基频信号,生成控制信号;S203: The control device generates a control signal based on at least the first frequency division signal, the second frequency division signal and the fundamental frequency signal;

这里,上述控制信号,用于控制双管脚的双色灯以预设闪烁频率轮流显示第一颜色和第二颜色。上述控制信号为预设闪烁频率的信号。Here, the above-mentioned control signal is used to control the two-pin two-color lamp to alternately display the first color and the second color at a preset flickering frequency. The above-mentioned control signal is a signal with a preset flickering frequency.

在实际应用中,由于双管脚的双色灯中的两颗LED,在颜色、强度等方面之间是存在差异的,那么,为了达到更好的混光效果,就需要针对该两颗LED调整各自点亮的权重,即需要确定两颗LED各自的动作时间,在一个脉冲周期内,动作时间越长的LED就会越亮,动作时间越短的LED就会越暗。这样,通过给两颗LED分配不同的动作时间,就可以基于不同亮度的第一颜色和不同亮度的第二颜色混合出不同的第三颜色。In practical applications, since the two LEDs in the two-pin dual-color lamp are different in terms of color and intensity, in order to achieve a better light mixing effect, it is necessary to adjust the two LEDs. The respective lighting weights need to determine the respective action time of the two LEDs. In a pulse cycle, the LED with a longer action time will be brighter, and the LED with a shorter action time will be darker. In this way, by assigning different action times to the two LEDs, different third colors can be mixed based on the first color with different brightness and the second color with different brightness.

那么,为了达到更好的混光效果,在本申请其它实施例中,上述S203可以包括以下步骤2031~2033:Then, in order to achieve a better light mixing effect, in other embodiments of the present application, the above S203 may include the following steps 2031 to 2033:

步骤2031:控制器件基于基频信号,生成用于控制双管脚的双色灯中的第一LED的动作时间的第一仲裁信号和用于控制双管脚的双色灯中的第二LED的动作时间的第二仲裁信号;Step 2031: Based on the fundamental frequency signal, the control device generates a first arbitration signal for controlling the action time of the first LED in the two-pin two-color lamp and for controlling the action of the second LED in the two-pin two-color lamp the second arbitration signal of time;

这里,根据实际需要,第一LED的动作时间与第二LED的动作时间可以相同,也可以不相同。可由本领域技术人员根据实际应用情况来设定,这里,本申请实施例不做具体限定。Here, according to actual needs, the operation time of the first LED and the operation time of the second LED may be the same or different. It can be set by those skilled in the art according to the actual application situation, and is not specifically limited in the embodiment of the present application here.

步骤2032:控制器件获取用于指示预设闪烁频率的模式选择信息;Step 2032: the control device acquires the mode selection information used to indicate the preset flickering frequency;

在实际应用中,模式选择信息可以用于指示LED的行为模式,例如,模式选择信息可以为恒亮、恒灭、闪烁2Hz、闪烁0.5Hz等行为的一种或多种组合。那么,当需要通过控制器件来控制双管脚的双色灯混合出其它颜色,控制器件就可以获取到用于指示预设闪烁频率的模式选择信息。In practical applications, the mode selection information can be used to indicate the behavior mode of the LED. For example, the mode selection information can be one or more combinations of behaviors such as constant on, constant off, blinking at 2 Hz, and blinking at 0.5 Hz. Then, when the dual-pin dual-color lamp needs to be controlled by the control device to mix other colors, the control device can obtain the mode selection information for indicating the preset flickering frequency.

在实际应用中,可以将控制器件与外部的存储器件,如暂存器、寄存器等连接,可由本领域技术人员根据实际应用需求通过控制器件来预先设定模式选择信息。这样,就可以实现将模式选择信息存储在外部的存储器件中。接下来,在需要通过控制器件对双管脚的双色灯的行为进行控制时,控制器件就可以从外部的存储器件中读取到该模式选择信息,以便基于模式选择信息、除频信号和仲裁信号来生成对应的控制信号。In practical applications, the control device can be connected to an external storage device, such as a temporary register, a register, etc., and the mode selection information can be preset by a person skilled in the art through the control device according to actual application requirements. In this way, the mode selection information can be stored in the external storage device. Next, when the behavior of the dual-pin dual-color lamp needs to be controlled by the control device, the control device can read the mode selection information from the external storage device, so as to be based on the mode selection information, frequency division signal and arbitration signal to generate the corresponding control signal.

作为示例,以控制器件从暂存器中获取模式选择信息为例,可以分别用2bit来表示LED的诸如闪烁2Hz、闪烁0.5Hz、恒亮及恒灭等行为,那么,若想要表示三种颜色的行为就可以用到6bit。此时,通常可以采用一个8bit的暂存器去存放这6bit的信息。As an example, taking the control device to obtain the mode selection information from the temporary register as an example, 2 bits can be used to represent LED behaviors such as 2Hz blinking, 0.5Hz blinking, constant on and constant off, etc., then, if you want to represent three types of LEDs The behavior of the color can be used in 6bit. At this time, an 8-bit temporary register can usually be used to store the 6-bit information.

进一步举例来说,若控制器件为BMC,则此暂存器可由BMC通过I2C总线来设定;若控制器件为PCH,则此暂存器可由PCH通过LPC总线或者eSPI总线来设定。在实际应用中具体实现方式取决于实际的硬件条件及用户需求,可由本领域技术人员根据实际应用情况自行设定,这里,本申请实施例不做具体限定。For further example, if the control device is a BMC, the register can be set by the BMC through 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. In practical applications, the specific implementation manner depends on actual hardware conditions and user requirements, and can be set by those skilled in the art according to actual application conditions, which are not specifically limited in the embodiments of the present application.

步骤2033:控制器件基于模式选择信息、第一除频信号、第二除频信号、第一仲裁信号和第二仲裁信号,生成控制信号。Step 2033: The control device generates a control signal based on the mode selection information, the first frequency dividing signal, the second frequency dividing signal, the first arbitration signal and the second arbitration signal.

作为示例,为了生成用于控制第一LED和第二LED动作时间的仲裁信号,那么,在具体实施过程中,上述步骤2031可以包括以下步骤2031a~2031c:As an example, in order to generate an arbitration signal for controlling the action time of the first LED and the second LED, in a specific implementation process, the above step 2031 may include the following steps 2031a-2031c:

步骤2031a:控制器件基于基频信号进行计数,得到计数值;Step 2031a: the control device counts based on the fundamental frequency signal to obtain a count value;

步骤2031b:控制器件根据计数值,分配第一LED的动作时间和第二LED的动作时间;Step 2031b: the control device allocates the action time of the first LED and the action time of the second LED according to the count value;

步骤2031c:控制器件基于第一LED的动作时间生成第一仲裁信号,并基于第二LED的动作时间生成第二仲裁信号。Step 2031c: The control device generates a first arbitration signal based on the operation time of the first LED, and generates a second arbitration signal based on the operation time of the second LED.

作为示例,为了生成用于控制双管脚的双色灯以预设闪烁频率轮流显示第一颜色和第二颜色的控制信号,那么,在具体实施过程中,上述步骤2033可以包括以下步骤2033a~2033b:As an example, in order to generate a control signal for controlling a two-pin two-color lamp to display the first color and the second color alternately at a preset flickering frequency, in a specific implementation process, the above step 2033 may include the following steps 2033a-2033b :

步骤2033a:控制器件基于模式选择信息、第一除频信号和第二除频信号,生成符合预设闪烁频率的驱动信号;Step 2033a: the control device generates a driving signal conforming to the preset flickering frequency based on the mode selection information, the first frequency dividing signal and the second frequency dividing signal;

在实际应用中,上述第一除频信号的频率与一个LED闪烁行为的频率有关,第二除频信号的频率与另一个LED闪烁行为的频率有关。In practical applications, the frequency of the first frequency dividing signal is related to the frequency of the blinking behavior of one LED, and the frequency of the second frequency dividing signal is related to the frequency of the blinking behavior of another LED.

步骤2033b:控制器件基于驱动信号、第一仲裁信号和第二仲裁信号,生成控制信号。Step 2033b: The control device generates a control signal based on the driving signal, the first arbitration signal and the second arbitration signal.

S204:控制器件将控制信号发送给双管脚的双色灯,控制双管脚的双色灯以预设闪烁频率轮流显示第一颜色和第二颜色,以实现混合出第三颜色。S204 : the control device sends a control signal to the two-pin two-color lamp, and controls the two-pin two-color lamp to alternately display the first color and the second color at a preset flickering frequency, so as to realize the mixing of the third color.

其中,第三颜色与第一颜色和第二颜色均不相同。Wherein, the third color is different from the first color and the second color.

至此,便完成了控制双管脚的双色灯的过程。So far, the process of controlling the two-pin two-color lamp is completed.

由上述内容可知,本申请实施例提供的双色灯的控制方法,在控制器件接收到来自外部的时钟信号后,就可以对该时钟信号进行除频处理,获得第一除频信号、第二除频信号和基频信号;接下来,就可以基于第一除频信号、第二除频信号和基频信号,生成控制信号,最后,将控制信号发送给双管脚的双色灯,控制双管脚的双色灯以预设闪烁频率轮流显示第一颜色和第二颜色,以实现混合出第三颜色,其中,第三颜色与第一颜色和第二颜色均不相同。这样,通过控制器件基于除频后的时钟信号所生成的控制信号,来控制双管脚的双色灯以预设闪烁频率轮流显示第一颜色和第二颜色,根据视觉暂留现象,就能够实现控制双管脚的双色灯产生混光的效果,即产生与第一颜色和第二颜色不相同的第三颜色,从而,能够丰富双管脚的双色灯的控制效果,提高双管脚的双色灯的应用效果。It can be seen from the above that, in the method for controlling a two-color lamp provided by the embodiment of the present application, after the control device receives the clock signal from the outside, it can perform frequency division processing on the clock signal to obtain the first frequency division signal, the second frequency division signal and the second frequency division signal. The frequency signal and the base frequency signal; next, the control signal can be generated based on the first frequency division signal, the second frequency division signal and the base frequency signal, and finally, the control signal is sent to the dual-pin dual-color lamp to control the dual-tube The two-color light of the foot alternately displays the first color and the second color at a preset flashing frequency, so as to realize the mixing of the third color, wherein the third color is different from the first color and the second color. In this way, by controlling the control device based on the control signal generated by the frequency-divided clock signal, the two-pin two-color lamp is controlled to display the first color and the second color alternately at the preset flickering frequency. According to the visual persistence phenomenon, it is possible to realize Controlling the two-pin two-color lamp to produce a mixed light effect, that is, generating a third color that is different from the first color and the second color, thereby enriching the control effect of the two-pin two-color lamp and improving the two-pin two-color lamp. Light application effect.

基于同一发明构思,本申请实施例提供一种控制器件。在实际应用中,该控制器件可应用于上述一个或多个实施例中的双色灯的控制装置中。双管脚的双色灯的控制装置包括:控制器件以及与控制器件连接的双管脚的双色灯,双管脚的双色灯包括:第一LED和第二LED,第一LED被点亮时能够显示第一颜色,第二LED被点亮时能够显示与第一颜色不同的第二颜色,且第一LED与第二LED不能同时被点亮。Based on the same inventive concept, an embodiment of the present application provides a control device. In practical applications, the control device can be applied to the control device of the bi-color lamp in one or more of the above embodiments. A control device for a two-pin two-color lamp includes a control device and a two-pin two-color lamp connected to the control device. The two-pin two-color lamp includes: a first LED and a second LED, and the first LED can be lit when it is lit. The first color is displayed, the second LED can display a second color different from the first color when the second LED is lit, and the first LED and the second LED cannot be lit at the same time.

图3为本申请实施例中的控制器件的结构示意图,参见图3所示,该控制器件30可以包括:除频模块301、计数模块302、仲裁模块303、LED行为控制模块304和LED驱动模块305;其中,控制器件30通过LED驱动模块305与双管脚的双色灯306连接。FIG. 3 is a schematic structural diagram of a control device in an embodiment of the present application. 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 to the dual-pin bi-color lamp 306 through the LED driving module 305 .

除频模块301,用于接收来自外部的时钟信号;对时钟信号进行除频处理,获得第一除频信号、第二除频信号和基频信号;将第一除频信号和第二除频信号发送给LED行为控制模块304,并将基频信号发送给计数模块302;The frequency dividing module 301 is used for receiving a clock signal from the outside; performing frequency dividing processing on the clock signal to obtain a first frequency dividing signal, a second frequency dividing signal and a base frequency signal; dividing the first frequency dividing signal and the second frequency dividing signal The signal is sent to the LED behavior control module 304, and the fundamental frequency signal is sent to the counting module 302;

计数模块302,用于接收除频模块301发送的基频信号;基于基频信号进行计数,得到计数值;将计数值发送给仲裁模块303;The counting module 302 is used for receiving the base frequency signal sent by the frequency dividing module 301; counting based on the base frequency signal to obtain a count value; sending the count value to the arbitration module 303;

仲裁模块303,用于接收计数模块302发送的计数值;基于计数值,生成用于控制双管脚的双色灯306中的第一LED 306a的动作时间的第一仲裁信号和用于控制双管脚的双色灯中的第二LED 306b的动作时间的第二仲裁信号;将第一仲裁信号和第二仲裁信号发送给LED驱动模块305;The arbitration module 303 is configured to receive the count value sent by the count module 302; based on the count value, generate a first arbitration signal used to control the action time of the first LED 306a in the dual-pin dual-color lamp 306 and a first arbitration signal used to control the dual-tube The second arbitration signal of the action time of the second LED 306b in the two-color lamp of the foot; sending the first arbitration signal and the second arbitration signal to the LED driving module 305;

LED行为控制模块304,用于接收除频模块301发送的第一除频信号和第二除频信号;获取用于指示预设闪烁频率的模式选择信息;基于模式选择信息、第一除频信号和第二除频信号,生成符合预设闪烁频率的驱动信号;将驱动信号发送给LED驱动模块305;The LED behavior control module 304 is used for receiving the first frequency dividing signal and the second frequency dividing signal sent by the frequency dividing module 301; obtaining the mode selection information for indicating the preset flickering frequency; based on the mode selection information, the first frequency dividing signal and the second frequency dividing signal to generate a driving signal conforming to the preset flickering frequency; sending the driving signal to the LED driving module 305;

在实际应用中,模式选择信息可以用于指示LED的行为模式,例如,模式选择信息可以为恒亮、恒灭、闪烁2Hz、闪烁0.5Hz等行为的一种或多种组合。那么,当需要通过控制器件来控制双管脚的双色灯混合出其它颜色,控制器件就可以获取到用于指示预设闪烁频率的模式选择信息。In practical applications, the mode selection information can be used to indicate the behavior mode of the LED. For example, the mode selection information can be one or more combinations of behaviors such as constant on, constant off, blinking at 2 Hz, and blinking at 0.5 Hz. Then, when the dual-pin dual-color lamp needs to be controlled by the control device to mix other colors, the control device can obtain the mode selection information for indicating the preset flickering frequency.

在实际应用中,可以将控制器件与外部的存储器件,如暂存器、寄存器等连接,可由本领域技术人员根据实际应用需求通过控制器件来预先设定模式选择信息。作为示例,可以分别用2bit来表示LED的诸如闪烁2Hz、闪烁0.5Hz、恒亮及恒灭等行为,那么,若想要表示三种颜色的行为就可以用到6bit。此时,通常可以采用一个8bit的暂存器去存放这6bit的信息。In practical applications, the control device can be connected to an external storage device, such as a temporary register, a register, etc., and the mode selection information can be preset by a person skilled in the art through the control device according to actual application requirements. As an example, 2 bits can be used to represent LED behaviors such as blinking at 2Hz, blinking at 0.5Hz, constant on, and constant off. Then, if you want to represent the behavior of three colors, you can use 6 bits. At this time, an 8-bit temporary register can usually be used to store the 6-bit information.

举例来说,以控制器件与外部的暂存器连接为例,则LED行为控制模块可以从暂存器中获取到所需的模式选择信息。For example, taking the connection between the control device and the external register as an example, the LED behavior control module can obtain the required mode selection information from the register.

LED驱动模块305,用于接收仲裁模块303发送的第一仲裁信号和第二仲裁信号;接收LED行为控制模块304发送的驱动信号;基于驱动信号、第一仲裁信号和第二仲裁信号,生成控制信号;将控制信号发送给双管脚的双色灯306,控制双管脚的双色灯306以预设闪烁频率轮流显示第一颜色和第二颜色,以实现混合出第三颜色,其中,第三颜色与第一颜色和第二颜色均不相同。The LED driving module 305 is configured to receive the first arbitration signal and the second arbitration signal sent by the arbitration module 303; receive the driving signal sent by the LED behavior control module 304; based on the driving signal, the first arbitration signal and the second arbitration signal, generate a control signal; send the control signal to the two-pin two-color lamp 306, and control the two-pin two-color lamp 306 to alternately display the first color and the second color at a preset flickering frequency, so as to realize the mixing of the third color, wherein the third The color is different from both the first color and the second color.

在实际应用中,该双管脚的双色灯集成有第一LED和第二LED,第一LED被点亮时能够显示第一颜色,第二LED被点亮时能够显示与第一颜色不同的第二颜色,且第一LED与第二LED不能同时被点亮。In practical applications, the dual-pin dual-color lamp integrates a first LED and a second LED, the first LED can display the first color when it is lit, and the second LED can display a different color from the first color when the second LED is lit. The second color, and the first LED and the second LED cannot be lit at the same time.

在本申请实施例中,仲裁模块,具体用于根据计数值,分配第一LED的动作时间和第二LED的动作时间;基于第一LED的动作时间生成第一仲裁信号,并基于第二LED的动作时间生成第二仲裁信号。In the embodiment of the present application, the arbitration module is specifically configured to allocate the action time of the first LED and the action time of the second LED according to the count value; The action time of the second arbitration signal is generated.

举例来说,以双管脚的双色灯集成有绿色LED和琥珀色LED为例,假设时钟信号为由外部的晶体振荡器所产生的频率为25Mhz的时钟信号,然后,在除频模块接收到来自外部的晶体振荡器的25Mhz的时钟信号后就可以得到频率分别为2Hz、0.5Hz、1KHz的三个信号,接下来,可以将2Hz的信号作为第一除频信号发送给LED行为控制模块、将0.5Hz的信号作为第二除频信号发送给LED行为控制模块,并将1KHz的信号作为基频信号发送给计数模块,即2Hz及0.5Hz为LED闪烁行为的频率。这样,可以基于2Hz、0.5Hz、1KHz这三个频率的信号生成如图4所示波形图案的控制信号,将该控制信号发送给双管脚的双色灯,就可以分别实现单独点亮琥珀色LED、单独点亮绿色LED和以预设闪烁频率轮流点亮琥珀色LED和绿色LED。For example, take the two-pin two-color light integrated with green LED and amber LED as an example, assuming that the clock signal is a clock signal with a frequency of 25Mhz generated by an external crystal oscillator, and then the frequency divider module receives After the 25Mhz clock signal from the external crystal oscillator, three signals with frequencies of 2Hz, 0.5Hz and 1KHz can be obtained. Next, the 2Hz signal can be sent as the first frequency division signal to the LED behavior control module, The 0.5Hz signal is sent to the LED behavior control module as the second frequency division signal, and the 1KHz signal is sent to the counting module as the base frequency signal, that is, 2Hz and 0.5Hz are the frequencies of the LED flickering behavior. In this way, the control signal of the waveform pattern shown in Figure 4 can be generated based on the signals of the three frequencies of 2Hz, 0.5Hz and 1KHz, and the control signal can be sent to the two-pin two-color lamp, and the amber color can be individually illuminated. LEDs, green LEDs individually, and alternating amber and green LEDs at a preset blink rate.

在实际应用中,上述除频模块、计数模块、仲裁模块、LED行为控制模块和LED驱动模块可以由诸如BMC、CPLD、MCU、FPGA、PCH等具有控制功能的IC芯片来实现。当然,还可以有其它实现方式,这里,本申请实施例不做具体限定。In practical applications, the above frequency dividing module, counting module, arbitration module, LED behavior control module and LED driving module can be implemented by IC chips with control functions such as BMC, CPLD, MCU, FPGA, PCH, etc. Of course, there may also be other implementation manners, which are not specifically limited in this embodiment of the present application.

由上述内容可知,本申请实施例提供的控制器件,该控制器件包括:除频模块、计数模块、仲裁模块、LED行为控制模块和LED驱动模块,在除频模块接收到来自外部的时钟信号后,除频模块可以对时钟信号进行除频处理,获得第一除频信号、第二除频信号和基频信号,并将第一除频信号和第二除频信号发送给LED行为控制模块,并将基频信号发送给计数模块;接下来,计数模块在接收到除频模块发送的基频信号后,可以基于基频信号进行计数,得到计数值,并将计数值发送给仲裁模块;仲裁模块在接收到计数模块发送的计数值后,可以基于计数值,生成用于控制双管脚的双色灯中的第一LED的动作时间的第一仲裁信号和用于控制双管脚的双色灯中的第二LED的动作时间的第二仲裁信号,并将第一仲裁信号和第二仲裁信号发送给LED驱动模块;而LED行为控制模块在接收到除频模块发送的第一除频信号和第二除频信号以及接收到来自外部的用于指示预设闪烁频率的模式选择信息后,可以基于模式选择信息、第一除频信号和第二除频信号,生成符合预设闪烁频率的驱动信号,并将驱动信号发送给LED驱动模块;最后,LED驱动模块在接收到仲裁模块发送的第一仲裁信号和第二仲裁信号,并接收到LED行为控制模块发送的驱动信号后,就可以基于驱动信号、第一仲裁信号和第二仲裁信号,生成控制信号,并将控制信号发送给双管脚的双色灯,控制双管脚的双色灯以预设闪烁频率轮流显示第一颜色和第二颜色,以实现混合出第三颜色,其中,第三颜色与第一颜色和第二颜色均不相同。这样,通过控制器件对双色灯进行扫描控制,控制双管脚的双色灯以预设闪烁频率轮流显示第一颜色和第二颜色。从而,根据视觉暂留现象,就能够实现控制双管脚的双色灯产生混光的效果,即产生与第一颜色和第二颜色不相同的第三颜色,进而,能够丰富双管脚的双色灯的控制效果,提高双管脚的双色灯的应用效果。It can be seen from the above that the control device provided by the embodiment of the present application includes: a frequency dividing module, a counting module, an arbitration module, an LED behavior control module, and an LED driving module. After the frequency dividing module receives an external clock signal, , the frequency division module can perform frequency division processing on the clock signal, obtain the first frequency division signal, the second frequency division signal and the base frequency signal, and send the first frequency division signal and the second frequency division signal to the LED behavior control module, Send the base frequency signal to the counting module; next, after receiving the base frequency signal sent by the frequency dividing module, the counting module can count based on the base frequency signal to obtain the count value, and send the count value to the arbitration module; arbitration; After the module receives the count value sent by the counting module, it can generate, based on the count value, a first arbitration signal for controlling the action time of the first LED in the two-pin two-color lamp and a first arbitration signal for controlling the two-pin two-color lamp The second arbitration signal of the action time of the second LED in the , and sends the first arbitration signal and the second arbitration signal to the LED driving module; and the LED behavior control module receives the first frequency dividing signal sent by the frequency dividing module and After the second frequency dividing signal and the mode selection information indicating the preset flickering frequency from the outside are received, a driver that conforms to the preset flickering frequency can be generated based on the mode selection information, the first frequency dividing signal and the second frequency dividing signal signal, and send the driving signal to the LED driving module; finally, after the LED driving module receives the first arbitration signal and the second arbitration signal sent by the arbitration module, and receives the driving signal sent by the LED behavior control module, it can be based on Drive signal, first arbitration signal and second arbitration signal, generate control signal, and send the control signal to two-pin bi-color lamp, control the two-pin bi-color lamp to alternately display the first color and the second color at a preset flickering frequency color, so as to realize the mixing of a third color, wherein the third color is different from the first color and the second color. In this way, the dual-color lamp is controlled by scanning through the control device, and the dual-pin dual-color lamp is controlled to alternately display the first color and the second color at a preset flickering frequency. Therefore, according to the phenomenon of persistence of vision, it is possible to control the dual-pin dual-color lamp to produce a mixed light effect, that is, to generate a third color that is different from the first color and the second color, thereby enriching the dual-pin dual color The control effect of the lamp improves the application effect of the two-pin two-color lamp.

基于同一发明构思,本申请实施例提供一种计算机设备。图5为本申请实施例中的计算机设备的结构示意图,参见图5所示,该计算机设备50包括:至少一个处理器51;以及与处理器51连接的至少一个存储器52、总线53;其中,处理器51、存储器52通过总线53完成相互间的通信;处理器51用于调用存储器52中的程序指令,以执行上述一个或多个实施例中的双色灯的控制方法的步骤。Based on the same inventive concept, an embodiment of the present application provides a computer device. FIG. 5 is a schematic structural diagram of a computer device in an embodiment of the application. Referring to FIG. 5 , the computer device 50 includes: at least one processor 51 ; and at least one memory 52 and a bus 53 connected to the processor 51 ; wherein, The processor 51 and the memory 52 communicate with each other through the bus 53; the processor 51 is used to call the program instructions in the memory 52 to execute the steps of the control method for a two-color lamp in one or more of the above embodiments.

相应地,基于同一发明构思,本申请实施例还提供了一种处理器,处理器用于运行程序,其中,程序运行时执行上述一个或多个实施例中的双色灯的控制方法的步骤。Correspondingly, based on the same inventive concept, an embodiment of the present application further provides a processor, where the processor is used to run a program, wherein the steps of the method for controlling a two-color lamp in one or more of the foregoing embodiments are executed when the program is running.

上述处理器可由中央处理器(Central Processing Unit,CPU)、微处理器(MicroProcessor Unit,MPU)、数字信号处理器(Digital Signal Processor,DSP)或FPGA等实现。存储器可能包括计算机可读介质中的非永久性存储器,随机存储器(Random AccessMemory,RAM)和/或非易失性内存等形式,如只读存储器(Read Only Memory,ROM)或闪存(Flash RAM),存储器包括至少一个存储芯片。The above-mentioned processor may be implemented by a central processing unit (Central Processing Unit, CPU), a microprocessor (MicroProcessor Unit, MPU), a digital signal processor (Digital Signal Processor, DSP), or an FPGA or the like. The memory may include non-persistent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read only memory (ROM) or flash memory (Flash RAM) , the memory includes at least one memory chip.

需要说明的是,在本申请实施例中,如果以软件功能模块的形式实现上述一个或多个实施例中的双色灯的控制方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本申请各个实施例方法的全部或部分。It should be noted that, in the embodiment of the present application, if the control method of the two-color lamp in the above one or more embodiments is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence or in the parts that make contributions to the prior art. The computer software products are stored in a storage medium and include several instructions for A computer device (which may be a personal computer, a server, or a network device, etc.) is caused to execute all or part of the methods of the various embodiments of the present application.

相应地,基于同一发明构思,本申请实施例再提供一种计算机可读存储介质,上述计算机可读存储介质包括存储的程序,其中,在程序运行时控制存储介质所在计算机设备执行上述一个或多个实施例中的双色灯的控制方法的步骤。Correspondingly, based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored program, wherein, when the program is run, a computer device where the storage medium is located is controlled to execute one or more of the above-mentioned programs. The steps of the control method of the two-color lamp in the embodiment.

这里需要指出的是:以上装置、计算机设备或计算机可读存储介质实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请装置、计算机设备或计算机可读存储介质实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。It should be pointed out here that the descriptions of the above apparatus, computer equipment or computer-readable storage medium embodiments are similar to the descriptions of the above method embodiments, and have similar beneficial effects to the method embodiments. For technical details that are not disclosed in the embodiments of the apparatus, computer equipment or computer-readable storage medium of the present application, please refer to the description of the method embodiments of the present application for understanding.

本申请描述了多个实施例,但是该描述是示例性的,而不是限制性的,并且对于本领域的普通技术人员来说显而易见的是,在本申请所描述的实施例包含的范围内可以有更多的实施例和实现方案。尽管在附图中示出了许多可能的特征组合,并在具体实施方式中进行了讨论,但是所公开的特征的许多其它组合方式也是可能的。除非特意加以限制的情况以外,任何实施例的任何特征或元件可以与任何其它实施例中的任何其他特征或元件结合使用,或可以替代任何其它实施例中的任何其他特征或元件。This application describes a number of embodiments, but the description is exemplary rather than restrictive, and it will be apparent to those of ordinary skill in the art that within the scope of the embodiments described in this application can be There are many more examples and implementations. 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. Unless expressly limited, any feature or element of any embodiment may be used in combination with, or may be substituted for, any other feature or element of any other embodiment.

本申请包括并设想了与本领域普通技术人员已知的特征和元件的组合。本申请已经公开的实施例、特征和元件也可以与任何常规特征或元件组合,以形成由权利要求限定的独特的发明方案。任何实施例的任何特征或元件也可以与来自其它发明方案的特征或元件组合,以形成另一个由权利要求限定的独特的发明方案。因此,应当理解,在本申请中示出和/或讨论的任何特征可以单独地或以任何适当的组合来实现。因此,除了根据所附权利要求及其等同替换所做的限制以外,实施例不受其它限制。此外,可以在所附权利要求的保护范围内进行各种修改和改变。This application includes and contemplates combinations with features and elements known to those of ordinary skill in the art. The embodiments, features and elements that have been disclosed in this application can also be combined with any conventional features or elements to form unique inventive solutions as defined by the claims. Any features or elements of any embodiment may also be combined with features or elements from other inventive arrangements to form another unique inventive arrangement defined by the claims. Accordingly, 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 to be limited except in accordance with the appended claims and their equivalents. Furthermore, various modifications and changes may be made within the scope of the appended claims.

此外,在描述具有代表性的实施例时,说明书可能已经将方法和/或过程呈现为特定的步骤序列。然而,在该方法或过程不依赖于本文所述步骤的特定顺序的程度上,该方法或过程不应限于所述的特定顺序的步骤。如本领域普通技术人员将理解的,其它的步骤顺序也是可能的。因此,说明书中阐述的步骤的特定顺序不应被解释为对权利要求的限制。此外,针对该方法和/或过程的权利要求不应限于按照所写顺序执行它们的步骤,本领域技术人员可以容易地理解,这些顺序可以变化,并且仍然保持在本申请实施例的精神和范围内。Furthermore, in describing representative embodiments, the specification may have presented methods and/or processes as a particular sequence of steps. However, to the extent that the method or process does not depend on the specific order of steps described herein, the method or process should not be limited to the specific order of steps described. Other sequences of steps are possible, as will be understood by those of ordinary skill in the art. Therefore, the specific order of steps set forth in the specification should not be construed as limitations on the claims. Furthermore, the claims directed to the method and/or process should not be limited to performing their steps in the order written, as those skilled in the art will readily appreciate that these orders may be varied and still remain within the spirit and scope of the embodiments of the present application Inside.

本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, functional modules/units in the systems, and devices can be implemented as software, firmware, hardware, and appropriate 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 composed of several physical components Components execute cooperatively. 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). As known to those of ordinary skill in the art, the term computer storage media includes both volatile and nonvolatile implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules or other data flexible, removable and non-removable media. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices, or may Any other medium used to store desired information and which can be 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 can include any information delivery media, as is well known to those of ordinary skill in the art .

Claims (8)

1.一种双色灯的控制装置,其特征在于,所述装置包括:控制器件和与所述控制器件连接的双管脚的双色灯;其中,1. A control device for a bi-color lamp, wherein the device comprises: a control device and a dual-pin bi-color lamp connected with the control device; wherein, 所述双管脚的双色灯,包括:第一LED和第二LED,第一LED被点亮时能够显示第一颜色,所述第二LED被点亮时能够显示与所述第一颜色不同的第二颜色,且所述第一LED与所述第二LED不能同时被点亮;The two-pin two-color lamp includes: a first LED and a second LED, the first LED can display a first color when it is lit, and the second LED can display a different color from the first when it is lit the second color, and the first LED and the second LED cannot be lit at the same time; 所述控制器件,用于接收来自外部的时钟信号;对所述时钟信号进行除频处理,获得第一除频信号、第二除频信号和基频信号;至少基于所述第一除频信号、所述第二除频信号和所述基频信号,生成控制信号;将所述控制信号发送给所述双管脚的双色灯,控制所述双管脚的双色灯以预设闪烁频率轮流显示所述第一颜色和所述第二颜色,以实现混合出第三颜色,其中,所述第三颜色与所述第一颜色和所述第二颜色均不相同;The control device is used for receiving a clock signal from the outside; frequency division processing is performed on the clock signal to obtain a first frequency division signal, a second frequency division signal and a base frequency signal; at least based on the first frequency division signal , the second frequency division signal and the base frequency signal, to generate a control signal; send the control signal to the two-pin bi-color lamp, and control the two-pin bi-color lamp to alternate at a preset flickering frequency displaying the first color and the second color to achieve a third color mixed, wherein the third color is different from the first color and the second color; 所述控制器件,用于基于所述基频信号,生成用于控制所述双管脚的双色灯中的第一LED的动作时间的第一仲裁信号和用于控制所述双管脚的双色灯中的第二LED的动作时间的第二仲裁信号;The control device is configured to generate, based on the fundamental frequency signal, a first arbitration signal for controlling the action time of the first LED in the dual-pin dual-color lamp and a first arbitration signal for controlling the dual-pin dual-color lamp a second arbitration signal for the action time of the second LED in the lamp; 所述控制器件,还用于基于所述基频信号进行计数,得到计数值;根据所述计数值,分配所述第一LED的动作时间和所述第二LED的动作时间;基于所述第一LED的动作时间生成所述第一仲裁信号,并基于所述第二LED的动作时间生成所述第二仲裁信号。The control device is further configured to count based on the fundamental frequency signal to obtain a count value; according to the count value, allocate the action time of the first LED and the action time of the second LED; based on the first LED The operation time of an LED generates the first arbitration signal, and the second arbitration signal is generated based on the operation time of the second LED. 2.根据权利要求1所述的装置,其特征在于,所述控制器件,获取用于指示所述预设闪烁频率的模式选择信息;2. The apparatus according to claim 1, wherein the control device acquires mode selection information for indicating the preset flickering frequency; 基于所述模式选择信息、所述第一除频信号、所述第二除频信号、所述第一仲裁信号和所述第二仲裁信号,生成所述控制信号。The control signal is generated based on the mode selection information, the first frequency dividing signal, the second frequency dividing signal, the first arbitration signal, and the second arbitration signal. 3.根据权利要求2所述的装置,其特征在于,所述控制器件,用于基于所述模式选择信息、所述第一除频信号和所述第二除频信号,生成符合所述预设闪烁频率的驱动信号;基于所述驱动信号、所述第一仲裁信号和所述第二仲裁信号,生成所述控制信号。3 . The apparatus according to claim 2 , wherein the control device is configured to generate, based on the mode selection information, the first frequency division signal, and the second frequency division signal, a signal conforming to the predetermined frequency. 4 . A drive signal of a flickering frequency is set; the control signal is generated based on the drive signal, the first arbitration signal and the second arbitration signal. 4.一种双色灯的控制方法,其特征在于,应用于双色灯的控制装置,所述装置包括:控制器件和与所述控制器件连接的双管脚的双色灯,所述双管脚的双色灯包括:第一LED和第二LED,所述第一LED被点亮时能够显示第一颜色,所述第二LED被点亮时能够显示与所述第一颜色不同的第二颜色,且所述第一LED与所述第二LED不能同时被点亮;4. A control method for a two-color lamp, characterized in that it is applied to a control device for a two-color lamp, the device comprising: a control device and a two-pin two-color lamp connected with the control device, the two-pin two-color lamp The two-color lamp includes: a first LED and a second LED, the first LED can display a first color when it is lit, and the second LED can display a second color different from the first color when it is lit, and the first LED and the second LED cannot be lit at the same time; 所述方法包括:The method includes: 接收来自外部的时钟信号;Receive external clock signals; 对所述时钟信号进行除频处理,获得第一除频信号、第二除频信号和基频信号;performing frequency division processing on the clock signal to obtain a first frequency division signal, a second frequency division signal and a fundamental frequency signal; 至少基于所述第一除频信号、所述第二除频信号和所述基频信号,生成控制信号;generating a control signal based on at least the first frequency division signal, the second frequency division signal and the fundamental frequency signal; 将所述控制信号发送给所述双管脚的双色灯,控制所述双管脚的双色灯以预设闪烁频率轮流显示所述第一颜色和所述第二颜色,以实现混合出第三颜色,其中,所述第三颜色与所述第一颜色和所述第二颜色均不相同;Send the control signal to the two-pin two-color lamp, and control the two-pin two-color lamp to alternately display the first color and the second color at a preset flickering frequency, so as to realize a mixed third color. color, wherein the third color is different from both the first color and the second color; 所述基于所述基频信号,生成用于控制所述双管脚的双色灯中的第一LED的动作时间的第一仲裁信号和用于控制所述双管脚的双色灯中的第二LED的动作时间的第二仲裁信号,包括:generating, based on the fundamental frequency signal, a first arbitration signal for controlling the operation time of the first LED in the two-pin two-color lamp and a second arbitration signal for controlling the two-pin two-color lamp The second arbitration signal for the action time of the LED, including: 基于所述基频信号进行计数,得到计数值;Counting based on the fundamental frequency signal to obtain a count value; 根据所述计数值,分配所述第一LED的动作时间和所述第二LED的动作时间;according to the count value, allocating the action time of the first LED and the action time of the second LED; 基于所述第一LED的动作时间生成所述第一仲裁信号,并基于所述第二LED的动作时间生成所述第二仲裁信号。The first arbitration signal is generated based on the operating time of the first LED, and the second arbitration signal is generated based on the operating time of the second LED. 5.根据权利要求4所述的方法,其特征在于,所述至少基于所述第一除频信号、所述第二除频信号和所述基频信号,生成控制信号,包括:5. The method according to claim 4, wherein the generating a control signal based on at least the first frequency division signal, the second frequency division signal and the fundamental frequency signal comprises: 基于所述基频信号,生成用于控制所述双管脚的双色灯中的第一LED的动作时间的第一仲裁信号和用于控制所述双管脚的双色灯中的第二LED的动作时间的第二仲裁信号;Based on the fundamental frequency signal, a first arbitration signal for controlling the operation time of the first LED in the two-pin two-color lamp and a first arbitration signal for controlling the second LED in the two-pin two-color lamp are generated. the second arbitration signal of the action time; 获取用于指示所述预设闪烁频率的模式选择信息;acquiring mode selection information for indicating the preset flickering frequency; 基于所述模式选择信息、所述第一除频信号、所述第二除频信号、所述第一仲裁信号和所述第二仲裁信号,生成所述控制信号。The control signal is generated based on the mode selection information, the first frequency dividing signal, the second frequency dividing signal, the first arbitration signal, and the second arbitration signal. 6.根据权利要求5所述的方法,其特征在于,所述基于所述模式选择信息、所述第一除频信号、所述第二除频信号、所述第一仲裁信号和所述第二仲裁信号,生成所述控制信号,包括:6 . The method according to claim 5 , wherein the selecting information based on the mode, the first frequency dividing signal, the second frequency dividing signal, the first arbitration signal and the first frequency dividing signal. 7 . Two arbitration signals to generate the control signal, including: 基于所述模式选择信息、所述第一除频信号和所述第二除频信号,生成符合所述预设闪烁频率的驱动信号;generating a driving signal conforming to the preset flickering 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. 7.一种计算机可读存储介质,其特征在于,所述存储介质包括存储的程序,其中,在所述程序运行时控制所述存储介质所在计算机设备执行如权利要求4至6任一项所述的双色灯的控制方法的步骤。7. A computer-readable storage medium, characterized in that the storage medium comprises a stored program, wherein, when the program is run, a computer device where the storage medium is located is controlled to execute the program according to any one of claims 4 to 6. The steps of the control method of the two-color lamp described above. 8.一种计算机设备,其特征在于,所述计算机设备包括:8. A computer device, characterized in that the computer device comprises: 至少一个处理器;at least one processor; 以及与所述处理器连接的至少一个存储器和总线;and at least one memory and bus connected to the processor; 其中,所述处理器和存储器通过所述总线完成相互间的通信;所述处理器用于调用所述存储器中的程序指令,以执行如权利要求4至6任一项所述的双色灯的控制方法的步骤。Wherein, the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the control of the two-color lamp according to any one of claims 4 to 6 steps of the method.
CN201910891314.8A 2019-09-20 2019-09-20 A control device and method for a two-color lamp, storage medium and equipment Active CN110708787B (en)

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 CN110708787A (en) 2020-01-17
CN110708787B true 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 (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
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

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
CN110708787A (en) 2020-01-17

Similar Documents

Publication Publication Date Title
US9226369B2 (en) Coordinated wearable lighting system
CN105491754B (en) Light-emitting diode drive circuit and lighting device having the same
TWM575136U (en) Smart computer case
JP5606739B2 (en) System and method for split processor control in a solid state lighting panel
US20180368230A1 (en) Light control system and method thereof
CN102479140A (en) Computer system and hard disk state display method thereof
CN110708787B (en) A control device and method for a two-color lamp, storage medium and equipment
WO2018188238A1 (en) Display device and testing method for display panel
JP2007206282A (en) Information processor and brightness control method
CN206003503U (en) Memory module
CN203311816U (en) Stereo advertisement screen
TW201527965A (en) System and method for detecting a BIOS test process of a computer
CN110379376B (en) A liquid crystal display for SSVEP and its stimulation pattern display method
US20090108864A1 (en) System and method for testing an operating condition of leds on a motherboard
CN108052439A (en) A kind of method that CPLD-FPGA information timesharing based on Verilog is shown
US9293933B2 (en) Charging indication apparatus and method thereof
CN112805775B (en) LCD display backlight control system
CN108399045A (en) Information display method and information display system
CN119258546A (en) Control method, device and electronic device of luminous building blocks based on encouragement effect
CN112020177A (en) Lighting memory device and memory module
CN107369414A (en) A kind of control method, display screen and electronic equipment
US9165458B2 (en) Electronic systems, slave electronic devices and signal transmission methods
CN101387981B (en) quantization indicator circuit
TWI697767B (en) Reset signal generation circuit and computer system
TWM568015U (en) Control signal switching system

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