PWM (Pulse Width Modulation) phase synchronization method, device, equipment and medium
By receiving target data in the LED driving device and detecting preset conditions, sending synchronous data for PWM phase correction, the problem of LED flickering is solved, and the stable display effect of LED lamps is achieved.
Patent Information
- Application Number
- CN202311382812.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-23
- Publication Date
- 2025-05-02
AI Technical Summary
LEDs are prone to flashing when working, mainly because the phases of the PWM modulation signals output by different LED driver devices are inconsistent.
The LED driving device connected to the control device through the serial data line receives the target data and detects whether the preset conditions are met. If so, the synchronization data is sent and PWM phase correction is performed to maintain the PWM phase consistency of the different LED driving devices.
It effectively eliminates the flickering problem of LED lamps, improves the display effect of the lamps, and maintains the consistent PWM phase of different LED driver devices.
Smart Images

Figure CN119922786A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of LED driving technology, and more specifically, to a PWM phase synchronization method, device, equipment and medium. Background Art
[0002] LED, also known as light-emitting diode, is widely used in LED display screens, traffic lights, car lights, lighting sources (such as lighting sources for mobile phones, cameras and other electronic devices) and other fields because of its advantages such as energy saving, long service life, green environmental protection and impact resistance.
[0003] At present, for the control of LED, pulse width modulation signal (PWM, Pulse Width Modulation) is usually used to control the brightness of LED. In addition, in order to improve the brightness of LED, two or more PWM modulation signals with different phases are used to drive the same lamp together, where different PWM modulation signals come from different LED driving devices. However, each LED driving device cannot output PWM modulation signals with exactly the same phase, which causes the LED to flicker easily when working. Summary of the invention
[0004] The embodiments of the present application provide a PWM phase synchronization method, device, equipment and medium, which can solve the problem that LEDs are prone to flickering when working. To achieve this purpose, the embodiments of the present application provide the following solutions.
[0005] According to one aspect of an embodiment of the present application, a PWM phase synchronization method is provided, which is used for any LED driving device connected to a control device via a serial data line, comprising:
[0006] receiving target data, wherein the target data includes at least one of control data and synchronization data;
[0007] If it is determined that the first preset condition is currently met, synchronization data is sent and PWM phase correction is performed. The first preset condition includes that the current-level LED driver device generates synchronization data or receives synchronization data based on the control data sent by the control device, and the received synchronization data is sent by the control device or the previous-level LED driver device.
[0008] In a possible implementation, the current-stage LED driving device generates synchronization data based on control data sent by the control device, including:
[0009] receiving control data, the control data comprising an identification code;
[0010] If it is determined according to the identification code that a second preset condition is met, the current-stage LED driving device generates synchronization data for triggering PWM phase correction, wherein the second preset condition includes determining according to the identification code that the current-stage LED driving device is the first LED driving device.
[0011] In a possible implementation, the current-stage LED driving device generates synchronization data for triggering PWM phase correction, including:
[0012] The current-stage LED driving device generates the synchronization data after the control device sends the control data or at a first preset time interval.
[0013] In a possible implementation manner, determining that the first preset condition is currently satisfied includes:
[0014] receiving target data sent by the control device, and detecting whether the target data includes synchronization data, wherein the synchronization data is sent by the control device during the control data sending process or after the control device sends the control data;
[0015] If the synchronization data is detected, it is determined that the first preset condition is met.
[0016] In a possible implementation, the sending of synchronization data includes:
[0017] If it is determined according to the connection information that the current-stage LED driving device is connected to the next-stage LED driving device, the synchronization data is sent to the next-stage LED driving device, and the connection information includes information indicating whether the next-stage LED driving device is connected.
[0018] In a possible implementation, the performing PWM phase correction includes:
[0019] The phase of the PWM signal is adjusted to a preset phase, and the PWM signal is generated based on the preset phase modulation.
[0020] According to one aspect of an embodiment of the present application, a PWM phase synchronization method is provided, which is used for a control device connected to an LED driving device via a serial data line, and the method includes:
[0021] Send target data to the LED driving device, the target data including any one of control data and synchronization data, receive the target data, and if it is determined that the first preset condition is currently met, send the synchronization data, and the object for PWM phase correction is the LED driving device, the first preset condition includes that the current-level LED driving device generates synchronization data or receives synchronization data based on the control data sent by the control device, and the received synchronization data is sent by the control device or the previous-level LED driving device.
[0022] According to one aspect of an embodiment of the present application, a PWM phase synchronization device is provided, comprising:
[0023] A receiving module, used to receive target data and detect whether a first preset condition is currently met; the target data includes at least one of control data and synchronization data;
[0024] A phase correction module, used to send synchronization data and perform PWM phase correction if it is determined that a first preset condition is currently met, the first preset condition including that the current-level LED driver device generates synchronization data or receives synchronization data based on the control data sent by the control device, and the received synchronization data is sent by the control device or the previous-level LED driver device; or a target data sending module, used to send target data to the LED driver device, the target data including any one of control data and synchronization data, receive the target data, and send synchronization data if it is determined that the first preset condition is currently met, and the object for performing PWM phase correction is the LED driver device, the first preset condition including that the current-level LED driver device generates synchronization data or receives synchronization data based on the control data sent by the control device, and the received synchronization data is sent by the control device or the previous-level LED driver device.
[0025] The present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described above.
[0026] According to another aspect of the embodiments of the present application, a computer storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described above are implemented.
[0027] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0028] The present application provides a PWM phase synchronization method. Specifically, an LED driving device receives target data. If it is determined that a first preset condition is currently met, synchronization data is transmitted, and PWM phase correction is performed. After receiving the target data, the embodiment of the present application detects whether the first preset condition is currently met based on the control data or synchronization data in the target data. If it is determined that the first preset condition is met, synchronization data is transmitted, and PWM phase correction is performed. The embodiment of the present application can synchronously perform PWM phase correction when driving LEDs, thereby maintaining the consistency of PWM phases of different LED driving devices, eliminating the flickering problem of lamps, and improving the display effect of lamps. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following is a brief introduction to the drawings required for use in describing the embodiments of the present application.
[0030] Figure 1 A flow chart of a PWM phase synchronization method provided in an embodiment of the present application;
[0031] Figure 2 A flowchart of solution 1 of the PWM phase synchronization method provided in an embodiment of the present application;
[0032] Figure 3 A flowchart of scheme 2 of the PWM phase synchronization method provided in an embodiment of the present application;
[0033] Figure 4 A schematic diagram of synchronous data transmission in a PWM phase synchronization method provided in an embodiment of the present application;
[0034] Figure 5 A schematic diagram of PWM phase correction of a PWM phase synchronization method provided in an embodiment of the present application;
[0035] Figure 6 A structural diagram of a device applying a PWM phase synchronization method provided in an embodiment of the present application;
[0036] Figure 7 Another flow chart of the PWM phase synchronization method provided in an embodiment of the present application;
[0037] Figure 8 A structural diagram of a PWM phase synchronization device provided in an embodiment of the present application;
[0038] Fig. 9 Another structural diagram of the PWM phase synchronization device provided in an embodiment of the present application;
[0039] Fig.10 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.
[0041] It will be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application refer to that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation as other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the one element may be directly connected or coupled to the other element, or it may refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein indicates at least one of the items defined by the term, for example, "A and / or B" indicates that it is implemented as "A", or is implemented as "A", or is implemented as "A and B".
[0042] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0043] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present invention and the technical effects produced by the technical solutions of the present invention. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.
[0044] When two or more PWM modulation signals with different phases drive the same lamp together, the lamp will flicker due to the PWM phase difference of its different LED driver devices. To solve this problem, the same LED driver device is often used to generate two or more PWM modulation signals to drive the same lamp, that is, the same LED driver device is used to synchronize the phases of two or more PWM signals. This method will increase the workload of the LED driver device, increase its power consumption, and generate a lot of heat. The LED driver device is arranged in a small space, and the heat generated is difficult to dissipate quickly, which is easy to cause heat accumulation and damage the LED driver device and the lamp.
[0045] The PWM phase synchronization method, device, equipment and medium provided in the present application are intended to solve at least one technical problem existing in the prior art.
[0046] A PWM phase synchronization method is provided in an embodiment of the present application. Optionally, the method is used for any LED driver device connected to a control device via a serial data line, and data transmission between the LED driver device and the control device can be performed via at least one data transmission protocol such as a single line zero code (SID) protocol, an I2C protocol, an SPI protocol, a DMX512 protocol, etc.
[0047] Optionally, two or more LED driving devices are also connected via a serial data line, and the data transmission between the driving devices can also be carried out using at least one data transmission protocol such as Single Line Zero Code (SID) protocol, I2C protocol, SPI protocol, DMX512 protocol, etc.
[0048] like Figure 1-Figure 6 As shown, the PWM phase synchronization method includes steps S101-S102.
[0049] S101: Receive target data.
[0050] Optionally, the target data includes at least one of control data and synchronization data.
[0051] Optionally, the control data is sent from the control device to the LED driving device, and the synchronization data can be sent from the control data to the LED driving device, or can be generated by the first LED driving device and sent to other LED driving devices in a step-by-step forwarding manner.
[0052] Optionally, the control data includes an identification code (the function of the identification code is, first, to allow the LED device to determine whether it is the first LED driver device, and second, to serve as a data header check to determine whether the data is control data or synchronization data to prevent receiving erroneous data), and it may also include at least one control data related to LED light emission, such as lamp color and brightness. The control device sends the control data to the LED driver device, and each LED driver device controls the LED light emission according to the corresponding control data.
[0053] Optionally, the LED driver devices are connected via a serial data line, and the control device can be connected to one of the LED driver devices to transmit the control data to the connected LED driver device. After receiving the control data, the LED driver device transmits the control data in a step-by-step forwarding manner. Accordingly, the control data received by the LED driver device can be transmitted by the control device or by the corresponding upper-level LED driver device. The control device can also be connected to each LED driver device to transmit the control data to each LED driver device at the same time.
[0054] Optionally, the current-level LED driver device receives control data, including: receiving target data transmitted by the control device or the previous-level LED driver device, identifying and storing the control data corresponding to the current-level LED driver device in the target data; if it is determined that the current-level LED device is connected to the next-level LED driver device, the control data used to control the next-level LED driver device is transmitted to the next-level LED driver device.
[0055] Among them, the LED driving devices are connected in sequence, and the single-line return-to-zero code protocol is used for data transmission between the LED driving devices and the control devices. The LED driving device connected to the control device receives the target data transmitted by the control device through the single-line return-to-zero code protocol, parses the target data, and if it is determined that the target data is control data, identifies the identification code, lamp color, brightness and other data in the control data. The LED driving device can obtain its own device type according to the identification code, and the device type includes any one of the first LED driving device and the non-first LED driving device, so as to facilitate the subsequent judgment of whether to generate synchronization data. The LED driving device receives the control data and stores the control data corresponding to itself. And transmits the control data related to the next-level LED driving device to the next-level LED driving device.
[0056] Optionally, in addition to the control data for controlling the next-stage LED driver device, the current-stage LED driver device may also transmit all control data not corresponding to the current-stage LED driver device to the next-stage LED driver device, thereby realizing the stage-by-stage forwarding of control data.
[0057] In one embodiment, Figure 4 As shown, the LED driver device includes LED driver device #1, LED driver device #2, and LED driver device #3. LED driver device #1 is connected to the control device. The control device inputs the control data corresponding to the LED driver device (including #1 control data, #2 control data, #3 control data, and #n control data) to LED driver device #1 through the DIN port of LED driver device #1. LED driver device #1 stores its corresponding #1 control data and transmits the remaining control data (control data used to control other LED driver devices) to the next-level LED driver device (LED driver device #2) through the OUT port. After receiving the control data, LED driver device #2 stores its corresponding #2 control data and transmits #3 control data and #n control data to LED driver device #3. The control data is forwarded step by step in the above manner, so that each LED driver device can obtain its corresponding control data.
[0058] Optionally, identifying and storing control data in the data includes: decoding the target data, identifying the control data according to the identification code, and caching the control data corresponding to the LED device of the current level.
[0059] In one embodiment, Figure 6 As shown, the LED driving device includes a data protocol decoding module and a control data caching module. The LED driving device transmits the received control data to the data protocol decoding module, the data protocol decoding module decodes the control data, and transmits the decoding result to the control data caching module, and the control data is cached by the control data caching module.
[0060] Optionally, after receiving the control data, the LED driver device may also determine whether it is necessary to identify its own device type through an identification code based on pre-stored information. If it is determined based on the pre-stored information that it is not necessary to identify its own device type through an identification code, the device type is not identified based on the identification code. Two identification codes may also be set, one of which can be used to determine the device type and the other cannot be used to determine the device type. The control device selects an identification code and inputs a corresponding identification code to the LED driver device based on the received instructions or actual needs.
[0061] S102: If it is determined that the first preset condition is currently met, synchronization data is sent and PWM phase correction is performed.
[0062] Optionally, the first preset condition includes that the current-level LED driver device generates synchronization data or receives synchronization data based on the control data sent by the control device, the received synchronization data is sent by the control device or the previous-level LED driver device, and the connection information includes information indicating whether the next-level LED driver device is connected.
[0063] Optionally, the current-stage LED driver device generates synchronization data based on the control data sent by the control device, including: receiving the control data sent by the control device, the control data including an identification code; if it is determined according to the identification code that a second preset condition is met, the current-stage LED driver device generates synchronization data for triggering PWM phase correction, the second preset condition including determining according to the identification code that the current-stage LED driver device is the first LED driver device. If it is determined that the current-stage LED driver device does not meet the second preset condition, the current-stage LED driver device does not generate synchronization data, and receives synchronization data sent by the previous-stage LED driver device or the control device.
[0064] In one embodiment, the synchronization data is data that triggers the LED driving device to perform phase correction. When the LED driving device generates the synchronization data or receives the synchronization data, the LED driving device performs PWM phase correction.
[0065] Optionally, if the LED driver device does not obtain its own device type through the identification code, the LED driver device itself does not generate synchronization data, and the control device sends synchronization data to one or more LED driver devices. The LED driver device that receives the synchronization data performs PWM phase correction and forwards the synchronization data to the LED driver device that has not received the synchronization data.
[0066] Optionally, determining that the first preset condition is currently satisfied includes: receiving target data sent by the control device, detecting whether the target data includes synchronization data, where the synchronization data is sent by the control device during the control data sending process or after the control device sends the control data; if the synchronization data is detected, determining that the first preset condition is satisfied. If the synchronization data is not detected, determining that the first preset condition is not satisfied, and not performing PWM phase synchronization until the synchronization data is received.
[0067] Optionally, when forwarding synchronization data, in order to reduce invalid operations, sending synchronization data includes: if it is determined according to the connection information that the current-level LED driver device is connected to the next-level LED driver device, then sending the synchronization data to the next-level LED driver device, and the connection information includes information indicating whether the next-level LED driver device is connected. It is also possible not to determine whether the next-level LED driver device is connected according to the connection information, and each LED driver device automatically forwards the synchronization data after receiving the synchronization data.
[0068] In one embodiment, Figure 4 As shown, the first LED driving device sends synchronization data after receiving the control data or at a first preset time interval, and other LED driving devices receive the synchronization data, forward the synchronization data, and perform PWM phase correction, wherein the number of the synchronization data can be two.
[0069] Optionally, in order to avoid data transmission errors, when transmitting data via the single-line return-to-zero code protocol, the first preset time interval is greater than 90 microseconds (i.e., greater than the RESET time of the protocol). The first preset time interval is used to complete PWM phase correction within the minimum resolution time of the human eye, thereby avoiding lamp flickering.
[0070] Optionally, the control device or the first LED driving device may send data in a mixed manner of control data and synchronization data, or may send synchronization data after sending all control data. The LED driving device receives the synchronization data and synchronously forwards the synchronization data.
[0071] Optionally, the LED driving device may include a PWM synchronization signal decoding module and a PWM modulation module. The PWM synchronization signal decoding module decodes the synchronization data and outputs a synchronization mark to the PWM modulation module. At the same time, the module shapes the PWM synchronization data to solve the problem of data transmission attenuation. The PWM modulation module outputs a PWM signal and receives a synchronization mark, and corrects the phase corresponding to the PWM signal according to the synchronization mark.
[0072] Optionally, the LED driving device may further include a PWM synchronization signal generating module, which is used to generate and send synchronization data. The PWM synchronization signal generating module may be provided only on the LED driving device whose device type is the first LED driving device.
[0073] Optionally, performing PWM phase correction includes: adjusting the phase of the PWM signal to a preset phase, and generating the PWM signal based on the preset phase modulation.
[0074] In one embodiment, the preset phase may be a 0 phase, such as Figure 5 As shown, all LED driving devices adjust the phase of the PWM signal to the same phase and generate the PWM signal based on the phase.
[0075] After receiving the target data, the embodiment of the present application detects whether the first preset condition is currently met according to the control data or synchronization data in the target data. If it is determined that the first preset condition is met, the synchronization data is transmitted and PWM phase correction is performed. The embodiment of the present application can synchronously perform PWM phase correction when driving LEDs, thereby maintaining the consistency of PWM phases of different LED driving devices, eliminating the flickering problem of lamps, and improving the display effect of lamps.
[0076] In one embodiment, Figure 2 As shown, the working process of the PWM phase synchronization method of the present application is as follows:
[0077] The control device and the LED driver device communicate with each other via a single-line return-to-zero code protocol. The control device uses the signal data transmission line to send control data, which includes identification codes, lamp color, brightness and other data.
[0078] After the control device finishes sending data, the LED driver device identifies the identification code, lamp color, brightness and other control data on the signal data transmission line, and identifies whether it is the first LED driver device based on the identification code. Among them, the identification code corresponding to the first LED driver device is inconsistent with the identification code of the non-first LED driver device.
[0079] The first LED driver device sends synchronization data after the control device finishes sending the control data or at a first preset time interval (the first preset time interval is greater than 90us (and greater than the RESET time of the SID protocol)) (the first LED driver device can send data in a mixed manner of synchronization data and control data, or it can do so after all control data are sent).
[0080] After receiving the synchronization data, all non-first LED driving devices correct the PWM phase (PWM phase correction means that all driving devices modulate PWM from a preset phase (such as 0 phase) to generate a PWM signal) to achieve PWM phase synchronization.
[0081] In one embodiment, Figure 3 The working process of the PWM phase synchronization method is as follows:
[0082] The control device sends the identification code, lamp color, brightness and other control data through the signal data transmission line, and sends the synchronization data once every set time interval. The synchronization data can be sent during or after the control data is sent. After receiving the control data and synchronization data, all LED driving devices perform PWM phase correction to achieve PWM phase synchronization.
[0083] Through the examples of this application, the technical problem in the prior art that PWM modulation signals of different LED driving devices drive the same LED lamp PWM asynchronously, causing the lamp to jitter can be solved, thereby improving the display effect of the LED lamp.
[0084] According to one aspect of the present application, the present application also provides a PWM phase synchronization method, which is used for a control device connected to an LED driving device via a serial data line, such as Figure 7 As shown, the PWM phase synchronization method includes:
[0085] S201. Send target data to an LED driving device.
[0086] Optionally, the target data includes any one of control data and synchronization data. The target data is received. If it is determined that the first preset condition is currently met, the synchronization data is sent, and the object for PWM phase correction is an LED driver device. The first preset condition includes that the current-level LED driver device generates synchronization data or receives synchronization data based on the control data sent by the control device, and the received synchronization data is sent by the control device or the previous-level LED driver device.
[0087] Optionally, the current-level LED driver device generates synchronization data based on the control data sent by the control device, including: receiving control data, the control data including an identification code; if it is determined according to the identification code that a second preset condition is met, the current-level LED driver device generates synchronization data for triggering PWM phase correction, and the second preset condition includes determining according to the identification code that the current-level LED driver device is the first LED driver device.
[0088] Optionally, the current-level LED driver device generates synchronization data based on the control data sent by the control device, including: receiving control data, the control data including an identification code; if it is determined according to the identification code that a second preset condition is met, the current-level LED driver device generates synchronization data for triggering PWM phase correction, and the second preset condition includes determining according to the identification code that the current-level LED driver device is the first LED driver device.
[0089] Optionally, the determination that the first preset condition is currently met includes: receiving target data sent by the control device, detecting whether the target data includes synchronization data, the synchronization data being sent by the control device during the control data sending process or after the control device sends the control data; if the synchronization data is detected, it is determined that the first preset condition is met.
[0090] Optionally, sending synchronization data includes: if it is determined based on connection information that the current-level LED driving device is connected to the next-level LED driving device, sending the synchronization data to the next-level LED driving device, and the connection information includes information indicating whether the next-level LED driving device is connected.
[0091] Optionally, performing PWM phase correction includes: adjusting the phase of the PWM signal to a preset phase, and generating the PWM signal based on the preset phase modulation.
[0092] It should be noted that in the optional embodiments of the present application, the data involved (such as control data, synchronization data, connection information, etc.) when the above embodiments of the present application are applied to specific products or technologies, need to obtain permission or consent from the user, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions. In other words, if the embodiments of the present application involve data related to the object, these data need to be obtained with the authorization and consent of the object and in compliance with the relevant laws, regulations and standards of the country and region.
[0093] In an optional embodiment, a PWM phase synchronization device is provided, such as Figure 8As shown, the PWM phase synchronization device 300 includes: a receiving module 301 and a phase correction module 302, wherein the receiving module 301 is used to receive target data and detect whether a first preset condition is currently met; the target data includes at least one of control data and synchronization data; the phase correction module 302 is used to send synchronization data and perform PWM phase correction if it is determined that the first preset condition is currently met, and the first preset condition includes that the current-level LED driving device generates synchronization data or receives synchronization data based on the control data sent by the control device, and the received synchronization data is sent by the control device or the previous-level LED driving device.
[0094] or, as Fig. 9 As shown, the PWM phase synchronization device 300 includes a target data sending module 303, which is used to send target data to the LED driving device. The target data includes any one of control data and synchronization data. The LED driving device is an object for receiving the target data. If it is determined that the first preset condition is currently met, the synchronization data is sent and PWM phase correction is performed. The first preset condition includes that the current-level LED driving device generates synchronization data or receives synchronization data based on the control data sent by the control device, and the received synchronization data is sent by the control device or the previous-level LED driving device.
[0095] Optionally, the current-level LED driver device generates synchronization data based on the control data sent by the control device, including: receiving control data, the control data including an identification code; if it is determined according to the identification code that a second preset condition is met, the current-level LED driver device generates synchronization data for triggering PWM phase correction, and the second preset condition includes determining according to the identification code that the current-level LED driver device is the first LED driver device.
[0096] Optionally, the current-level LED driver device generates synchronization data based on the control data sent by the control device, including: receiving control data, the control data including an identification code; if it is determined according to the identification code that a second preset condition is met, the current-level LED driver device generates synchronization data for triggering PWM phase correction, and the second preset condition includes determining according to the identification code that the current-level LED driver device is the first LED driver device.
[0097] Optionally, determining whether the first preset condition is currently met includes: receiving target data sent by the control device, detecting whether the target data includes synchronization data, the synchronization data being sent by the control device during the control data sending process or after the control device sends the control data; if the synchronization data is detected, determining that the first preset condition is met.
[0098] Optionally, sending synchronization data includes: if it is determined based on connection information that the current-level LED driving device is connected to the next-level LED driving device, sending the synchronization data to the next-level LED driving device, and the connection information includes information indicating whether the next-level LED driving device is connected.
[0099] Optionally, performing PWM phase correction includes: adjusting the phase of the PWM signal to a preset phase, and generating the PWM signal based on the preset phase modulation.
[0100] In an optional embodiment, an electronic device is provided, such as Fig.10 As shown, Fig.10 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.
[0101] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0102] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0103] Memory 4003 can be ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or it can be EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disc, optical disk, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage medium, other magnetic storage devices or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation here.
[0104] The memory 4003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the above method embodiment.
[0105] The electronic device may be any electronic product that can interact with an object, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device, etc. It may also be an LED-related control device or an LED driver device.
[0106] The electronic device may also include a network device and / or an object device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of hosts or network servers based on cloud computing.
[0107] The network where the electronic device is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), etc.
[0108] An embodiment of the present application provides a computer storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.
[0109] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that shown or described in the drawings.
[0110] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.
[0111] The above is only an optional implementation method for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.
Claims
1. A PWM phase synchronization method, characterized in that: Any LED driver device connected to a control device via a serial data line, including: receiving target data, wherein the target data includes at least one of control data and synchronization data; If it is determined that the first preset condition is currently met, synchronization data is sent and PWM phase correction is performed. The first preset condition includes that the current-level LED driver device generates synchronization data or receives synchronization data based on the control data sent by the control device, and the received synchronization data is sent by the control device or the previous-level LED driver device.
2. The method according to claim 1, characterized in that The current-stage LED driving device generates synchronization data based on the control data sent by the control device, including: receiving control data, the control data comprising an identification code; If it is determined according to the identification code that a second preset condition is met, the current-stage LED driving device generates synchronization data for triggering PWM phase correction, wherein the second preset condition includes determining according to the identification code that the current-stage LED driving device is the first LED driving device.
3. The method according to claim 2, characterized in that The current-stage LED driving device generates synchronization data for triggering PWM phase correction, including: The current-stage LED driving device generates the synchronization data after the control device sends the control data or at a first preset time interval.
4. The method according to claim 1, characterized in that: The determining that the first preset condition is currently satisfied includes: receiving target data sent by the control device, and detecting whether the target data includes synchronization data, wherein the synchronization data is sent by the control device during the control data sending process or after the control device sends the control data; If the synchronization data is detected, it is determined that the first preset condition is met.
5. The method according to claim 1, characterized in that The sending of synchronization data comprises: If it is determined according to the connection information that the current-stage LED driving device is connected to the next-stage LED driving device, the synchronization data is sent to the next-stage LED driving device, and the connection information includes information indicating whether the next-stage LED driving device is connected.
6. The method according to claim 1, characterized in that The PWM phase correction comprises: The phase of the PWM signal is adjusted to a preset phase, and the PWM signal is generated based on the preset phase modulation.
7. A PWM phase synchronization method, characterized in that: A control device connected to an LED driving device via a serial data line, the method comprising: Send target data to the LED driving device, the target data including any one of control data and synchronization data, receive the target data, and if it is determined that the first preset condition is currently met, send the synchronization data, and the object for PWM phase correction is the LED driving device, the first preset condition includes that the current-level LED driving device generates synchronization data or receives synchronization data based on the control data sent by the control device, and the received synchronization data is sent by the control device or the previous-level LED driving device.
8. A PWM phase synchronization device, characterized in that: include: A receiving module, used to receive target data and detect whether a first preset condition is currently met; The target data includes at least one of control data and synchronization data; A phase correction module, configured to send synchronization data and perform PWM phase correction if it is determined that a first preset condition is currently met, wherein the first preset condition includes that the current-level LED driving device generates synchronization data or receives synchronization data based on the control data sent by the control device, and the received synchronization data is sent by the control device or the previous-level LED driving device; or A target data sending module is used to send target data to an LED driving device, wherein the target data includes any one of control data and synchronization data. The target data is received, and if it is determined that a first preset condition is currently met, the synchronization data is sent, and the object for PWM phase correction is the LED driving device. The first preset condition includes that the current-level LED driving device generates synchronization data or receives synchronization data based on the control data sent by the control device, and the received synchronization data is sent by the control device or the previous-level LED driving device.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.
10. A computer storage medium comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.