Light strip control circuit and device
Through the symbol mapping unit and control state machine in the light strip control circuit, the control data of the light strip is converted into PWM control waves, which solves the problems of MCU resource occupancy, high cost and high power consumption in the prior art, and realizes high-performance, low-power and low-cost light strip control.
Patent Information
- Application Number
- CN202210939927.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-05
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-08-05
AI Technical Summary
The existing LED light strip control method occupies a lot of MCU resources, has low performance, high cost and large power consumption, and requires special light strip drive chips and supporting circuits.
The symbol mapping unit and a control state machine are used to convert the control data of the light strip into PWM control waves, eliminating the dedicated MCU and its supporting circuits to directly control the luminous state of the light strip.
It realizes high-performance, low-power, and low-cost light strip control, saving resources.
Smart Images

Figure CN115397064B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a light strip control circuit and device. Background Art
[0002] The continuous advancement of LED (Light Emitting Diode) technology has driven the development of LED decoration, spawning a series of new technologies and products, including the emergence of light strips. LED light strips are now widely used not only to illuminate iconic buildings, towers, bridges, parks, and squares, but have also become a key component of industrial design to attract customers.
[0003] The current control method for LED light strips requires a dedicated light strip driver chip, and software controls the IO (Input / Output) timing of the dedicated light strip driver chip to simulate the light strip IC (Integrated Circuit Chip) timing, thereby controlling the light state of the light strip.
[0004] However, current light strip control methods occupy a large amount of MCU (Micro Controller Unit), have low performance, and require the preparation of a dedicated light strip driver chip and its supporting circuits, which are costly and consume a lot of power. Summary of the Invention
[0005] The embodiments of the present application provide a light strip control circuit and device, which can achieve low-power consumption, high-performance and low-cost control of the light strip.
[0006] In a first aspect, an embodiment of the present application provides a light strip control circuit, including a symbol mapping unit and a control state machine.
[0007] The control state machine is configured to determine a state of the symbol mapping unit, wherein the state includes a data transmission state;
[0008] The code element mapping unit is used to convert the control data of the light strip into a PWM (Pulse Width Modulation) control wave in the data sending state, and write the PWM control wave into the light strip to control the lighting state of the light strip.
[0009] In a second aspect, an embodiment of the present application provides a light strip control device, comprising a memory, a memory access unit, a processing unit, and the aforementioned circuit, wherein the memory, the memory access unit, and the processing unit are all connected to the high-performance bus AHB, the circuit is connected to the AHB via a peripheral bus APB, and the circuit is communicatively connected to the memory access unit;
[0010] The processing unit is configured to generate configuration data of the circuit and the memory access unit, and send the configuration data of the circuit to the circuit through the AHB and the APB, and send the configuration data of the memory access unit to the memory access unit through the AHB;
[0011] The storage access unit is used to receive a data request sent by the circuit, and in response to the data request, obtain control data of the circuit from the memory through the AHB, and send the control data to the circuit through the AHB and the APB.
[0012] In summary, through the technical solution of the present application, a light strip control circuit and device are provided when controlling a light strip. The light strip control circuit includes a symbol mapping unit and a control state machine. The control state machine is used to determine the state of the symbol mapping unit, which includes a data sending state. The symbol mapping unit is used to convert the control data of the light strip into a pulse width modulation (PWM) control wave in the data sending state, and write the PWM control wave into the light strip to control the light-emitting state of the light strip. Compared with the prior art method of controlling the light-emitting state of the light strip through a dedicated MCU and its supporting circuits, the present application converts the control data of the light strip into a PWM control wave through a symbol mapping unit, and then writes the PWM control wave into the light strip to control the light-emitting state of the light strip. This eliminates the need for a dedicated MCU and its supporting circuits, saves related resources, and can achieve high-performance, low-power, and low-cost control of the light strip's light-emitting state. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0014] Figure 1 A schematic diagram of a light strip structure provided in an embodiment of the present application;
[0015] Figure 2 The IC data refresh timing of a light strip provided in an embodiment of the present application;
[0016] Figure 3 A schematic diagram of a PWM code element provided in an embodiment of the present application;
[0017] Figure 4 Another PWM code element schematic diagram provided in an embodiment of the present application;
[0018] Figure 5Another PWM code element schematic diagram provided in an embodiment of the present application;
[0019] Figure 6 A schematic diagram of the instruction structure of a light strip IC chip provided in an embodiment of the present application;
[0020] Figure 7 A schematic diagram of an existing light strip control method provided in an embodiment of the present application;
[0021] Figure 8 A schematic structural diagram of a light strip control circuit provided in an embodiment of the present application;
[0022] Figure 9 A schematic structural diagram of another light strip control circuit provided in an embodiment of the present application;
[0023] Figure 10 A schematic structural diagram of another light strip control circuit provided in an embodiment of the present application;
[0024] Figure 11 A schematic structural diagram of a light strip control circuit provided in an embodiment of the present application;
[0025] Figure 12 A schematic structural diagram of another light strip control circuit provided in an embodiment of the present application;
[0026] Figure 13 A schematic structural diagram of another light strip control circuit provided in an embodiment of the present application;
[0027] Figure 14 A schematic diagram of a jump process of a control state machine in a first mode provided in an embodiment of the present application;
[0028] Figure 15 A schematic diagram of a jump process of a control state machine in a second mode provided in an embodiment of the present application;
[0029] Figure 16 A schematic diagram of a jump process of a control state machine in a third mode provided in an embodiment of the present application;
[0030] Figure 17 A schematic structural diagram of a light strip control device provided in an embodiment of the present application;
[0031] Figure 18 This is a schematic structural diagram of another light strip control device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0033] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or devices.
[0034] The light strip control circuit provided in the embodiment of the present application can be applied to any field that requires light strip control, such as LED pixel screens, LED special-shaped screens, electrical equipment marquees, LED full-color luminous character light strings, LED full-color soft light strips and hard light strips, etc.
[0035] Before introducing the technical solution of this application, the relevant knowledge of the technical solution of this application will be explained below.
[0036] PWM (Pulse Width Modulation) is a technique for digitally controlling analog circuits. Power is supplied to a load in the form of pulses, repeatedly switching the power on and off. The pulse width (also known as the duty cycle) can be varied to adjust the speed of a motor or other controlled object.
[0037] An MCU (Microcontroller Unit), also known as a single-chip microcomputer or MCU, reduces the frequency and specifications of a central processing unit (CPU) and integrates peripherals such as memory, counters, USL (User Show Layer), A / D converter (Analog-to-Digital Converter), UART (Universal Asynchronous Receiver Transmitter), PLC (Programmable Logic Controller), DMA (Direct Memory Access), and even LCD (Liquid Crystal Display) driver circuitry onto a single chip, forming a chip-level computer capable of providing diverse control combinations for different applications. Therefore, an MCU is a MCU chip.
[0038] Direct Memory Access (DMA) provides high-speed data transfer between peripherals and memory, or between memory and memory. DMA allows data to be moved quickly without CPU intervention, freeing up CPU resources for other operations. The two DMA controllers have 12 channels (7 for DMA1 and 5 for DMA2), each dedicated to managing memory access requests from one or more peripherals. An arbiter coordinates the priority of DMA requests.
[0039] GDMA (General Direct Memory Access) is mainly used for data transfer, reducing the CPU's load on data transfer.
[0040] SRAM (Static Random-Access Memory) is a type of RAM. Its "static" nature means that the data stored in it remains permanently as long as the power is on.
[0041] AHB (Advanced High Performance Bus) is a high-performance bus for internal connections within a chip.
[0042] An FSM (Finite State Machine), also known as a state machine, is a mathematical model that represents a finite number of states and the transitions and actions between them. State machines are not only a circuit description tool but also a method of thinking, with widespread application at the system and RTL (Register Transfer Level) levels of circuit design.
[0043] APB (Advanced Peripheral Bus) is a bus that connects peripheral devices inside a chip.
[0044] Burst: Burst transfer / continuous transfer. It refers to the method of continuously transferring data to adjacent memory cells in the same row. As long as the starting address and burst length are specified, the controller will automatically read / write the same number of memory cells at a time without the controller continuously providing column addresses.
[0045] LED light strips are now widely used not only to illuminate iconic buildings, towers, bridges, parks, and plazas, but have also become a key component in attracting clients to industrial design. Due to their high brightness, flexibility, scalability, and vibrant and diverse colors, they are a popular choice for DIY (Do It Yourself) furniture installations, display windows, sign identification, and wayfinding.
[0046] Light strip structure Figure 1 As shown, the control circuit for light strips is typically a daisy-chain, single-wire circuit. Each RGB (Red, Green, Blue) LED contains a light strip IC (control chip), which controls the brightness and current gain of the R / G / B signals. Simply adding or removing LEDs at the end of the light strip can dynamically increase or decrease its length.
[0047] Taking the example of controlling a lamp bead which requires 24-bit data, the IC data refresh timing of the light strip is as follows: Figure 2As shown, there are three LED ICs in the light strip chain, with each 24-bit data element corresponding to one IC refresh. The light strip control circuit sends three 24-bit bursts of data to the light strip. Each LED receives only its own 24-bit data and passes the remaining data to the next LED. After sending three 24-bit bursts of refresh information, a reset level is sent to enable the light strip. Of the 24-bit bursts, eight bits represent the G component (G7G6G5G4G3G2G1G0), eight bits represent the R component (R7R6R5R4R3R2R1R0), and eight bits represent the B component (B7B6B5B4B3B2B1B0). Different combinations of components produce different data, and this data is actually based on logic levels. It's important to note that a logic "1" isn't simply a high level, and a logic "0" isn't simply a low level.
[0048] The control code stream for light strips generally uses PWM control waves with different duty cycles to represent the value 0 or 1. Different light strip ICs define different PWM duty cycles, initial polarity, reset durations, and instruction structures. For example, the MT1815, TM1814, TLC5973, and TLC59731 light strips have different requirements for PWM control waveforms, as follows:
[0049] In the MT1815 type light strip, such as Figure 3 As shown in the figure, the PWM code element first sends a high level and then a low level. The longer time the low level occupies in one code element period represents the 0 code. In the 0 code, T0H=0.295us and T0L=0.595us, where T0H represents the duration of the high level in one period of the 0 code element, and T0L represents the duration of the low level in one period of the 0 code element. The longer time the high level occupies in one code element period represents the 1 code.
[0050] In the PWM wave of TM1814 type light strip, such as Figure 4 As shown, the PWM code element is first sent low and then high. The longer the low level duration in a code element period, the code 0, T0H = 0.89us, T0L = 0.36us; the longer the high level duration in a code element period, the code 1. Specifically, T reset of this IC is high (i.e., the active level is high for one period).
[0051] The value '1' of the light strip control chip TLC5973 and TLC59731 from TI (Texas Instruments) is special. Figure 5 As shown, symbol 1 has two high-level periods in one data cycle, and symbol 0 has one high-level period in one data cycle.
[0052] TI's instruction structure is also relatively special, such as Figure 6 As shown, there is an effective level EOS after every 48 bits.
[0053] The above analysis of light strip ICs shows that data is represented by PWM waves with different duty cycles, representing 0 / 1. Different light strip ICs have different timing requirements, and these timings are also very strict. Traditional PWM wave generators are not up to the task, so the MCU must continuously intervene in the PWM unit or control the GPIO to generate the required bit stream. In real applications, a light strip may have thousands of LEDs, each of which generally requires 24-32 bits of data for control. During the data refresh process, the data flow must be continuous and uninterrupted. Therefore, if a business MCU is used for control, this will consume a large amount of MCU resources. Moreover, since the business MCU needs to handle other business operations when driving the light strip, the excessive load may prevent the entire system from functioning properly.
[0054] Therefore, the existing control method mainly controls the light strip through a dedicated MCU rather than directly mounting it on the business MCU, such as Figure 7 shown.
[0055] However, controlling the light strip through a dedicated MCU requires a dedicated MCU and its supporting circuits, which are costly and consume a lot of power.
[0056] To solve the above-mentioned technical problems, an embodiment of the present application provides a light strip control circuit and device when controlling a light strip. The light strip control circuit includes a symbol mapping unit and a control state machine. The control state machine is used to determine the state of the symbol mapping unit, which includes a data transmission state. The symbol mapping unit is used to convert the control data of the light strip into a pulse width modulation (PWM) control wave in the data transmission state, and write the PWM control wave into the light strip to control the light state of the light strip. Compared with the prior art method of controlling the light state of the light strip through a dedicated MCU and its supporting circuits, the present application converts the control data of the light strip into a PWM control wave through the symbol mapping unit, and then writes the PWM control wave into the light strip to control the light state of the light strip. This eliminates the need for a dedicated MCU and its supporting circuits, saves related resources, and can achieve high-performance, low-power, and low-cost control of the light strip's light state.
[0057] The following describes the technical solutions of the embodiments of the present application in detail through some embodiments. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0058] Figure 8This is a structural diagram of a light strip control circuit provided in an embodiment of the present application.
[0059] like Figure 8 As shown, the circuit includes: a codeword mapping unit and a control state machine, the control state machine is used to determine the state of the codeword mapping unit, the state including the data sending state; the codeword mapping unit is used to convert the control data of the light strip into a pulse width modulation PWM control wave in the data sending state, and write the PWM control wave into the light strip to control the lighting state of the light strip.
[0060] The embodiment of the present application does not impose any specific restrictions on the type of light strip, which can be a single-color light strip or a colored light strip.
[0061] The LEDs in colored light strips are made up of three primary colors: red, green, and blue. By controlling the brightness of these three basic colors, you can create a variety of colors.
[0062] The embodiment of the present application does not impose any specific restriction on the number of lamp beads on the light strip.
[0063] For each lamp bead in the light strip, the embodiment of the present application does not impose any specific restriction on the number of bits required to control the lamp bead.
[0064] In one example, 12 bits are required to control one lamp bead;
[0065] Specifically, when the light strip is a colored light strip, 4 bits represent the G (green) component, G3G2G1G0; 4 bits represent the R (red) component, R3R2R1R0; and 4 bits represent the B (blue) component, B3B2B1B0.
[0066] In another example, controlling one LED requires 24 bits;
[0067] Specifically, when the light strip is a colored light strip, 8 bits represent the G (green) component, G7G6 G5 G4 G3 G2G1 G0; 8 bits represent the R (red) component, R7 R6 R5 R4 R3 R2 R1 R0; and 8 bits represent the B (blue) component, B7B6 B5 B4 B3 B2 B1 B0.
[0068] The resolution of each color is 8 bits, that is, the brightness range is 0 to 255. One lamp bead can present 255×255×255=16777216 colors.
[0069] For example, set the RGB color of the first lamp bead to [15,25,128], and the data representation (GRB) is G[0001 1001]R[0000 1111]B[1000 0000].
[0070] In another example, controlling one LED requires 48 bits. For a multi-color strip, 16 bits represent the G (green) component: G15 G14 G13 G12 G11 G10 G9 G8 G7 G6 G5 G4 G3 G2 G1 G0; 16 bits represent the R (red) component: R15 R14 R13 R12 R11 R10 R9 R8 R7 R6 R5 R4 R3 R2 R1 R0; and 16 bits represent the B (blue) component: B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0.
[0071] The embodiments of the present application do not impose any specific restrictions on the order of data transmission. The data transmission order can be transmitted in the order of GRB. For example, when 24 bits are required to control a lamp bead and the light strip is a colored light strip, the data transmission can be carried out in the order of G7 G6 G5 G4 G3G2 G1 G0 R7 R6 R5 R4 R3 R2 R1 R0 B7 B6 B5 B4 B3 B2 B1 B0. The data transmission can also be transmitted in the order of RGB. For example, when 24 bits are required to control a lamp bead and the light strip is a colored light strip, the data transmission can be carried out in the order of R7 R6 R5 R4 R3 R2 R1 R0 G7 G6 G5 G4 G3 G2 G1 G0 B7 B6 B5B4 B3 B2B1B0.
[0072] Figure 9 This is a schematic structural diagram of another light strip control circuit provided in an embodiment of the present application.
[0073] like Figure 9 As shown, the circuit further includes a cache unit and a request generation unit; the cache unit is used to cache the control data of the light strip;
[0074] The request generating unit is configured to generate a data request when the amount of data cached by the cache unit is less than a preset minimum critical value, wherein the data request is used to request control data of the light strip.
[0075] The embodiment of the present application does not impose any specific restrictions on the type of cache unit.
[0076] In one example, the cache unit is a FIFO (First Input First Output) queue.
[0077] In another example, the cache unit is a LIFO (Last Input First Output) queue.
[0078] Figure 10 This is a schematic structural diagram of another light strip control circuit provided in an embodiment of the present application.
[0079] like Figure 10 As shown, the circuit further includes a register; the register is used to receive configuration data and send the configuration data to the symbol mapping unit; the symbol mapping unit is used to generate a PWM control wave according to the configuration data and the control data.
[0080] Specifically, different light strip ICs have different configuration data, and the configuration data includes at least one of period information of a PWM code element, definition information of a 0 code in a PWM code element, and definition information of a 1 code in a PWM code element.
[0081] The register is used to receive configuration data and send the configuration data to the code element mapping unit; the code element mapping unit converts the control data of the light strip into the corresponding PWM control wave according to the specific configuration information.
[0082] The embodiment of the present application does not impose any specific restrictions on the state of the codeword mapping unit. The state of the codeword mapping unit includes at least one of an idle state (IDLE state), a data sending state (Send Data state), a single frame effective state (Reset state) and an effective state (EOS state).
[0083] In one example, the states of the symbol mapping unit include an idle state, a data sending state, and a single frame valid state.
[0084] In another example, the states of the symbol mapping unit include an idle state, a data sending state, a single frame valid state, and a valid state.
[0085] The embodiment of the present application does not impose any specific restrictions on the jump order between codeword mapping unit states.
[0086] In one example, the symbol mapping unit first jumps from an idle state to a data sending state, and then jumps from the data sending state to a single frame valid state.
[0087] In another example, the symbol mapping unit first jumps from the idle state to the single frame valid state, then jumps from the single frame valid state to the data sending state, and then jumps from the data sending state to the single frame valid state.
[0088] In another example, the codeword mapping unit first jumps from the idle state to the data sending state, then jumps from the data sending state to the effective state, then jumps from the effective state to the data sending state, and then jumps from the data sending state to the single frame effective state.
[0089] It should be understood that the control state machine controls the codeword mapping unit to jump between the idle state, data sending state, single frame valid state and valid state according to the signal sent by the codeword mapping unit, and controls the codeword mapping unit to execute events in the corresponding state.
[0090] In some embodiments, the symbol mapping unit is configured to read control data from the cache unit in a data sending state and convert the read control data into a PWM control wave.
[0091] In some embodiments, the symbol mapping unit is configured to read control data corresponding to a frame of display data of the light strip from the buffer unit in a data sending state.
[0092] The embodiment of the present application does not specifically limit the manner in which the symbol mapping unit reads the control data corresponding to a frame of display data of the light strip from the cache unit. The symbol mapping unit may read the control data corresponding to a frame of display data of the light strip from the cache unit in a single read, or may read the control data corresponding to a frame of display data of the light strip from the cache unit in multiple reads.
[0093] The embodiment of the present application does not impose any specific limitation on the bit width of the cache unit.
[0094] In one example, the bit width of the cache unit is 8 bits.
[0095] In this example, in the data sending state, the symbol mapping unit reads 8 bits of control data from the buffer unit each time.
[0096] In another example, the bit width of the cache unit is 24 bits.
[0097] In this example, in the data sending state, the symbol mapping unit reads 24 bits of control data from the buffer unit each time.
[0098] In another example, the bit width of the cache unit is 32 bits.
[0099] In this example, in the data sending state, the symbol mapping unit reads 32 bits of control data from the buffer unit each time.
[0100] The embodiment of the present application does not impose any specific restrictions on the depth of the cache unit. The depth of the storage unit is used to indicate how much data of a specified bit width the cache unit can store.
[0101] In an example, the cache unit has a depth of 16 bits. When the bit width of the cache unit is 8 bits, the capacity of the cache unit is 16×8 bits.
[0102] In another example, the cache unit has a depth of 256 bits. When the bit width of the cache unit is 8 bits, the capacity of the cache unit is 256×8 bits.
[0103] The embodiment of the present application does not impose any specific limitation on the manner in which the symbol mapping unit converts the control data into a PWM control wave.
[0104] In some embodiments, the symbol mapping unit is used to convert each bit in the control data into a PWM control wave one by one according to the configuration data to obtain the PWM control wave of the light strip.
[0105] In other embodiments, the symbol mapping unit is used to convert each bit in the control data into a PWM control wave according to the configuration data, so as to obtain the PWM control wave of the light strip.
[0106] In an embodiment of the present application, when the light strip includes N lamp beads, N is a positive integer, each lamp bead controls the lighting state through Mbit control data, M is a positive integer, then N×Mbit data is determined as a frame.
[0107] In some embodiments, the state of the symbol mapping unit also includes a single-frame valid state. The symbol mapping unit is further configured to switch the data sending state to the single-frame valid state after detecting that the reading of the control data corresponding to a frame of display data is completed.
[0108] The embodiment of the present application does not impose any specific limitation on the manner in which the symbol mapping unit reads the control data of the light strip from the cache unit.
[0109] In an example, the symbol mapping unit converts all control data read from the cache unit into PWM control waves, and then re-reads the control data from the cache unit.
[0110] Exemplarily, when the bit width of the cache unit is 32 bits, in the data sending state, the symbol mapping unit reads the control data of the 32-bit light strip from the cache unit each time, the symbol mapping unit latches the zero-bit data in the control data of the 32-bit light strip, and the symbol mapping unit converts the zero-bit data into the corresponding PWM control wave. After the conversion is completed, the symbol mapping unit generates a data shift enable pulse signal, updates the zero-bit data, and converts the updated zero-bit data into the corresponding PWM control wave. When the conversion of the 32-bit light strip control data read from the cache unit is completed, the symbol mapping unit generates a data refresh pulse signal, refreshes the control data of the cache unit, re-reads the control data of the light strip in the cache unit, and converts the read control data of the light strip into a PWM control wave. When the amount of data converted by the symbol mapping unit reaches one frame, the control state machine controls the symbol mapping unit to jump from the data sending state to the single frame effective state.
[0111] In another example, the symbol mapping unit converts a portion of the control data read from the buffer unit into a PWM control wave; and then re-reads the control data from the buffer unit.
[0112] Exemplarily, when the bit width of the cache unit is 32 bits, in the data sending state, the symbol mapping unit reads the control data of the 32-bit light strip from the cache unit each time, the symbol mapping unit latches the zero-bit data in the control data of the 32-bit light strip, and the symbol mapping unit converts (maps) the zero-bit data into the corresponding PWM control wave. After the conversion is completed, the symbol mapping unit generates a data shift enable pulse signal, updates the zero-bit data, and converts the updated zero-bit data into the corresponding PWM control wave. When the amount of data converted by the symbol mapping unit reaches a preset amount of data, the symbol mapping unit generates a data refresh pulse signal, refreshes the control data of the cache unit, re-reads the control data of the light strip in the cache unit, and converts the read control data of the light strip into a PWM control wave. When the amount of data converted by the symbol mapping unit reaches one frame, the symbol mapping unit jumps from the data sending state to the single frame effective state.
[0113] In some embodiments, the symbol mapping unit further includes a counter configured to count the time it takes for each bit in the control data to be converted into a PWM control wave.
[0114] Specifically, the symbol mapping unit latches the zero-bit data in the control data of the light strip to enable the counter to be turned on, and the symbol mapping unit converts the zero-bit data into a corresponding PWM control wave.
[0115] When the count value of the counter reaches a preset count value upper limit, the symbol mapping unit generates a data shift enable pulse signal to update the zero-bit data and converts the updated zero-bit data into a corresponding PWM control wave.
[0116] When the conversion of the control data of the light strip read from the cache unit is completed, the code element mapping unit generates a data refresh pulse signal, refreshes the data in the cache unit, re-reads the data in the cache unit, and converts the read control data of the light strip into a PWM control wave. When the amount of data converted by the code element mapping unit reaches one frame, the code element mapping unit jumps from the data sending state to the single frame effective state.
[0117] The embodiment of the present application does not impose any specific limitation on the type of the counter, which can be a 32-bit counter or a 16-bit counter.
[0118] The embodiment of the present application does not impose any specific limitation on the counting method of the counter, which can be an addition counter or a subtraction counter.
[0119] In some embodiments, the state of the symbol mapping unit further includes an idle state, and the symbol mapping unit is further configured to jump from the single frame valid state to the data sending state when it is detected that the number of frames of the PWM control wave converted by the symbol mapping unit from the control data of the light strip is less than a preset target value;
[0120] The codeword mapping unit is further configured to jump from the single-frame effective state to the idle state when it is detected that the number of frames of the PWM control wave converted by the codeword mapping unit from the control data of the light strip is equal to a preset target value.
[0121] For example, it is assumed that the amount of PWM control wave data that the symbol mapping unit needs to convert is 4 frames; in the data sending state, the symbol mapping unit reads the control data of the light strip from the cache unit and converts the control data of the light strip into a PWM control wave. When the amount of data converted by the symbol mapping unit reaches one frame, the symbol mapping unit jumps from the data sending state to the single frame effective state. In the single frame effective state, the symbol mapping unit generates a low level (or high level) to make the one frame of control data converted by the symbol mapping unit valid. When the low level (or high level) lasts for a period of time, the symbol mapping unit will generate a low level (or high level) to make the one frame of control data converted by the symbol mapping unit valid. When the duration reaches the preset cycle time, the codeword mapping unit detects whether the frame number of the control data of the light strip converted by it reaches the preset target value, that is, whether the frame number of the converted control data is equal to 4. If the frame number of the control data of the light strip converted by the codeword mapping unit does not reach 4 frames, the codeword mapping unit jumps from the single-frame effective state to the data sending state, and the codeword mapping unit continues to read the control data of the light strip from the cache unit; if the frame number of the control data of the light strip converted by the codeword mapping unit reaches 4 frames, the codeword mapping unit jumps from the single-frame effective state to the idle state.
[0122] In some embodiments, the cache unit is used to send a non-empty signal to the codeword mapping unit when it detects that the data cached by the cache unit is not empty, and the non-empty signal is used to indicate that the data cached by the cache unit is not empty; the control state machine is used to control the codeword mapping unit to jump from an idle state to a data sending state according to the non-empty signal.
[0123] Figure 11 This is a schematic structural diagram of another light strip control circuit provided in an embodiment of the present application.
[0124] like Figure 11 As shown, the light strip control circuit also includes a data interface; the data interface is used to receive data and send the data to the cache unit when it is determined that the received data is control data, and send the data to the register when it is determined that the received data is configuration data.
[0125] Figure 12 This is a schematic structural diagram of another light strip control circuit provided in an embodiment of the present application.
[0126] like Figure 12 As shown, the light strip control circuit also includes an interrupt generation unit, which is used to generate an interrupt request when the cache unit is underloaded and / or the cache unit is overloaded and / or the number of frames of the light strip control data converted by the codeword mapping unit reaches a preset target value. The interrupt request is used to request the above-mentioned light strip control circuit to stop operating.
[0127] In one example, when the amount of data in the cache unit is overloaded, that is, the amount of data written into the cache unit is greater than the capacity of the cache unit, the symbol mapping unit triggers the interrupt generation unit to generate an interrupt signal, causing the light strip control circuit to stop working.
[0128] In another example, when the data volume of the cache unit is underloaded, that is, the amount of data to be read from the cache unit is greater than the amount of data cached by the cache unit, the code element mapping unit triggers the interrupt generation unit to generate an interrupt signal to stop the light strip control circuit from working.
[0129] In another example, when the number of frames of the light strip control data converted by the symbol mapping unit reaches a preset target value, the interrupt generation unit is triggered to generate an interrupt signal to stop the light strip control circuit from working.
[0130] In another example, when one of the situations in the above three examples occurs, the symbol mapping unit triggers the interrupt generation unit to generate an interrupt signal, so that the light strip control circuit stops working.
[0131] In some embodiments, the light strip control circuit further includes a PWM control wave output interface, wherein the PWM control wave output interface is used to write the PWM control wave converted by the symbol mapping unit into the light strip to control the lighting state of the light strip.
[0132] In some embodiments, the control circuit is integrated into another control chip.
[0133] The embodiment of the present application does not impose any specific restrictions on the specific type of the above-mentioned control chip.
[0134] In one example, the control chip is an ASIC (Application Specific Integrated Circuit) chip. The ASIC chip has high performance and has the advantages of lower power consumption and lower cost than other chips.
[0135] In another example, the control chip is a FPGA (Field Programmable Gate Array).
[0136] Figure 13 This is a structural diagram of a light strip control circuit provided in an embodiment of the present application.
[0137] like Figure 13 As shown, in some embodiments, it is assumed that the light strip control circuit includes a data interface, a cache unit, a register, a request generation unit, a symbol mapping unit, and an interrupt generation unit. The light strip control circuit is APWM, the data interface is apb_if, the cache unit is apwm_fifo, the register is apwm_reg, the request generation unit is dma_req_gen, the symbol mapping unit is apwm_gen, and the interrupt generation unit is int_gen.
[0138] The apb_if receives data and, upon confirming that the received data is configuration data, sends the configuration data to apwm_reg. After receiving the configuration data, apwm_reg writes the configuration data into apwm_gen.
[0139] When the amount of control data of the light strip cached by apwm_fifo is less than the preset minimum critical value (the preset minimum critical value is the low watermark of fifo), apwm_fifo triggers dma_req_gen to generate a data request, which is used to request the control data of the light strip and write the control data of the light strip into apwm_fifo.
[0140] When apwm_fifo is not empty, apwm_fifo generates a non-empty signal and sends the non-empty signal to apwm_gen. After receiving the non-empty signal sent by apwm_fifo, apwm_gen generates a read signal, reads the control data in apwm_fifo, and converts the read control data into a PWM control wave.
[0141] During the APWM operation, when one of the following three situations occurs, int_gen generates an interrupt signal to stop APWM operation.
[0142] When the amount of control data cached in apwm_fifo is overloaded, that is, the amount of data written to apwm_fifo is greater than the capacity of apwm_fifo, apwm_gen triggers int_gen to generate an interrupt signal, causing APWM to stop working.
[0143] When the amount of control data cached in apwm_fifo is underloaded, that is, the amount of data to be read from apwm_fifo is greater than the amount of data cached in apwm_fifo, apwm_gen triggers int_gen to generate an interrupt signal, causing APWM to stop working.
[0144] When the number of frames of the control data of the light strip converted by apwm_gen reaches the preset target value, apwm_gen triggers int_gen to generate an interrupt signal, causing APWM to stop working.
[0145] Different light strip ICs (control chips) have different command structures. Generally, there are three types of command structures, as shown below:
[0146] 1. Datat*N+Reset
[0147] 2. Reset+Datat*N+Reset
[0148] 3. (Data+EOS)*N+Reset
[0149] Among them, N represents the number of lamp beads on a light strip; Data is abbreviated as Dt, which represents the amount of data required to refresh a lamp bead; Reset is abbreviated as Rst, which represents the first level, which is used to indicate that the control data corresponding to a frame of display data of the lamp strip converted by the code element mapping unit is effective or used to indicate that the code element mapping unit will convert the control data corresponding to a frame of display data of the lamp strip; EOS represents the second level, which is used to indicate that the amount of data required to refresh a lamp bead converted by the code element mapping unit is effective.
[0150] The embodiment of the present application does not specifically limit the form of the first level. The first level can be a section of low level or a section of high level.
[0151] The embodiment of the present application does not specifically limit the form of the second level. The second level can be a section of low level or a section of high level.
[0152] In some embodiments, the instruction structure of the light strip IC is Data*N+Reset. At this time, the control state machine controls the code element mapping unit to operate in the first mode (or called the normal mode).
[0153] The jump process of the control state machine in the first mode is described in detail below.
[0154] Figure 14 This is a schematic diagram of the jump process of the control state machine in the first mode provided in an embodiment of the present application.
[0155] like Figure 14 As shown, in the first mode, the states of the symbol mapping unit include an idle state, a data sending state and a single frame valid state.
[0156] In the initial state, the symbol mapping unit is in an idle state. When the cache unit apwm_fifo in the light strip control circuit is empty, apwm_fifo triggers the request generation unit dma_req_gen to generate a data request. The data request is used to request the control data of the light strip and send the control data to the data interface apb_if. When apb_if confirms that the received data is control data, it writes the control data into apwm_fifo.
[0157] When apwm_fifo is not empty, a non-empty signal is generated and sent to the symbol mapping unit apwm_gen. At this time, the control state machine controls apwm_gen to jump from the idle state to the data sending state.
[0158] In the data sending state, apwm_gen generates a read signal to read the control data in apwm_fifo.
[0159] Assuming that the bit width of apwm_fifo is 32 bits, apwm_gen includes a counter, and the target value of the number of frames preset by apwm_gen is 4 frames, then apwm_gen reads 32-bit control data from apwm_fifo each time, apwm_gen latches the zero-bit data in the 32-bit control data, enables the counter, and apwm_gen converts the zero-bit data into the corresponding PWM control wave.
[0160] When the count value of the counter reaches a preset count value upper limit, apwm_gen generates a data shift enable pulse signal to update the zero-bit data and convert the updated zero-bit data into a corresponding PWM control wave.
[0161] After the conversion of the 32-bit control data read from apwm_fifo is completed, apwm_gen generates a data refresh pulse signal, refreshes the data in apwm_fifo, re-reads the data in apwm_fifo, and converts the read control data of the light strip into a PWM control wave. When the amount of data converted by apwm_gen reaches one frame, apwm_gen jumps from the data sending state to the single frame effective state.
[0162] In the single-frame effective state, apwm_gen generates a low level to make the one-frame control data converted by apwm_gen effective. When the duration of the low level reaches the preset cycle time, apwm_gen detects whether the frame number of the control data of the light strip it converted reaches the preset target value, that is, whether the frame number of the converted control data is equal to 4. If the frame number of the control data of the light strip converted by apwm_gen does not reach 4 frames, apwm_gen jumps from the single-frame effective state to the data sending state, and apwm_gen continues to read the control data of the light strip from apwm_fifo; if the frame number of the control data of the light strip converted by apwm_gen reaches 4 frames, apwm_gen jumps from the single-frame effective state to the idle state.
[0163] In some embodiments, the instruction structure of the light strip IC is Reset+Data*N+Reset. At this time, the control state machine controls the code element mapping unit to operate in the second mode (or minority mode).
[0164] The jump process of the control state machine in the second mode is described in detail below.
[0165] Figure 15 This is a schematic diagram of the jump process of the control state machine in the second mode provided in an embodiment of the present application.
[0166] like Figure 15 As shown, in the second mode, the states of the symbol mapping unit include an idle state, a data sending state and a single frame valid state.
[0167] In the initial state, the symbol mapping unit is in an idle state. When the cache unit apwm_fifo in the light strip control circuit is empty, apwm_fifo triggers the request generation unit dma_req_gen to generate a data request. The data request is used to request the control data of the light strip and send the control data to the data interface apb_if. When apb_if confirms that the received data is control data, it writes the control data into apwm_fifo.
[0168] When apwm_fifo is not empty, a non-empty signal is generated and sent to the codeword mapping unit apwm_gen. At this time, the control state machine jumps from the idle state to the single-frame effective state. In the single-frame effective state, apwm_gen generates a low level to indicate that apwm_gen will start converting a frame of control data. When the duration of the low level reaches the preset cycle time, apwm_gen jumps from the single-frame effective state to the data sending state.
[0169] In the data sending state, apwm_gen generates a read signal to read the control data in apwm_fifo.
[0170] Assuming that the bit width of apwm_fifo is 32 bits, apwm_gen includes a counter, and the target value of the number of frames preset by apwm_gen is 4 frames, then apwm_gen reads 32-bit control data from apwm_fifo each time, apwm_gen latches the zero-bit data in the 32-bit control data, enables the counter, and apwm_gen converts the zero-bit data into the corresponding PWM control wave.
[0171] When the count value of the counter reaches a preset count value upper limit, apwm_gen generates a data shift enable pulse signal to update the zero-bit data and convert the updated zero-bit data into a corresponding PWM control wave.
[0172] After the conversion of the 32-bit control data read from apwm_fifo is completed, apwm_gen generates a data refresh pulse signal, refreshes the data in apwm_fifo, re-reads the data in the cache unit, and converts the read control data of the light strip into a PWM control wave. When the amount of data converted by apwm_gen reaches one frame, apwm_gen jumps from the data sending state to the single frame effective state.
[0173] In the single-frame effective state, apwm_gen generates a low level to make the one-frame control data converted by apwm_gen valid. When the duration of the low level reaches the preset cycle time, apwm_gen detects whether the frame number of the control data of the light strip it converted reaches the preset target value, that is, whether the frame number of the converted control data is equal to 4. If the frame number of the control data of the light strip converted by apwm_gen does not reach 4 frames, apwm_gen jumps from the single-frame effective state to the data sending state, and apwm_gen continues to read the control data of the light strip from apwm_fifo; if the frame number of the control data of the light strip converted by apwm_gen reaches 4 frames, apwm_gen jumps from the single-frame effective state to the idle state.
[0174] In some embodiments, the instruction structure of the light strip IC is (Data+EOS)*N+Reset. At this time, the control state machine controls the code element mapping unit to operate in the third mode (or TI mode).
[0175] The jump process of the control state machine in the third mode is described in detail below.
[0176] Figure 16 This is a schematic diagram of the jump process of the control state machine in the third mode provided in an embodiment of the present application.
[0177] like Figure 16As shown, in the third mode, the states of the symbol mapping unit include an idle state, a data sending state, a single frame valid state and a valid state.
[0178] In the initial state, the symbol mapping unit is in an idle state. When the cache unit apwm_fifo in the light strip control circuit is empty, apwm_fifo triggers the request generation unit dma_req_gen to generate a data request. The data request is used to request the control data of the light strip and send the control data to the data interface apb_if. When apb_if confirms that the received data is control data, it writes the control data into apwm_fifo.
[0179] When apwm_fifo is not empty, a non-empty signal is generated and sent to the symbol mapping unit apwm_gen. At this time, the control state machine jumps from the idle state to the data sending state.
[0180] In the data sending state, apwm_gen generates a read signal to read the control data in apwm_fifo.
[0181] Assume that the bit width of apwm_fifo is 32 bits, the data amount for refreshing a lamp bead is 24 bits, apwm_gen includes a counter, and the target value of the preset number of frames of apwm_gen is 4 frames. Then apwm_gen reads 32-bit control data from apwm_fifo each time, and apwm_gen latches the zero-bit data in the 32-bit control data to enable the counter. apwm_gen converts the zero-bit data into the corresponding PWM control wave.
[0182] When the count value of the counter reaches a preset count value upper limit, apwm_gen generates a data shift enable pulse signal to update the zero-bit data and convert the updated zero-bit data into a corresponding PWM control wave.
[0183] When the amount of data converted by apwm_gen into PWM control wave reaches 24 bits, apwm_gen jumps from data sending state to effective state. In effective state, apwm_gen sends a low level to indicate that the 24-bit control data converted by apwm_gen is effective. When the duration of the low level reaches the preset cycle time, apwm_gen jumps from effective state to data sending state; in data sending state, apwm_gen generates a read signal to read the 32-bit control data in apwm_fifo. After apwm_gen converts the 24-bit control data in the 32-bit control data into PWM control wave, it continues to jump to effective state; and so on. When the amount of data converted by apwm_gen reaches one frame, apwm_gen jumps from data sending state to single frame effective state.
[0184] In the single-frame effective state, apwm_gen generates a low level to make the one-frame control data converted by apwm_gen effective. When the duration of the low level reaches the preset cycle time, apwm_gen detects whether the frame number of the control data of the light strip it converted reaches the preset target value, that is, whether the frame number of the converted control data is equal to 4. If the frame number of the control data of the light strip converted by apwm_gen does not reach 4 frames, apwm_gen jumps from the single-frame effective state to the data sending state, and apwm_gen continues to read the control data of the light strip from apwm_fifo; if the frame number of the control data of the light strip converted by apwm_gen reaches 4 frames, apwm_gen jumps from the single-frame effective state to the idle state.
[0185] In summary, through the technical solution of the present application, a light strip control circuit is provided when controlling a light strip. The light strip control circuit includes a symbol mapping unit and a control state machine. The control state machine is used to determine the state of the symbol mapping unit, which includes a data sending state. The symbol mapping unit is used to convert the control data of the light strip into a pulse width modulation (PWM) control wave in the data sending state, and write the PWM control wave into the light strip to control the light-emitting state of the light strip. Compared with the prior art method of controlling the light-emitting state of the light strip through a dedicated MCU and its supporting circuits, the present application converts the control data of the light strip into a PWM control wave through a symbol mapping unit, and then writes the PWM control wave into the light strip to control the light-emitting state of the light strip. This eliminates the need for a dedicated MCU and its supporting circuits, saves related resources, and can achieve high-performance, low-power, and low-cost control of the light strip's light-emitting state.
[0186] Figure 17 This is a structural diagram of a light strip control device provided in an embodiment of the present application.
[0187] like Figure 17 As shown, a light strip control device includes a memory, a storage access unit, a processing unit and the above-mentioned circuit, the memory, the storage access unit and the processing unit are all connected to the high-performance bus AHB, the circuit is connected to the AHB through the peripheral bus APB, and the circuit is communicatively connected to the storage access unit;
[0188] The processing unit is used to generate configuration data of the circuit and the memory access unit, and send the configuration data of the circuit to the circuit through the AHB and the APB, and send the configuration data of the memory access unit to the memory access unit through the AHB;
[0189] The memory access unit is used to receive a data request sent by the circuit, and in response to the data request, obtain control data of the circuit from the memory through the AHB, and send the control data to the circuit through the AHB and APB.
[0190] The embodiments of the present application do not impose any specific restrictions on the type of memory. It can be SRAM (Static Random-Access Memory), DRAM (Dynamic Random Access Memory), or SDRAM (Synchronous Dynamic Random Access Memory).
[0191] The embodiment of the present application does not impose any specific restrictions on the type of storage access unit, which can be either DMA or GDMA.
[0192] In existing light strip control methods, obtaining light strip control data from memory requires the participation of MCU registers. However, the MCU has many tasks to process, and using the MCU to transfer data consumes a large amount of MCU resources. The present embodiment uses GDMA or DMA to obtain light strip control data from memory and writes the control data to the light strip control unit. Transferring light strip control data between memory and the light strip control circuit does not require the participation of the MCU, saving MCU resources and allowing the MCU to focus more on more practical operations, such as calculations and control.
[0193] The embodiment of the present application does not impose any specific restrictions on the manner in which the storage access unit obtains control data from the memory.
[0194] In one example, the storage access unit obtains all control data stored in the memory at one time;
[0195] In another example, the storage access unit obtains all control data from the memory in multiple times.
[0196] In this example, the embodiment of the present application does not impose any specific restrictions on the length of the control data obtained by the storage access unit from the memory each time. The length of the control data obtained by the storage access unit from the memory each time can be defined as a burst length.
[0197] Exemplarily, the total amount of control data is divided into multiple data blocks; for example, if the total amount of control data is 64 bytes, the storage access unit can be divided into two times, and 32 bytes are obtained from the memory each time.
[0198] In traditional transmission methods, a storage access unit needs to provide the row address and column address of each control data in order to obtain control data from the memory. If the storage access unit needs to obtain control data for a row of the memory, it needs to continuously provide the column address. The embodiment of the present application provides a burst transmission method. If the storage access unit needs to obtain control data for a row of the memory, it only needs to provide the row address, the first column address, and the burst length. The control data for a row can be automatically read, thus saving memory control resources and improving data transmission efficiency.
[0199] The embodiment of the present application does not impose any specific restrictions on the type of processing unit.
[0200] In one example, the processing unit is an MCU.
[0201] In another example, the processing unit is a SOC (System on Chip).
[0202] Figure 18 This is a structural diagram of a light strip control device provided in an embodiment of the present application.
[0203] Take the storage access unit as GDMA, the processing unit as MCU, the memory as SRAM, the light strip control circuit as APWM, the APWM including a data interface, a cache unit, a register, a request generation unit, a code element mapping unit and an interrupt generation unit; the data interface is apb_if, the cache unit is apwm_fifo, the register is apwm_reg, the request generation unit is dma_req_gen, the code element mapping unit is apwm_gen, and the interrupt generation unit is int_gen as an example.
[0204] Assume that the light strip includes N lamp beads, and each lamp bead includes an IC chip, such as Figure 18 As shown, SRAM, GDMA and MCU are all connected to the AHB bus, APWM is connected to the AHB bus through the APB bus, and APWM is connected to the GDMA communication;
[0205] The MCU is used to generate the configuration data of APWM and GDMA, and send the APWM configuration data to the APWM data interface through the AHB bus and APB bus, and send the GDMA configuration data to GDMA through the AHB bus;
[0206] GDMA is used to receive data requests sent by APWM, and in response to the data requests, obtain APWM control data from SRAM through the AHB bus, and send the control data to APWM through the AHB bus and APB bus.
[0207] Working process of the light strip control device:
[0208] The MCU configures the GDMA through the AHB bus. Specifically, the MCU writes the configuration data of the GDMA into the GDMA. The configuration data of the GDMA includes information such as the address and length of the control data that the GDMA needs to obtain from the SRAM.
[0209] The MCU configures the APWM through the AHB bus and the APB bus. Specifically, the MCU sends the APWM configuration data to apb_if. When the apb_if confirms that the received data is configuration data, it sends the configuration data to apwm_reg. After receiving the configuration data, apwm_reg writes the configuration data to apwm_gen. The APWM configuration data includes the period information of the PWM code element, the definition information of the 0 code in the PWM code element, and the definition information of the 1 code in the PWM code element.
[0210] When the configured APWM detects that the amount of control data of the light strip cached by apwm_fifo is less than the preset minimum critical value (the preset minimum critical value is the low watermark of fifo), apwm_fifo triggers dma_req_gen to generate a data request (request, abbreviated as req, request signal) and sends the data request to GDMA. The data request is used to request the control data of the light strip.
[0211] After receiving the data request sent by APWM, the configured GDMA obtains the control data from SRAM according to the configured data address and data length, and sends the control data to apb_if through the AHB bus and APB bus. When apb_if confirms that the received data is control data, it writes the control data into apwm_fifo.
[0212] In response to the data request of the APWM, the GDMA sends the control data to the APWM, and then sends an acknowledgement signal (ack) to the APWM. The APWM releases its request based on the ack signal.
[0213] When apwm_fifo is not empty, apwm_fifo generates a non-empty signal and sends the non-empty signal to apwm_gen. After receiving the non-empty signal sent by apwm_fifo, apwm_gen generates a read signal, reads the control data in apwm_fifo, converts the read control data into a PWM control wave, and writes it to the light strip.
[0214] When APWM detects that the amount of control data of the light strip cached in apwm_fifo is less than the preset minimum critical value and the amount of data written by GDMA to apwm_fifo is less than the preset write amount, it generates a data request and sends the data request to GDMA. GDMA obtains the control data from SRAM and writes the control data to apwm_fifo through the AHB bus and APB bus.
[0215] When the amount of control data for the light strip converted by apwm_gen reaches one frame, apwm_gen will generate a valid level (Reset) to make the control data acting on the light strip effective.
[0216] The above steps are repeated in sequence until the number of frames of the light strip control data converted by apwm_gen reaches a preset target value, and apwm_gen triggers int_gen to generate an interrupt request, so that the light strip control device stops working.
[0217] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, a variety of simple modifications can be made to the technical solution of the present application, and these simple modifications all fall within the scope of protection of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner unless there is any contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different embodiments of the present application can also be arbitrarily combined, and as long as they do not violate the ideas of the present application, they should also be regarded as the contents disclosed in the present application.
[0218] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0219] In the several embodiments provided in this application, it should be understood that the disclosed circuits and devices can be implemented in other ways. For example, the circuit embodiments described above are merely illustrative. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of circuits or modules, which can be electrical, mechanical or other forms.
[0220] Modules described as separate components may or may not be physically separate, and components displayed as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected based on actual needs to achieve the purpose of the present embodiment. For example, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module.
[0221] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A light strip control circuit, characterized in that: Including symbol mapping unit and control state machine, The control state machine is configured to determine a state of the symbol mapping unit, wherein the state includes a data transmission state; The symbol mapping unit is configured to convert the control data of the light strip into a pulse width modulation (PWM) control wave in the data sending state, and write the PWM control wave into the light strip to control the lighting state of the light strip; The circuit further includes a cache unit and a request generation unit; the cache unit is used to cache the control data of the light strip; The request generating unit is configured to generate a data request when the amount of data cached by the cache unit is less than a preset minimum critical value, wherein the data request is used to request control data of the light strip; The circuit further includes a register; The register is used to receive configuration data and send the configuration data to the symbol mapping unit; The symbol mapping unit is used to generate the PWM control wave according to the configuration data and the control data.
2. The circuit according to claim 1, wherein: The cache unit is used to send a non-empty signal to the codeword mapping unit when detecting that the data cached by the cache unit is not empty, and the non-empty signal is used to indicate that the data cached by the cache unit is not empty.
3. The circuit according to claim 2, characterized in that Each lamp bead of the light strip includes a control chip, and the instructions of the control chip include Dt*N+Rst or Rst+Dt*N+Rst or (Dt+EOS)*N+Rst; Among them, N represents the number of lamp beads on a lamp strip; Dt represents the amount of data required to refresh a lamp bead; Rst represents a first level, which is used to indicate that the control data corresponding to a frame of display data of the lamp strip converted by the code element mapping unit is effective or used to indicate that the code element mapping unit will convert the control data corresponding to a frame of display data of the light strip; EOS represents a second level, which is used to indicate that the amount of data required to refresh a lamp bead converted by the code element mapping unit is effective.
4. The circuit according to claim 3, characterized in that When the instruction of the control chip includes Dt*N+Rst, the symbol mapping unit operates in the first mode, and the state of the symbol mapping unit further includes an idle state and a single frame valid state; The control state machine is configured to control the symbol mapping unit to jump from the idle state to the data sending state when a non-empty signal sent by the cache unit is detected; The symbol mapping unit is configured to read control data corresponding to a frame of display data of the light strip from the buffer unit in the data sending state, convert the control data into a PWM control wave, and write the PWM control wave into the light strip; The control state machine is further configured to control the symbol mapping unit to jump from the data sending state to the single frame valid state after detecting that the symbol mapping unit has completed converting the control data corresponding to the one frame of display data; The symbol mapping unit is further configured to generate a first level when the single frame is in effect, and send the first level to the light strip, wherein the first level is configured to indicate that control data corresponding to a frame of display data of the light strip converted by the symbol mapping unit is effective; The control state machine is further configured to control the code element mapping unit to jump from the single frame valid state to the data sending state when it is detected that the number of frames of the PWM control wave converted by the code element mapping unit from the control data of the light strip is less than a preset target value; The control state machine is also used to control the code element mapping unit to jump from the single frame effective state to the idle state when it is detected that the number of frames of the PWM control wave converted by the code element mapping unit from the control data of the light strip is equal to a preset target value.
5. The circuit according to claim 4, characterized in that When the instruction of the control chip includes Rst+Dt*N+Rst, the symbol mapping unit operates in the second mode; The control state machine is configured to control the symbol mapping unit to jump from the idle state to the single frame valid state when detecting a non-empty signal sent by the cache unit; The symbol mapping unit is configured to generate the first level when the single frame is in effect, and send the first level to the light strip, wherein the first level is used to instruct the symbol mapping unit to convert the control data corresponding to one frame of display data of the light strip; The control state machine is configured to control the symbol mapping unit to jump from the single frame valid state to the data sending state when detecting that the symbol mapping unit has finished sending the first level.
6. The circuit according to claim 4, characterized in that When the instruction of the control chip includes (Dt+EOS)*N+Rst, the symbol mapping unit operates in the third mode, and the state of the symbol mapping unit further includes an effective state; The control state machine is configured to control the symbol mapping unit to jump from the data sending state to the valid state when detecting that the amount of the control data converted by the symbol mapping unit is equal to the amount of data required to refresh one lamp bead; The symbol mapping unit is further configured to generate a second level in the effective state and send the second level to the light strip, wherein the second level is used to indicate that the amount of data required to refresh one lamp bead converted by the symbol mapping unit is effective; The control state machine is further configured to control the symbol mapping unit to jump from the valid state to the data sending state when detecting that the symbol mapping unit has finished sending the second level; The control state machine is further configured to control the symbol mapping unit to jump from the data sending state to the single frame valid state after detecting that the symbol mapping unit has completed converting the control data corresponding to the one frame of display data.
7. The circuit according to claim 1, wherein: The symbol mapping unit is used to convert each bit in the control data into a PWM control wave one by one according to the configuration data, so as to obtain the PWM control wave of the light strip.
8. The circuit according to claim 1, wherein: The circuit further includes a data interface, the data interface being configured to receive data and, when determining that the data is the control data, send the data to the cache unit; and, when determining that the data is the configuration data, send the data to the register.
9. The circuit according to claim 1, wherein: The circuit also includes an interrupt generation unit, which is used to generate an interrupt request when the cache unit is underloaded and / or the cache unit is overloaded and / or the number of frames of the control data of the light strip converted by the code element mapping unit reaches a preset target value, and the interrupt request is used to request that the circuit stop running.
10. The circuit according to claim 1, wherein: The circuit further includes a PWM control wave output interface, which is used to write the PWM control wave converted by the symbol mapping unit into the light strip to control the lighting state of the light strip.
11. A light strip control device, characterized in that: The device comprises a memory, a memory access unit, a processing unit, and a circuit according to any one of claims 1 to 10, wherein the memory, the memory access unit, and the processing unit are all connected to the high-performance bus AHB, the circuit is connected to the AHB via a peripheral bus APB, and the circuit is communicatively connected to the memory access unit; The processing unit is configured to generate configuration data of the circuit and the storage access unit, and send the configuration data of the circuit to the circuit via the AHB and the APB, and sending the configuration data of the storage access unit to the storage access unit via the AHB; The storage access unit is used to receive a data request sent by the circuit, and in response to the data request, obtain control data of the circuit from the memory through the AHB, and send the control data to the circuit through the AHB and the APB.
Citation Information
Patent Citations
Single-chip digital controller for electric steering engine and unipolar and dipolar modulation control method
CN102053570A
Single-line LED data transmission display method and driving chip
CN110996461A
Control circuit and method for backlight sources, and image display apparatus and lighting apparatus using the same
US20100102752A1