CN112040601B - Lamp dot matrix control device and method and LED stage lamp - Google Patents

Lamp dot matrix control device and method and LED stage lamp Download PDF

Info

Publication number
CN112040601B
CN112040601B CN202010915673.5A CN202010915673A CN112040601B CN 112040601 B CN112040601 B CN 112040601B CN 202010915673 A CN202010915673 A CN 202010915673A CN 112040601 B CN112040601 B CN 112040601B
Authority
CN
China
Prior art keywords
module
pwm output
output value
dot matrix
pwm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010915673.5A
Other languages
Chinese (zh)
Other versions
CN112040601A (en
Inventor
刘建华
张昭荣
江炯同
王惠均
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Caiyi Light Co Ltd
Original Assignee
Guangzhou Caiyi Light Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Caiyi Light Co Ltd filed Critical Guangzhou Caiyi Light Co Ltd
Priority to CN202010915673.5A priority Critical patent/CN112040601B/en
Publication of CN112040601A publication Critical patent/CN112040601A/en
Application granted granted Critical
Publication of CN112040601B publication Critical patent/CN112040601B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B45/00Circuit arrangements for operating light-emitting diodes [LED]
    • H05B45/30Driver circuits
    • H05B45/32Pulse-control circuits
    • H05B45/325Pulse-width modulation [PWM]
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B45/00Circuit arrangements for operating light-emitting diodes [LED]
    • H05B45/30Driver circuits
    • H05B45/37Converter circuits
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/155Coordinated control of two or more light sources
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/16Controlling the light source by timing means
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/165Controlling the light source following a pre-assigned programmed sequence; Logic control [LC]
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/17Operational modes, e.g. switching from manual to automatic mode or prohibiting specific operations
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/175Controlling the light source by remote control
    • H05B47/18Controlling the light source by remote control via data-bus transmission
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/30Semiconductor lamps, e.g. solid state lamps [SSL] light emitting diodes [LED] or organic LED [OLED]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

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

Abstract

The invention relates to a lamp dot matrix control device and method and an LED stage lamp. The lamp dot matrix control device comprises a processing module, a filling module, a triggering module and a direct memory access module. The processing module is used for receiving the channel function data sent by the light console and calculating each PWM output value according to the channel function data; wherein the channel function data comprises a luminaire channel function and a channel value; the filling module is electrically connected with the processing module and used for converting the PWM output value into binary data, storing the binary data in a memory and forming a memory array in the memory; the trigger module is used for periodically generating a trigger signal; the direct memory access module is electrically connected with the trigger module and used for receiving the trigger signal and transmitting the memory array to an external GPIO interface according to the trigger signal, so that a single MCU microprocessor can output a plurality of PWM signal circuits, and the use number and the production cost of the MCU microprocessor are reduced.

Description

Lamp dot matrix control device and method and LED stage lamp
Technical Field
The invention relates to the technical field of lamp control, in particular to a lamp dot matrix control device and method and an LED stage lamp.
Background
At present, most light manufacturers adopt a plurality of Micro Control Units (MCU) to output PWM, so as to realize the point control function of each lamp bead in a Pixel (PIXIE) series lamp. An MCU microprocessor usually has 4-6 timers, that is, 24 paths of PWM signals can be generated at most, and there are timers for other purposes, such as system timing or input capture function, and the available PWM signals are very limited. In addition, this not only increases the number of MCU microprocessors and the cost, but also causes problems of communication and synchronization among multiple MCU microprocessors, and the corresponding control/driver software needs to be optimized for a large amount of synchronization, which further increases the cost.
Disclosure of Invention
The invention provides a lamp dot matrix control device and method and an LED stage lamp, and aims to solve the problem that the cost of a point control function is increased due to the use of a plurality of MCU microprocessors.
The embodiment of the invention provides a lamp dot matrix control device, which comprises:
the processing module is used for receiving channel function data sent by the light console and calculating each PWM output value according to the channel function data; wherein the channel function data comprises a luminaire channel function and a channel value;
the filling module is electrically connected with the processing module and used for converting the PWM output value into binary data, storing the binary data in a memory and forming a memory array in the memory;
the trigger module is used for periodically generating a trigger signal; and
and the direct memory access module is electrically connected with the trigger module and used for receiving the trigger signal and transmitting the memory array to an external GPIO interface according to the trigger signal.
In one embodiment, the PWM output value is PWM duty cycle data.
In one embodiment, the binary data is stored according to a preset rule.
In one embodiment, the padding module for converting the PWM output value into binary data is specifically configured to:
comparing the currently received PWM output value corresponding to the same channel with the PWM output value received last time, and judging whether the two PWM output values are the same;
when it is determined that the two are different, the received PWM output value is converted into binary data.
In one embodiment, the processing module is further configured to configure the direct memory access module to determine a source address, a destination address, and a byte size of a transfer of the direct memory access module.
In one embodiment, the trigger module comprises a timer;
the processing module is further configured to configure the timer, and trigger the direct memory access module when the timer overflows.
Based on the same inventive concept, the embodiment of the invention also provides a lamp dot matrix control method, which comprises the following steps:
receiving channel function data sent by a light console, and calculating each PWM output value according to the channel function data, wherein the channel function data comprise a lamp channel function and a channel value;
converting the PWM output value into binary data, storing the binary data in a memory, and forming a memory array in the memory;
and when a trigger signal is received, transmitting the memory array to an external GPIO interface according to the trigger signal.
In one embodiment, the converting the PWM output value to binary data includes:
comparing the currently received PWM output value corresponding to the same channel with the PWM output value received last time, and judging whether the two are the same;
when it is determined that the two are different, the received PWM output value is converted into binary data.
In one embodiment, the lamp lattice control method further comprises the following steps: before receiving channel function data sent by a light console, configuring the direct memory access module, and determining a source address, a target address and a transmission byte size of the direct memory access module;
and configuring the timer so that the trigger signal is generated after the timer overflows to trigger the direct memory access module to work.
Based on the same inventive concept, the embodiment of the invention also provides an LED stage lamp, which comprises the lamp dot matrix control device of any embodiment.
In summary, the embodiment of the invention provides a lamp dot matrix control device and method and an LED stage lamp. The lamp dot matrix control device comprises a processing module, a filling module, a triggering module and a direct memory access module. The processing module is used for receiving channel function data sent by the light console and calculating each PWM output value according to the channel function data; wherein the channel function data comprises a luminaire channel function and a channel value; the filling module is electrically connected with the processing module and used for converting the PWM output value into binary data, storing the binary data in a memory and forming a memory array in the memory; the trigger module is used for periodically generating a trigger signal; the direct memory access module is electrically connected with the trigger module and used for receiving the trigger signal and transmitting the memory array to an external GPIO interface according to the trigger signal. According to the invention, the PWM output value is converted into binary data and stored in the memory, and the direct memory access module rapidly transmits the memory array to the external GPIO interface, so that all GPIO ports can output analog PWM signals, and further, a single MCU microprocessor can output a plurality of analog PWM signal circuits, thereby meeting a great number of requirements of PIXIE series lamps on PWM signals, reducing the use number of the MCU microprocessors and reducing the production cost.
Drawings
Fig. 1 is an electrical schematic diagram of a lamp dot matrix control device according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a numerical filling method for a RAM array according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a single MCU outputting multiple PWM signals according to an embodiment of the present invention;
fig. 4 is a schematic flow chart of a lamp dot matrix control method according to an embodiment of the present invention;
fig. 5 is a schematic flow chart of another lamp dot matrix control method according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, but rather should be construed as broadly as the present invention is capable of modification in various respects, all without departing from the spirit and scope of the present invention.
Referring to fig. 1, an embodiment of the invention provides a lamp dot matrix control device. The lamp lattice control device comprises a processing module 100, a filling module 200, a triggering module 300 and a direct memory access module 400.
The processing module 100 is configured to receive channel function data sent by a light console, and calculate each PWM output value according to the channel function data; wherein the channel function data comprises a luminaire channel function and a channel value.
The filling module 200 is electrically connected to the processing module 100, and is configured to convert the PWM output value into binary data, store the binary data in a memory, and form a memory array in the memory.
The trigger module 300 is used for periodically generating a trigger signal.
The dma module 400 is electrically connected to the trigger module 300, and is configured to receive the trigger signal and transmit the memory array to an external GPIO interface according to the trigger signal.
It will be appreciated that direct memory access is a high speed method of data transfer, where data can be transferred from one channel directly between the memory or input output device without processing by the MCU. Therefore, in the invention, the PWM output value is converted into binary data and stored in the memory, and the direct memory access module 400 rapidly transmits the memory array to the external GPIO interface, so that all the GPIO ports can output analog PWM signals, and a single MCU microprocessor can output a plurality of analog PWM signal circuits, thereby meeting a large amount of requirements of PIXIE series lamps on the PWM signals, reducing the using amount of the MCU microprocessors and reducing the production cost.
In one embodiment, the Processing module 100 may include an intelligent chip such as an MCU (micro controller Unit), a CPU (Central Processing Unit), a DSP (Digital Signal Processing), or an FPGA (Field Programmable Gate Array). In this embodiment, the processing module 100 includes an MCU, and receives DMX512 data including channel function data and the like sent by the light console through the MCU. After receiving the DMX512 data, the values are assigned to the channels according to the channel table, and the MCU calculates the duty ratio value of each PWM according to the channel function definition (for example, the PWM value of RGBW is the product of RGBW (Red Green Blue and White) channel (i.e. the minimum unit of RGBW control signal) and the Dimmer dimming channel).
In one embodiment, the PWM output value is PWM duty cycle data. It can be understood that in the PIXIE series lighting fixture, the corresponding driving voltage is generated according to the duty ratio of the PWM signal and is provided to the lamp beads in different PIXIE series lighting fixtures. By using Direct Memory Access (DMA), the data between the peripheral and the Memory can be moved quickly by the DMA without intervention of the MCU, and the MCU only needs to store the PWM duty cycle data in a specific RAM. Therefore, a RAM array (i.e., memory array) such as RAM [65536] array may be designed, and this array may be DMA transferred to the GPIO port. And the overflow of the trigger module 300 triggers the DMA to work, and 65536 16-bit data are output to the port at fixed time to form PWM and be configured. This makes it possible to realize that a single MCU outputs many analog PWM signals as shown in (a), (b), and (c) of fig. 2.
In one embodiment, the binary data is stored according to a predetermined rule, as shown in fig. 3. It can be understood that the RAM data is 16 bits, each bit represents a PWM output, 65536 represents that the resolution of each PWM is 16 bits, and the RAM array value filling process is to convert the 16-bit PWM register and store the binary data in the RAM [65536] array for DMA automatic call. In addition, the binary data can also be stored by other rules, for example, uint _8RAM [2048] or uint _32ram [4096], the word length of the RAM array can be 8 bits, 16 bits and 32 bits, each bit represents one path of PWM output, and the size of the array represents the resolution of PWM, and can also be changed arbitrarily, for example, 2048 represents that the PWM waveform has 11-bit gray scale, 4096 represents that the PWM waveform has 12-bit gray scale, and the gray scale is set depending on the size of the RAM resource of the MCU. In addition, each external GPIO interface (such as a PA port) corresponds to a group of PWM values, the PA port has 16 IO ports in total from PA01 to PA16, the IO ports respectively correspond to PWM01 to PWM16, and 16 bits are just the bit length of the defined RAM array, so that 1-bit updating of 16 PWM waveforms is completed each time.
In one embodiment, the padding module 200 for converting the PWM output value into binary data is specifically configured to:
comparing the currently received PWM output value corresponding to the same channel with the PWM output value received last time, and judging whether the two are the same;
when it is determined that the two are different, the received PWM output value is converted into binary data.
It can be understood that, in this embodiment, after receiving the PWM output value, the padding module 200 first compares the currently received PWM output value corresponding to the same channel with the previously received PWM output value, and determines whether the two PWM output values are the same. If the two are the same, the RAM array does not need to be updated. If the two are different, the received PWM output value needs to be converted into binary data, and the binary data is stored in the RAM according to a preset rule. In this embodiment, the currently received PWM output value is compared with the PWM output value received last time, and the received PWM output value is converted into binary data only when the two PWM output values are different, and the memory array is updated, which is beneficial to reducing the data amount to be processed and the load of the MCU.
In one embodiment, the processing module 100 is further configured to configure the direct memory access module 400 to determine a source address, a destination address, and a byte size of a transfer of the direct memory access module 400.
It can be understood that the DMX512 data sent by the light console not only includes channel function data, but also includes configuration information for configuring the direct memory access module 400, so that the direct memory access module 400 transfers the memory array according to the configuration information. In this embodiment, the DMX512 data further includes a source address, a destination address and a byte size of the transmission for specifying the dma module 400. Configuring a DMA in the MCU, and firstly determining a source address and a target address, namely transmitting a memory array from a memory RAM to a peripheral GPIO interface by the DMA; then determining the size of the transmitted byte, wherein the data volume of each transmission of the DMA is variable, and the maximum data volume value is 65536 and is determined by the number of PWM signals required to be output; in addition, it is also necessary to set the DMA transfer mode to the circulation mode in order to generate a continuous PWM signal.
In one embodiment, the trigger module 300 includes a timer; the processing module 100 is further configured to configure the timer, and trigger the direct memory access module 400 when the timer overflows.
In the present invention, the direct memory access module 400 is periodically triggered by a timer to transfer the memory array from the register to the external GPIO interface. When configuring the TIMER in the MCU, since it is necessary to use the direct memory access/interrupt enable register (TIM 1_ DIER) function, bit 14 (TDE) of the TIMER is set to when 1, allowing a request to trigger DMA to transfer binary data from the register to the peripheral GPIO interface, triggering DMA operation when the TIMER overflows.
Based on the same inventive concept, aiming at the lamp dot matrix control device provided by any of the above embodiments, the embodiment of the present invention further provides a lamp dot matrix control method, please refer to fig. 4 and 5, the lamp dot matrix control method includes:
step S410, receiving channel function data sent by a light console, and calculating each PWM output value according to the channel function data, wherein the channel function data comprises a lamp channel function and a channel value;
step S420, converting the PWM output value into binary data, storing the binary data in a memory, and forming a memory array in the memory;
and step S430, when a trigger signal is received, transmitting the memory array to an external GPIO interface according to the trigger signal.
It will be appreciated that direct memory access is a high speed method of data transfer, where data can be transferred from one channel directly between the memory or input output device without processing by the MCU. Therefore, in the embodiment, each PWM output value is calculated according to the channel function data, and the PWM output values are converted into binary data and stored in the memory, and the direct memory access module 400 rapidly transmits the memory array to the external GPIO interface, so that all GPIO ports can output analog PWM signals, and then a single MCU microprocessor can output a plurality of analog PWM signal circuits, thereby meeting a large number of requirements of the PIXIE series lamps on PWM signals, reducing the number of MCU microprocessors used, and reducing the production cost.
Specifically, the Processing module 100 may be an intelligent chip such as an MCU (micro controller Unit), an MCU (Central Processing Unit), a DSP (Digital Signal Processing), or an FPGA (Field Programmable Gate Array). In this embodiment, the processing module 100 includes an MCU, and receives DMX512 data including channel function data and the like sent by the light console through the MCU. After receiving the DMX512 data, the DMX data is sequentially assigned to each channel according to the channel table, and the MCU calculates the duty ratio value of each PWM according to the channel function definition (for example, the PWM value of RGBW is the product of RGBW (Red Green Blue and White) channel (i.e., the minimum unit of RGBW control signal) and the Dimmer dimming channel).
In one embodiment, the PWM output value is PWM duty cycle data. It can be understood that in the PIXIE series lighting fixture, the corresponding driving voltage is generated according to the duty ratio of the PWM signal and is provided to the lamp beads in different PIXIE series lighting fixtures. By using Direct Memory Access (DMA), the data between the peripheral and the Memory can be moved quickly by the DMA without intervention of the MCU, and the MCU only needs to store the PWM duty cycle data in a specific RAM. Therefore, it is contemplated that a RAM array (i.e., a memory array) may be designed by the MCU, such as a RAM [65536] array, which may be DMA transferred to the GPIO port. And the overflow of the trigger module 300 triggers the DMA to work, 65536 pieces of 16-bit data are output to the port at fixed time to form PWM, and the configuration is good. This allows a single MCU to output many analog PWM signals.
In one embodiment, the binary data is stored according to a preset rule. It can be understood that the RAM data is 16 bits, each bit represents a PWM output, 65536 represents that the resolution of each PWM is 16 bits, and the RAM array value filling process is to convert the 16-bit PWM register and binary data, store the binary data in the RAM [65536] array, and wait for the DMA to automatically call. The binary data may be stored in other rules. In addition, each external GPIO interface (e.g., PA port) corresponds to a set of PWM values, the PA port has 16 total IO ports PA01 to PA16, which correspond to PWM01 to PWM16, respectively, and 16 bits are just the bit length of the RAM array defined in this embodiment, so that 1-bit update of 16 PWM waveforms is completed each time the memory array is updated.
Referring to fig. 5, in one embodiment, the converting the PWM output value into binary data includes:
comparing the currently received PWM output value corresponding to the same channel with the PWM output value received last time, and judging whether the two PWM output values are the same;
when it is determined that the two are different, the received PWM output value is converted into binary data.
It can be understood that, in this embodiment, after receiving the PWM output value, the padding module 200 first compares the currently received PWM output value corresponding to the same channel with the previously received PWM output value, and determines whether the two PWM output values are the same. If the two are the same, the RAM array does not need to be updated, and the step of receiving the PWM value is directly returned. If the two are different, the received PWM output value needs to be converted into binary data, and the binary data is stored in the RAM according to a preset rule. In this embodiment, the currently received PWM output value is compared with the PWM output value received last time, and the received PWM output value is converted into binary data only when the two PWM output values are different, and the memory array is updated, which is beneficial to reducing the data amount to be processed and the load of the MCU.
In one embodiment, the trigger signal is generated using a timer. In this embodiment, the timer is used to periodically trigger the direct memory access module 400 to transfer the memory array from the register to the external GPIO interface, so as to generate a continuous PWM signal, and further enable an external device (e.g., a voltage generation circuit) to generate a driving voltage required by the lamp bead according to the PWM signal. When configuring the TIMER in the MCU, since it is necessary to use the direct memory access/interrupt enable register (TIM 1_ DIER) function, bit 14 (TDE) of the TIMER is set to 1, allowing a request to trigger DMA to transfer binary data from the register to the peripheral GPIO interface, triggering DMA operation when the TIMER overflows.
Before the light fixture is controlled by the light fixture dot matrix control device, the direct memory access module 400 and the timer are also required to be configured. Based on this, in one embodiment, the luminaire lattice control method further includes:
before receiving channel function data sent by a light console, configuring the direct memory access module 400, and determining a source address, a target address and a transmitted byte size of the direct memory access module 400;
the timer is configured such that the trigger signal is generated after the timer overflows, and the direct memory access module 400 is triggered to operate.
In this embodiment, the DMX512 data sent by the light console not only includes channel function data, but also includes configuration information for configuring the direct memory access module 400, so that the direct memory access module 400 transfers the memory array according to the configuration information. In this embodiment, the DMX512 data further includes a source address, a destination address and a byte size of the transmission for specifying the dma module 400. Configuring a DMA in the MCU, and firstly determining a source address and a target address, namely transmitting a memory array from a memory RAM to a peripheral GPIO interface by the DMA; then determining the size of the transmitted byte, wherein the data volume of each transmission of the DMA is variable, and the maximum data volume value is 65536, which is determined by the number of PWM signals required to be output; in addition, it is also necessary to set the DMA transfer mode to the circulation mode in order to generate a continuous PWM signal. Moreover, since the DMA module 400 needs to be periodically triggered by a TIMER to transfer the memory array from the register to the external GPIO interface, when the TIMER is configured in the MCU, the DMA enable register (TIM 1_ DIER) function needs to be used, so that bit 14 (TDE) of the TIMER is set to 1, which allows a request for triggering DMA to transfer binary data from the register to the external GPIO interface, and the DMA is triggered to operate when the TIMER overflows.
In order to more clearly illustrate the present invention, the lamp dot matrix control device provided in fig. 1 is taken as an example to describe the lamp dot matrix control provided in the present invention in detail.
The lamp dot matrix control device comprises a processing module 100, a filling module 200, a triggering module 300 (including a timer) and a direct memory access module 400, and assuming that a RAM [65536] array is designed in a RAM memory by the processing module 100, the RAM [65536] array can be transmitted from the memory to an external GPIO port through the direct memory access module 400. And when the overflow of the timer triggers the direct memory access module 400 to carry out DMA work, 65536 16-bit data are output to an external GPIO port at fixed time to form a PWM signal, and the PWM signal is formed after configuration. This allows a single MCU to output many analog PWM signals. The specific scheme is as follows:
(1) And powering on the lamp dot matrix control device, resetting the MCU, initializing the RAM [65536] array, assigning values to the RAM [65536] array, and determining the memory position of the RAM [65536] array.
(2) Receiving DMX512 data, configuring a direct memory access module 400 in the MCU according to the received DMX512 data, firstly determining a source address and a target address of the direct memory access module 400, namely transmitting the data from the RAM to a peripheral GPIO port by using the direct memory access module 400; the byte size of the direct memory access transfer is then determined, since the amount of data per transfer of the DMA is variable, the maximum data size value is 65536; and sets the DMA transfer to the round robin mode.
(3) Configuring a TIMER in the MCU according to the received DMX512 data, because a DMA/interrupt enable register (TIM 1_ DIER) function is needed to be used; setting a bit 14 (TDE) of a timer to be 1, allowing the timer to periodically trigger the direct memory access module 400 to send out a DMA request, providing the bus request to the bus arbitration logic, immediately suspending or only executing internal operation by the MCU after the direct memory access module 400 obtains the bus control right, outputting a read-write command by the direct memory access module 400, and directly controlling the RAM and an external GPIO port to carry out DMA transmission; the starting position and the data length of the data to be transmitted need to be provided at the beginning, and the participation of a central processing unit is not needed in the transmission process. When the specified bulk data transfer is completed, the dma module 400 releases the bus control and sends an end signal to the GPIO interface. When the GPIO interface receives the end signal, on one hand, the GPIO stops the operation of the GPIO equipment, on the other hand, an interrupt request is provided for the MCU, so that the MCU is released from a non-intrusive state, and a code for checking the correctness of the DMA transmission operation is executed. And finally, continuing to execute the original program with the operation result and the state of the current time.
Therefore, the DMA transmission mode does not need the MCU to directly control transmission, does not have the processes of reserving a site and recovering the site like an interrupt processing mode, and opens up a channel for directly transmitting data for the RAM and the GPIO equipment through hardware, so that the efficiency of the MCU is greatly improved. It should be noted that the timer may be configured first, and the dma module 400 may also be configured first, and the order is not limited.
(4) And the MCU calculates each PWM output value according to the channel value and the lamp channel function. In this embodiment, after receiving the DMX512 data, the DMX data is sequentially assigned to each channel according to the channel table, and the MCU calculates the duty ratio of each PWM according to the channel function definition, for example, calculates the product of the RGBW channel and the dim dimming channel, and uses the product as the PWM value of the RGBW.
(5) The MCU compares the currently received PWM output value corresponding to the same channel with the previously received PWM output value, and judges whether each currently received PWM value is changed. If yes, the filling module 200 starts to calculate the RAM array value according to the new PWM output value, and updates the RAM array according to the calculated RAM array value; otherwise, returning to the step (4).
The RAM array is 16 bits, each bit represents a PWM output value, 65536 represents that the resolution of each PWM output value is 16 bits, the RAM array numerical value filling process converts 16-bit PWM register data into binary data and stores the binary data in the RAM [65536] array, and the DMA is to be automatically called.
(6) And after the timer overflows and the DMA is triggered to work, the DMA automatically completes the transmission of the RAM array to the peripheral GPIO interface, completes the PWM output updating and generates a new PWM signal. Because MCU control transmission is not needed, data between peripheral GPIO interface and the memory RAM is removed through DMA fast, realize that all GPIO ports can both output analog PWM signal, consequently utilize single MCU can output a large amount of analog PWM signals, thereby can reduce MCU's use quantity, reduction in production cost, reinforcing lamps and lanterns dot matrix controlling means controllability, the asynchronous problem between a plurality of MCU has been solved simultaneously.
Based on the same inventive concept, the embodiment of the invention also provides an LED stage lamp, which comprises the lamp dot matrix control device of any embodiment.
In summary, the embodiment of the invention provides a lamp dot matrix control device and method and an LED stage lamp. The lamp dot matrix control device comprises a processing module 100, a filling module 200, a triggering module 300 and a direct memory access module 400. The processing module 100 is configured to receive channel function data sent by a light console, and calculate each PWM output value according to the channel function data; wherein the channel function data comprises a luminaire channel function and a channel value; the filling module 200 is electrically connected to the processing module 100, and is configured to convert the PWM output value into binary data, store the binary data in a memory, and form a memory array in the memory; the trigger module 300 is used for periodically generating a trigger signal; the direct memory access module 400 is electrically connected to the trigger module 300, and is configured to receive the trigger signal and transmit the memory array to an external GPIO interface according to the trigger signal. In the invention, the PWM output value is converted into binary data and stored in the memory, and the direct memory access module 400 rapidly transmits the memory array to the external GPIO interface, so that all GPIO ports can output analog PWM signals, and further a single MCU microprocessor can output a plurality of analog PWM signal circuits, thereby meeting a large amount of requirements of PIXIE series lamps on PWM signals, reducing the use number of the MCU microprocessors, reducing the production cost and simultaneously enhancing the control capability of the lamp dot matrix control device.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases or other media used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that various changes and modifications can be made by those skilled in the art without departing from the spirit of the invention, and these changes and modifications are all within the scope of the invention. Therefore, the protection scope of the present patent should be subject to the appended claims.

Claims (10)

1. A lamp dot matrix control device is characterized by comprising:
the processing module is used for receiving channel function data sent by the light console and calculating each PWM output value according to the channel function data; wherein the channel function data comprises a luminaire channel function and a channel value;
the filling module is electrically connected with the processing module and used for converting the PWM output value into binary data, storing the binary data in a memory and forming a memory array in the memory;
the trigger module is used for periodically generating a trigger signal; and
the direct memory access module is electrically connected with the trigger module and used for receiving the trigger signal and transmitting the memory array to an external GPIO (general purpose input/output) interface according to the trigger signal;
the processing module is further configured to configure the direct memory access module, and determine a source address, a destination address, and a byte size of transmission of the direct memory access module; and the destination address is the address of the external GPIO interface.
2. The lamp dot matrix control device of claim 1, wherein the PWM output value is PWM duty cycle data.
3. The lamp dot matrix control device of claim 1, wherein the binary data is stored in a predetermined rule.
4. The lamp dot matrix control device of claim 1, wherein the fill module for converting the PWM output values to binary data is specifically configured to:
comparing the currently received PWM output value corresponding to the same channel with the PWM output value received last time, and judging whether the two PWM output values are the same;
when it is determined that the two are different, the received PWM output value is converted into binary data.
5. The lamp dot matrix control device of claim 1, wherein the memory array is a RAM [65536] array.
6. The lamp dot matrix control device of claim 1, wherein the trigger module comprises a timer;
the processing module is further configured to configure the timer, and trigger the direct memory access module when the timer overflows.
7. A lamp dot matrix control method is characterized by comprising the following steps:
configuring a direct memory access module, and determining a source address, a target address and a transmitted byte size of the direct memory access module; the destination address is an address of an external GPIO interface;
configuring a timer to enable the timer to generate a trigger signal after overflowing, and triggering the direct memory access module to work;
receiving channel function data sent by a light console, and calculating each PWM output value according to the channel function data, wherein the channel function data comprise a lamp channel function and a channel value;
converting the PWM output value into binary data, storing the binary data in a memory, and forming a memory array in the memory;
and when a trigger signal is received, transmitting the memory array to an external GPIO interface according to the trigger signal.
8. The lamp dot matrix control method of claim 7, wherein the converting the PWM output value to binary data comprises:
comparing the currently received PWM output value corresponding to the same channel with the PWM output value received last time, and judging whether the two are the same;
when it is determined that the two are different, the received PWM output value is converted into binary data.
9. The lamp dot matrix control method of claim 7, wherein the memory array is a RAM [65536] array.
10. An LED stage light fixture, characterized in that the light fixture lattice control device is as claimed in any one of claims 1-6.
CN202010915673.5A 2020-09-03 2020-09-03 Lamp dot matrix control device and method and LED stage lamp Active CN112040601B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010915673.5A CN112040601B (en) 2020-09-03 2020-09-03 Lamp dot matrix control device and method and LED stage lamp

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010915673.5A CN112040601B (en) 2020-09-03 2020-09-03 Lamp dot matrix control device and method and LED stage lamp

Publications (2)

Publication Number Publication Date
CN112040601A CN112040601A (en) 2020-12-04
CN112040601B true CN112040601B (en) 2023-04-07

Family

ID=73592289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010915673.5A Active CN112040601B (en) 2020-09-03 2020-09-03 Lamp dot matrix control device and method and LED stage lamp

Country Status (1)

Country Link
CN (1) CN112040601B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114242005A (en) * 2021-12-28 2022-03-25 展讯通信(上海)有限公司 Display method, electronic equipment and storage medium
CN114490468B (en) * 2022-02-15 2023-08-18 广州彩熠灯光股份有限公司 Data writing method, medium and electronic equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6145027A (en) * 1997-07-09 2000-11-07 Texas Instruments Incorporated DMA controller with split channel transfer capability and FIFO buffering allowing transmit channel to get ahead of corresponding receive channel by preselected number of elements
CN1797378A (en) * 2004-12-24 2006-07-05 华为技术有限公司 Method of data interchange by using mode of direct memory access
CN101754520A (en) * 2008-12-15 2010-06-23 龙旗科技(上海)有限公司 Method for driving light emitting diodes to display through multiplexing handheld device data bus
CN104091558A (en) * 2013-04-01 2014-10-08 香港理工大学 LED display panel driving method and system
CN104503931A (en) * 2014-11-28 2015-04-08 上海富山精密机械科技有限公司 Multi-channel analog signal acquisition method
CN104570858A (en) * 2014-12-19 2015-04-29 深圳市科陆电子科技股份有限公司 Analog signal sampling method and sampling system
CN108617050A (en) * 2018-04-19 2018-10-02 四川斐讯信息技术有限公司 A kind of control system and method for breathing out ball lamp
CN109068113A (en) * 2018-08-09 2018-12-21 广州达森灯光股份有限公司 Projector and its control system based on signal light control Data Transport Protocol
CN109344098A (en) * 2018-09-04 2019-02-15 广州视源电子科技股份有限公司 Data operation method and device between master device and slave device
CN109484046A (en) * 2018-10-15 2019-03-19 广东宝莱特医用科技股份有限公司 A kind of print control program, control system and printing device
CN109548252A (en) * 2018-11-19 2019-03-29 广州腾龙电子塑胶科技有限公司 Pwm signal conversion method, device, computer equipment and converter pwm signal
CN109757017A (en) * 2017-11-07 2019-05-14 广东粤迪厚创科技发展有限公司 A kind of Intelligent lamp control device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11064589B2 (en) * 2019-01-23 2021-07-13 Whelen Engineering Company, Inc. System and method for variable intensity patterns

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6145027A (en) * 1997-07-09 2000-11-07 Texas Instruments Incorporated DMA controller with split channel transfer capability and FIFO buffering allowing transmit channel to get ahead of corresponding receive channel by preselected number of elements
CN1797378A (en) * 2004-12-24 2006-07-05 华为技术有限公司 Method of data interchange by using mode of direct memory access
CN101754520A (en) * 2008-12-15 2010-06-23 龙旗科技(上海)有限公司 Method for driving light emitting diodes to display through multiplexing handheld device data bus
CN104091558A (en) * 2013-04-01 2014-10-08 香港理工大学 LED display panel driving method and system
CN104503931A (en) * 2014-11-28 2015-04-08 上海富山精密机械科技有限公司 Multi-channel analog signal acquisition method
CN104570858A (en) * 2014-12-19 2015-04-29 深圳市科陆电子科技股份有限公司 Analog signal sampling method and sampling system
CN109757017A (en) * 2017-11-07 2019-05-14 广东粤迪厚创科技发展有限公司 A kind of Intelligent lamp control device
CN108617050A (en) * 2018-04-19 2018-10-02 四川斐讯信息技术有限公司 A kind of control system and method for breathing out ball lamp
CN109068113A (en) * 2018-08-09 2018-12-21 广州达森灯光股份有限公司 Projector and its control system based on signal light control Data Transport Protocol
CN109344098A (en) * 2018-09-04 2019-02-15 广州视源电子科技股份有限公司 Data operation method and device between master device and slave device
CN109484046A (en) * 2018-10-15 2019-03-19 广东宝莱特医用科技股份有限公司 A kind of print control program, control system and printing device
CN109548252A (en) * 2018-11-19 2019-03-29 广州腾龙电子塑胶科技有限公司 Pwm signal conversion method, device, computer equipment and converter pwm signal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于STM32的舞台灯光控制系统设计;卓树峰;《齐齐哈尔大学学报(自然科学版)》;20161115(第06期);全文 *
郑亮等.DMA实验.《嵌入式系统开发与实践》.2019,正文第204-206页. *

Also Published As

Publication number Publication date
CN112040601A (en) 2020-12-04

Similar Documents

Publication Publication Date Title
CN112040601B (en) Lamp dot matrix control device and method and LED stage lamp
JP4294954B2 (en) Method for controlling lighting device, lighting device, signal generator, protocol and communication interface
US6731080B2 (en) Multiple ballast and lamp control system for selectively varying operation of ballasts to distribute burn times among lamps
JP2009530790A (en) Pulse width modulation method and dimmer based on LED dimming control
CN111800923A (en) Light control method and device, readable storage medium and terminal equipment
CN111542153A (en) LED lamp, dimming module of LED lamp and dimming method
CN110868784B (en) Stage lighting data bidirectional synchronous communication method and system, storage medium and device
CN106714383A (en) LED (Light Emitting Diode) lamplight control method
CN111867215B (en) Light control data scheduling method and system, communication control panel and storage medium
CN107918589B (en) High-efficient buffer memory concurrency system of DMX512 signal based on FPGA
US7081835B2 (en) Control device for the actuation of lamps
CN109152136B (en) Gray scale increasing method of LED lamp
CN113380202A (en) Liquid crystal display device and backlight brightness adjusting method
WO2005101916A1 (en) Parallel pulse code modulation system and method
CN110710330A (en) Automatic address assignment for serially connected devices
TWI439180B (en) Lighting system, dimming control apparatus and dimming control method
US20160174342A1 (en) Method for controlling lighting element and associated system
CN112566299A (en) Pipeline exponential luminance conversion for multi-channel LED drivers
CN111654962B (en) Automatic configuration method of remote intelligent equipment
CN111818699B (en) Control method and control circuit of RGB-LED light source
CN115297089B (en) Full-automatic address allocation system and method
CN214046087U (en) Circuit for controlling multiple LED lamps by using I2C bus
CN117520220B (en) Method, system, device and storage medium for automatically updating data
CN113709934B (en) Lamp control method, device, lamp and storage medium
EP4280823A1 (en) Advanced bus protocol for dynamic lighting

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant