[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN110784961B - LED driving method and device and storage medium - Google Patents

LED driving method and device and storage medium Download PDF

Info

Publication number
CN110784961B
CN110784961B CN201810842475.3A CN201810842475A CN110784961B CN 110784961 B CN110784961 B CN 110784961B CN 201810842475 A CN201810842475 A CN 201810842475A CN 110784961 B CN110784961 B CN 110784961B
Authority
CN
China
Prior art keywords
led
leds
group
driving
driving current
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
CN201810842475.3A
Other languages
Chinese (zh)
Other versions
CN110784961A (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.)
BYD Semiconductor Co Ltd
Original Assignee
BYD Semiconductor 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 BYD Semiconductor Co Ltd filed Critical BYD Semiconductor Co Ltd
Priority to CN201810842475.3A priority Critical patent/CN110784961B/en
Publication of CN110784961A publication Critical patent/CN110784961A/en
Application granted granted Critical
Publication of CN110784961B publication Critical patent/CN110784961B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)

Abstract

The invention is suitable for the technical field of LED driving, and provides an LED driving method, an LED driving device and a storage medium, wherein the driving method comprises the following steps: after the system is powered on, after the LED reset module completes resetting, acquiring the driving current, the scanning matrix data and the grouped data of the LED matrix; the scanning matrix data comprises the column number and the row number of an LED matrix, and the grouped data comprises the number of the LED lamps which are allowed to be included at most in each group of LEDs after the LED matrix is grouped; acquiring the driving current of each group of LEDs according to the driving current, the number of columns of the LED matrix and the number of the LED lamps which are allowed to be included at most in each group of LEDs; and acquiring the driving current of each LED according to the driving current of each group of LEDs and the number of LED lamps included in each group of LEDs, and performing driving scanning on each LED by taking the group as a unit by adopting the driving current of each LED. The LED driving method provided by the invention can effectively save I/O resources, reduce the driving cost of the LED, and has high LED scanning duty ratio.

Description

LED driving method and device and storage medium
Technical Field
The invention belongs to the technical field of LED driving, and particularly relates to an LED driving method and device and a storage medium.
Background
In recent years, Light Emitting Diodes (LEDs) have been widely used in various fields, such as LED lamps, due to their advantages of significant energy saving, environmental protection, impact resistance, strong lightning resistance, and long life. While the LED is widely used, the LED driving becomes one of the most important problems nowadays.
Currently, conventional LED driving is classified into two modes, i.e., common anode and common cathode, as shown in fig. 1. When the driving method is used for driving the LED, a common cathode port (COM port) is low/high, a common anode port (SEG port) is high/low, and a current limiting resistor is added to the SEG port. During cyclic scanning, the average current of the LED is distributed by controlling the conduction time of the COM port. However, although this method can effectively drive the LED, the LED driving requires a large number of input/output (I/O) port resources, which increases the driving cost of the LED.
Therefore, it is necessary to provide a technical solution to solve the above technical problems.
Disclosure of Invention
In view of this, embodiments of the present invention provide an LED driving method and apparatus, and a storage medium, which can effectively save I/O resources for the same number of LEDs, reduce the driving cost of the LEDs, and have a high LED scanning duty ratio.
A first aspect of embodiments of the present invention provides an LED driving method, where the LED driving method is used to drive LEDs in an LED matrix, where the LED matrix has a plurality of driving ports and includes a plurality of LED groups, and the LED driving method includes:
after a system is powered on, after an LED reset module finishes resetting, acquiring driving current, scanning matrix data and grouped data of an LED matrix; the scanning matrix data comprises the column number and the row number of the LED matrix, and the grouped data comprises the number of the LED lamps which are allowed to be included at most in each group of LEDs after the LED matrix is grouped;
acquiring the driving current of each group of LEDs according to the driving current, the number of columns of the LED matrix and the number of the LED lamps which are allowed to be included at most in each group of LEDs;
and acquiring the driving current of each LED according to the driving current of each group of LEDs and the number of the LEDs included in each group of LEDs, and performing driving scanning on each LED by taking the group as a unit by adopting the driving current of each LED.
A second aspect of embodiments of the present invention provides an LED driving apparatus for driving LEDs in an LED matrix, the LED matrix having a plurality of driving ports and including a plurality of LED groups, the LED driving apparatus including:
the first acquisition module is used for acquiring the driving current, the scanning matrix data and the grouped data of the LED matrix after the LED reset module finishes resetting after the system is powered on; the scanning matrix data comprises the column number and the row number of the LED matrix, and the grouped data comprises the number of the LED lamps which are allowed to be included at most in each group of LEDs after the LED matrix is grouped;
the second obtaining module is used for obtaining the driving current of each group of LEDs according to the driving current, the number of columns of the LED matrix and the number of the LED lamps which are allowed to be included at most in each group of LEDs;
and the driving module is used for acquiring the driving current of each LED according to the driving current of each group of LEDs and the number of the LEDs included in each group of LEDs, and performing driving scanning on each LED by taking the driving current of each LED as a unit.
A third aspect of the embodiments of the present invention provides an LED driving apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the LED driving method when executing the computer program.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the above-described LED driving method.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: according to the LED driving method, the driving current of each group of LEDs is obtained according to the obtained driving current and the column number of the LED matrix and the number of the LED lamps which are allowed to be included at most in each group of LEDs after the LED matrix is grouped in the LED matrix comprising the plurality of driving ports, the driving current of each group of LEDs is further obtained according to the driving current of each group of LEDs and the number of the LED lamps included in each group of LEDs, and each LED is driven according to the driving current of each LED, so that for the LEDs with the same number, the LED driving method provided by the invention can effectively save I/O resources, reduce the driving cost of the LEDs, and the LED scanning duty ratio is high.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic diagram of a prior art LED driving circuit;
fig. 2 is a schematic flow chart illustrating an implementation of an LED driving method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a circuit configuration of an LED matrix in the LED driving method shown in FIG. 2;
fig. 4 is a schematic structural diagram of an LED driving apparatus according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of an LED driving apparatus according to a third embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 2 is a schematic flowchart of an LED driving method according to an embodiment of the present invention. As shown in fig. 2, the LED driving method may include the steps of:
step S21: after a system is powered on, after an LED reset module finishes resetting, acquiring driving current, scanning matrix data and grouped data of an LED matrix; the scanning matrix data comprises the column number and the row number of the LED matrix, and the grouped data comprises the maximum number of LED lamps allowed to be included in each group of LEDs after the LED matrix is grouped.
In the embodiment of the present invention, the LED driving method provided by the present invention is used for driving LEDs in an LED matrix, and the LED matrix has a plurality of driving ports, such as the driving ports LED0 to LED7 shown in fig. 3; in addition, the LED matrix has a plurality of LED groups, such as the first to thirty-second groups of LEDs shown in fig. 3.
Further, in this embodiment of the present invention, in a specific implementation, after the system is powered on and the LED reset module completes resetting, the obtaining of the driving current, the scanning matrix data, and the packet data of the LED matrix specifically includes:
after the system is powered on, after the LED reset module is reset, other modules in the LED driving circuit are in an initial state, and each module is built in a Micro Controller Unit (MCU), which includes but is not limited to an LED clock module Controller, an LED driving current Controller, an LED matrix selection Controller, an LED interrupt output Controller, and an LED driving packet Controller. The LED clock module controller provides an LED scanning clock, the LED driving current controller controls and selects LED scanning driving capability, the LED matrix selection controller controls and selects an LED scanning matrix mode, the LED driving group controller controls and selects LED scanning groups, and the LED interrupt output controller generates an interrupt signal to the MCU kernel after controlling the LED scanning to be completed.
Specifically, the LED driving current controller can select a corresponding LED driving current level by setting the LED driving current register, the LED matrix selection controller can select a corresponding scanning matrix mode by setting the LED matrix selection register, the LED interrupt output controller can select a corresponding scanning mode, such as an interrupt mode or a cyclic mode, by setting the LED scanning driving grouping register, and the LED driving grouping controller can control the number of groups of LED driving scanning by setting the LED scanning driving grouping register.
After the setting and selecting process is completed, the LED driving apparatus can obtain the driving current, the scanning matrix data, and the grouping data of the LED matrix according to the corresponding setting. Wherein, the driving current refers to the total driving current of each driving port of the LED matrix, and the total driving current of each driving port is the same; the scan matrix data refers to the number of rows and columns of the LED matrix, e.g. the number of rows 7 and columns 8 in the LED matrix shown in fig. 3; the grouping data includes the number of groups into which the LED matrix is grouped, the number of LED lamps which are allowed to be included at most in each group of LEDs, and the number of LED lamps included in each group of LEDs, for example, the number of groups 32 which are included in the LED matrix after grouping, the number of LED lamps which are allowed to be included at most in each group of LEDs, and the number of LED lamps 1 or 2 included in each group of LEDs shown in fig. 3.
It should be noted that, in the embodiment of the present invention, the LED matrix driven by the present invention is composed of a serial lattice matrix of N × N (N-1), and a specific circuit structure thereof is shown in fig. 3. As can be seen from fig. 3, the number of the driving ports of the LED matrix is one more than the number of rows of the LED matrix, so that the LED driving method saves I/O port resources and further reduces the cost of the LED driving method compared to the conventional COM × SEG row-column driving scanning method.
Step S22: and acquiring the driving current of each group of LEDs according to the driving current, the number of columns of the LED matrix and the number of the LED lamps which are allowed to be included at most in each group of LEDs.
Specifically, as a preferred embodiment of the present invention, step S22 specifically includes:
acquiring the driving scanning duty ratio of each group of LEDs according to the number of columns of the LED matrix and the number of the LED lamps which are allowed to be included at most in each group of LEDs;
and acquiring the driving current of each group of LEDs according to the driving current and the driving scanning duty ratio of each group of LEDs.
In the embodiment of the invention, after the LED driving device obtains the number of columns of the LED matrix and the number of LED lamps maximally allowed to be included in each group of LEDs, the LED driving device may calculate the driving scanning duty cycle of each group of LEDs according to the obtained number of columns and the number of LED lamps maximally allowed to be included in each group of LEDs, and further obtain the driving current of each group of LEDs according to the driving current and the driving scanning duty cycle of each group of LEDs; it should be noted that, in the present invention, since the driving scan duty ratio of each group of LEDs is the same, and the driving current of each driving port in the LED matrix is the same, the driving current of each group of LEDs is the same.
Further, as a preferred embodiment of the present invention, obtaining the driving scanning duty ratio of each group of LEDs according to the number of rows of the LED matrix and the number of LED lamps maximally allowed to be included in each group of LEDs specifically includes:
according to the formula
Figure BDA0001745890300000061
Obtaining a drive sweep for each group of LEDsA duty cycle; wherein, Duty is the driving scanning Duty ratio of each group of LEDs, N is the number of columns of the LED matrix, M is the number of the LED lamps which are allowed to be included at most in each group of LEDs, and the value range is [1 is more than or equal to M is less than or equal to (N-1)](ii) a k and N are positive integers, and the value range of k is (1, (N-1)); when in use
Figure BDA0001745890300000071
When the remainder is equal to 0, the value of n is 0, when
Figure BDA0001745890300000072
When the remainder is not equal to 0, the value of n is 1,
Figure BDA0001745890300000073
and taking an integer part.
In the embodiment of the present invention, as shown in the following table, taking N-8 and M-2 as examples, in the LED driving method provided by the present invention, the scanning duty ratio of each group of LEDs
Figure BDA0001745890300000074
Comprises the following steps:
Figure BDA0001745890300000075
as can be seen from the above table, when the number of columns N of the LED matrix is 8, and the number of LEDs M allowed to be included in each group of LEDs is 2 at most, for the LED matrix of N × N (N-1), the driving scan duty ratio is as follows
Figure BDA0001745890300000076
And the duty ratio of the driving scanning compared with the serial point array scanning with the same driving capability and the same LED lamp number is
Figure BDA0001745890300000077
In other words, the LED driving method has higher LED driving scanning duty ratio, so that under the same capacity, the average current of the LED can be effectively provided, the scanning peak current of the LED can be effectively reduced, and the service life of the LED is prolonged.
Further, as a preferred embodiment of the present invention, the obtaining of the driving current of each group of LEDs according to the driving current and the driving scanning duty ratio of each group of LEDs specifically includes:
according to the formula
Figure BDA0001745890300000078
Obtaining the driving current of each group of LEDs; wherein, I1For the drive current of each group of LEDs, IledIs the drive current of the LED matrix.
In the embodiment of the invention, after the LED driving device obtains the driving current of the LED matrix and the driving scanning duty ratio of each group of LEDs, the driving current and the driving scanning duty ratio can be obtained according to a formula
Figure BDA0001745890300000081
And acquiring the driving current of each group of LEDs. For example, if the driving current of the LED matrix is IledIs 60mA, and the driving scanning duty ratio of each group of LEDs is
Figure BDA0001745890300000082
The drive current of each group of LEDs is
Figure BDA0001745890300000083
Step S23: and acquiring the driving current of each LED according to the driving current of each group of LEDs and the number of the LEDs included in each group of LEDs, and performing driving scanning on each LED by taking the group as a unit by adopting the driving current of each LED.
In the embodiment of the invention, because the number of the LED lamps included in each group of LEDs is different, when each LED is driven, the driving current of each LED can be obtained according to the driving current of each group of LEDs and the number of the LED lamps included in each group of LEDs; further, in driving the LEDs included in each group of LEDs, each LED should be subjected to driving scanning in units of groups.
Specifically, as a preferred embodiment of the present invention, the number of LED lamps included in each group of LEDs is different, and the obtaining of the driving current of each LED according to the driving current of each group of LEDs and the number of LED lamps included in each group of LEDs specifically includes:
according to the formula
Figure BDA0001745890300000084
Acquiring a driving current of each LED; wherein, I2And L is the number of LED lamps included in each group of LEDs for the driving current of each LED.
In the embodiment of the present invention, after the LED driving apparatus calculates the driving current of each LED according to the above formula, each LED can be driven in units of groups according to the driving current of each LED. Specifically, when the LED driving device drives each LED in each group, one of the driving ports of the group of LEDs may be at a low level, and the other driving port may be at a high level, based on which the driving ports are sequentially arranged in sequence
Figure BDA0001745890300000091
Sequentially scanning each group of LEDs according to the duty cycle of
Figure BDA0001745890300000092
Drives each LED in each group of LEDs.
For example, for the seven-row eight-column LED matrix shown in FIG. 3, the LED driving apparatus is as follows
Figure BDA0001745890300000093
Sequentially scanning each group of LEDs according to the duty cycle of
Figure BDA0001745890300000094
Drives each LED in each group of LEDs. In accordance with
Figure BDA0001745890300000095
When scanning each group of LEDs in turn, the duty cycle specifically is as follows: when the driving port LED0 is high and the LED1 is low, the 0 th group of lamps are turned on, and other groups of lamps are turned off; when the driving port LED0 and the LED1 are high and the LED2 is low, the 1 st group of lamps are on; when the drive port LED0, LED1 are high and LED3 is low, group 2 lights are on, and so onBy analogy … …, the cycle lighting can be completed by scanning the 31 st group of lamps in turn.
In this embodiment, the driving current of each group of LEDs is obtained according to the obtained driving current of the LED matrix, the number of columns, and the number of LED lamps maximally allowed to be included in each group of LEDs after the LED matrix is grouped, and then the driving current of each LED is obtained according to the driving current of each group of LEDs and the number of LED lamps included in each group of LEDs, and each LED is driven according to the driving current of each LED, so that for the same number of LEDs, the LED driving method provided by the present invention can effectively save I/O resources, reduce the driving cost of LEDs, and have a high LED scanning duty ratio.
Fig. 4 is a schematic block diagram of the LED driving apparatus 4 according to the second embodiment of the present invention. The modules included in the driving apparatus 3 according to the embodiment of the present invention are used to execute the steps in the embodiment corresponding to fig. 2, and please refer to fig. 2 and the related description in the embodiment corresponding to fig. 2, which are not described herein again. The LED driving apparatus 4 provided in the embodiment of the present invention includes a first obtaining module 41, a second obtaining module 42, and a driving module 43.
The first obtaining module 41 is configured to obtain, after the system is powered on and the LED reset module completes resetting, driving current, scan matrix data, and packet data of the LED matrix; the scanning matrix data comprises the column number and the row number of the LED matrix, and the grouped data comprises the number of the LED lamps which are allowed to be included in each group of LEDs after the LED matrix is grouped.
And a second obtaining module 42, configured to obtain the driving current of each group of LEDs according to the driving current, the number of columns of the LED matrix, and the number of LED lamps that are allowed to be included at most in each group of LEDs.
The driving module 43 obtains the driving current of each LED according to the driving current of each group of LEDs and the number of LED lamps included in each group of LEDs, and performs driving scanning on each LED in units of groups using the driving current of each LED.
Further, the second obtaining module 42 is specifically configured to obtain the driving and scanning duty ratio of each group of LEDs according to the number of columns of the LED matrix and the number of LED lamps that are allowed to be included at most in each group of LEDs; and acquiring the driving current of each group of LEDs according to the driving current and the driving scanning duty ratio of each group of LEDs.
Further, the second obtaining module 42 is specifically configured to obtain the formula
Figure BDA0001745890300000101
Acquiring the drive scanning duty ratio of each group of LEDs; wherein, Duty is the driving scanning Duty ratio of each group of LEDs, N is the number of columns of the LED matrix, M is the number of the LED lamps which are allowed to be included at most in each group of LEDs, and the value range is [1 is more than or equal to M is less than or equal to (N-1)](ii) a k and N are positive integers, and the value range of k is (1, (N-1)); when in use
Figure BDA0001745890300000102
When the remainder is equal to 0, the value of n is 0, when
Figure BDA0001745890300000103
When the remainder is not equal to 0, the value of n is 1,
Figure BDA0001745890300000104
and taking an integer part.
Further, the second obtaining module 42 is specifically configured to obtain the formula
Figure BDA0001745890300000105
Acquiring the driving current of each group of LEDs; wherein, I1For the drive current of each group of LEDs, IledIs the drive current of the LED matrix.
Further, the number of LED lamps included in each group of LEDs is different, and the driving module 43 is specifically configured to perform the following operations according to a formula
Figure BDA0001745890300000111
Acquiring a driving current of each LED; wherein, I2And L is the number of LED lamps included in each group of LEDs for the driving current of each LED.
In this embodiment, the LED driving device 4 obtains the driving current of each group of LEDs according to the obtained driving current of the LED matrix, the column number, and the maximum number of LED lamps allowed to be included in each group of LEDs after the LED matrix is grouped in the LED matrix including the plurality of driving ports, further obtains the driving current of each LED according to the driving current of each group of LEDs and the number of LED lamps included in each group of LEDs, and drives each LED according to the driving current of each LED, so that for the same number of LEDs, the LED driving method provided by the present invention can effectively save I/O resources and current limiting resistors, reduce the driving cost of LEDs, and have a high LED scanning duty ratio.
Fig. 5 is a schematic diagram of an LED driving apparatus 5 according to a third embodiment of the present invention. As shown in fig. 5, the LED driving device 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52, such as a LED driving method program, stored in said memory 51 and executable on said processor 50. The processor 50, when executing the computer program 52, implements the steps in the various LED driving method embodiments described above, such as the steps 21 to 23 shown in fig. 2. Alternatively, the processor 50, when executing the computer program 52, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 41 to 43 shown in fig. 4.
Illustratively, the computer program 52 may be partitioned into one or more modules/units that are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 52 in the LED driving device 5. For example, the computer program 52 may be divided into a first acquisition module, a second acquisition module, and a driving module (a virtual module in the apparatus), and the specific functions of each module are as follows:
the first acquisition module is used for acquiring the driving current, the scanning matrix data and the grouped data of the LED matrix after the LED reset module is reset after the system is powered on; the scanning matrix data comprises the column number and the row number of the LED matrix, and the grouped data comprises the number of the LED lamps which are allowed to be included in each group of LEDs after the LED matrix is grouped.
And the second acquisition module is used for acquiring the driving current of each group of LEDs according to the driving current, the number of columns of the LED matrix and the number of the LED lamps which are allowed to be included at most in each group of LEDs.
And the driving module is used for acquiring the driving current of each LED according to the driving current of each group of LEDs and the number of the LED lamps in each group of LEDs, and performing driving scanning on each LED by taking the group as a unit by adopting the driving current of each LED.
Further, the second obtaining module is specifically configured to obtain the drive scan duty cycle of each group of LEDs according to the number of columns of the LED matrix and the number of LED lamps that are allowed to be included at most in each group of LEDs; and acquiring the driving current of each group of LEDs according to the driving current and the driving scanning duty ratio of each group of LEDs.
Further, the second obtaining module is specifically configured to obtain the formula
Figure BDA0001745890300000121
Acquiring the drive scanning duty ratio of each group of LEDs; wherein, Duty is the driving scanning Duty ratio of each group of LEDs, N is the number of columns of the LED matrix, M is the number of the LED lamps which are allowed to be included at most in each group of LEDs, and the value range is [1 is more than or equal to M is less than or equal to (N-1)](ii) a k and N are positive integers, and the value range of k is (1, (N-1)); when in use
Figure BDA0001745890300000122
When the remainder is equal to 0, the value of n is 0, when
Figure BDA0001745890300000123
When the remainder is not equal to 0, the value of n is 1,
Figure BDA0001745890300000124
and taking an integer part.
Further, the second obtaining module is specifically configured to obtain the formula
Figure BDA0001745890300000125
Acquiring the driving current of each group of LEDs; wherein, I1For the drive current of each group of LEDs, IledIs the drive current of the LED matrix.
Furthermore, the number of the LED lamps included in each group of LEDs is different, and the driving module is specifically used for driving the LEDs according to a formula
Figure BDA0001745890300000126
Acquiring a driving current of each LED; wherein, I2And L is the number of LED lamps included in each group of LEDs for the driving current of each LED.
The driving device 5 may be various processors, or may be a module inside a processor. The LED driving device 5 may include, but is not limited to, a processor 50 and a memory 51. It will be understood by those skilled in the art that fig. 5 is only an example of the LED driving apparatus 5, and does not constitute a limitation to the LED driving apparatus 5, and may include more or less components than those shown, or combine some components, or different components, for example, the LED driving apparatus 5 may further include an input-output device, a network access device, a bus, etc.
The Processor 50 may be a Micro Control Unit (MCU), a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the LED driving apparatus 5, such as a hard disk or a memory of the driving apparatus 5. The memory 51 may also be an external storage device of the LED driving apparatus 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the LED driving apparatus 5.
Further, the memory 51 may also include both an internal storage unit and an external storage device of the LED driving apparatus 5. The memory 51 is used for storing the computer program and other programs and data required by the LED driving device 5. The memory 51 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (6)

1. An LED driving method for driving LEDs in an LED matrix, wherein the LED matrix has a plurality of driving ports and comprises a plurality of LED groups, the LED driving method comprising:
after a system is powered on, after an LED reset module finishes resetting, acquiring driving current, scanning matrix data and grouped data of an LED matrix; the scanning matrix data comprises the column number and the row number of the LED matrix, and the grouped data comprises the number of the LED lamps which are allowed to be included at most in each group of LEDs after the LED matrix is grouped;
acquiring the driving current of each group of LEDs according to the driving current, the number of columns of the LED matrix and the number of the LED lamps which are allowed to be included at most in each group of LEDs;
acquiring the driving current of each LED according to the driving current of each group of LEDs and the number of LED lamps included in each group of LEDs, and performing driving scanning on each LED by taking the group as a unit by adopting the driving current of each LED;
wherein, the obtaining the driving current of each group of LEDs according to the driving current, the number of columns of the LED matrix, and the number of LED lamps that are allowed to be included at most in each group of LEDs comprises:
acquiring the driving scanning duty ratio of each group of LEDs according to the number of columns of the LED matrix and the number of the LED lamps which are allowed to be included at most in each group of LEDs;
acquiring the driving current of each group of LEDs according to the driving current and the driving scanning duty ratio of each group of LEDs;
the obtaining of the driving scanning duty ratio of each group of LEDs according to the number of columns of the LED matrix and the number of LED lamps that are allowed to be included at most in each group of LEDs specifically includes:
according to the formula
Figure 372402DEST_PATH_IMAGE001
Acquiring the driving scanning duty ratio of each group of LEDs; wherein,
Figure 758384DEST_PATH_IMAGE002
scanning the duty ratio for the drive of each group of LEDs, wherein N is the number of columns of the LED matrix, M is the number of the LED lamps which are allowed to be included at most in each group of LEDs, and the value range is
Figure 131597DEST_PATH_IMAGE003
(ii) a k and N are positive integers, and the value range of k is (1, (N-1)); when in use
Figure 995648DEST_PATH_IMAGE004
When the remainder is equal to 0, the value of n is 0, when
Figure 544441DEST_PATH_IMAGE004
When the remainder is not equal to 0, the value of n is 1,
Figure 960379DEST_PATH_IMAGE004
and taking an integer part.
2. The LED driving method according to claim 1, wherein the obtaining of the driving current of each group of LEDs according to the driving current and the driving scan duty cycle of each group of LEDs specifically includes:
according to the formula
Figure 696253DEST_PATH_IMAGE005
Obtaining the driving current of each group of LEDs; wherein,
Figure 488629DEST_PATH_IMAGE006
for the drive current of each set of LEDs,
Figure 626349DEST_PATH_IMAGE007
is the drive current of the LED matrix.
3. The LED driving method according to claim 2, wherein the number of LED lamps included in each group of LEDs is different, and the obtaining the driving current of each LED according to the driving current of each group of LEDs and the number of LED lamps included in each group of LEDs specifically comprises:
according to the formula
Figure 213188DEST_PATH_IMAGE008
Acquiring a driving current of each LED; wherein,
Figure 436359DEST_PATH_IMAGE009
for the drive current of each of the LEDs,Lthe number of the LED lamps included in each group of LEDs is shown.
4. An LED driving apparatus for driving LEDs in an LED matrix, the LED matrix having a plurality of driving ports and including a plurality of LED groups, the LED driving apparatus comprising:
the first acquisition module is used for acquiring the driving current, the scanning matrix data and the grouped data of the LED matrix after the LED reset module finishes resetting after the system is powered on; the scanning matrix data comprises the column number and the row number of the LED matrix, and the grouped data comprises the number of the LED lamps which are allowed to be included at most in each group of LEDs after the LED matrix is grouped;
the second obtaining module is used for obtaining the driving current of each group of LEDs according to the driving current, the number of columns of the LED matrix and the number of the LED lamps which are allowed to be included at most in each group of LEDs;
the driving module is used for acquiring the driving current of each LED according to the driving current of each group of LEDs and the number of the LEDs included in each group of LEDs, and performing driving scanning on each LED by taking the driving current of each LED as a unit;
the second obtaining module is specifically configured to:
acquiring the driving scanning duty ratio of each group of LEDs according to the number of columns of the LED matrix and the number of the LED lamps which are allowed to be included at most in each group of LEDs;
acquiring the driving current of each group of LEDs according to the driving current and the driving scanning duty ratio of each group of LEDs;
the second obtaining module is specifically configured to:
according to the formula
Figure 32426DEST_PATH_IMAGE001
Acquiring the driving scanning duty ratio of each group of LEDs; wherein,
Figure 24652DEST_PATH_IMAGE002
scanning the duty ratio for the drive of each group of LEDs, wherein N is the number of columns of the LED matrix, M is the number of the LED lamps which are allowed to be included at most in each group of LEDs, and the value range is
Figure 47972DEST_PATH_IMAGE003
(ii) a k and N are positive integers, and the value range of k is (1, (N-1)); when in use
Figure 758439DEST_PATH_IMAGE004
When the remainder is equal to 0, the value of n is 0, when
Figure 627038DEST_PATH_IMAGE004
When the remainder is not equal to 0, the value of n is 1,
Figure 4930DEST_PATH_IMAGE004
and taking an integer part.
5. An LED driving apparatus comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the steps of the LED driving method according to any one of claims 1 to 3 are implemented when the computer program is executed by the processor.
6. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the LED driving method according to any one of claims 1 to 3.
CN201810842475.3A 2018-07-27 2018-07-27 LED driving method and device and storage medium Active CN110784961B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810842475.3A CN110784961B (en) 2018-07-27 2018-07-27 LED driving method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810842475.3A CN110784961B (en) 2018-07-27 2018-07-27 LED driving method and device and storage medium

Publications (2)

Publication Number Publication Date
CN110784961A CN110784961A (en) 2020-02-11
CN110784961B true CN110784961B (en) 2021-05-14

Family

ID=69377163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810842475.3A Active CN110784961B (en) 2018-07-27 2018-07-27 LED driving method and device and storage medium

Country Status (1)

Country Link
CN (1) CN110784961B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101032890A (en) * 2006-03-07 2007-09-12 精工爱普生株式会社 Light-emitting device, electronic apparatus, and driving method
CN101546517A (en) * 2008-03-27 2009-09-30 奇景光电股份有限公司 Organic light emitting display and driving method of organic light emitting display panel
CN102314841A (en) * 2010-07-01 2012-01-11 乐金显示有限公司 The apparatus and method that are used for driving liquid crystal equipment
WO2013089506A1 (en) * 2011-12-16 2013-06-20 서울반도체 주식회사 Led driving device
CN104483876A (en) * 2014-11-30 2015-04-01 中国计量学院 Array control device applicable to scanning switch internal relay
CN206077749U (en) * 2016-08-23 2017-04-05 比亚迪股份有限公司 Matrix LED car headlamp and the automobile including which
CN107784968A (en) * 2017-11-06 2018-03-09 武汉华星光电技术有限公司 Carry on the back optical detection circuit and Related product
JP6312279B1 (en) * 2017-05-30 2018-04-18 ルミア株式会社 Light emitting diode illumination device and light emitting diode array driving device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105469731A (en) * 2016-01-28 2016-04-06 京东方科技集团股份有限公司 Array substrate, electric aging method, display device, and production method thereof

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101032890A (en) * 2006-03-07 2007-09-12 精工爱普生株式会社 Light-emitting device, electronic apparatus, and driving method
CN101546517A (en) * 2008-03-27 2009-09-30 奇景光电股份有限公司 Organic light emitting display and driving method of organic light emitting display panel
CN102314841A (en) * 2010-07-01 2012-01-11 乐金显示有限公司 The apparatus and method that are used for driving liquid crystal equipment
WO2013089506A1 (en) * 2011-12-16 2013-06-20 서울반도체 주식회사 Led driving device
CN104483876A (en) * 2014-11-30 2015-04-01 中国计量学院 Array control device applicable to scanning switch internal relay
CN206077749U (en) * 2016-08-23 2017-04-05 比亚迪股份有限公司 Matrix LED car headlamp and the automobile including which
JP6312279B1 (en) * 2017-05-30 2018-04-18 ルミア株式会社 Light emitting diode illumination device and light emitting diode array driving device
CN107784968A (en) * 2017-11-06 2018-03-09 武汉华星光电技术有限公司 Carry on the back optical detection circuit and Related product

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
体扫描三维显示系统的关键技术研究;王敏霞;《中国优秀硕士学位论文全文数据库》;20131215;全文 *

Also Published As

Publication number Publication date
CN110784961A (en) 2020-02-11

Similar Documents

Publication Publication Date Title
US20130241739A1 (en) Indicator light control device
CN112652265B (en) LED driving device
CN105530436A (en) Shooting parameter adjustment method and shooting terminal
WO2022007159A1 (en) Led control system, device, method, and storage medium
US11116061B2 (en) Light source driving device
US20220334996A1 (en) Interface switching apparatus, communication device, and interface switching method
CN110784961B (en) LED driving method and device and storage medium
CN113571012A (en) Backlight brightness adjusting method, device, equipment and storage medium
US10965314B2 (en) Compensation table compression method, display manufacturing apparatus, and memory
CN110784966B (en) LED driving current distribution method and device and storage medium
CN113643658B (en) Debugging method of display panel, display device and storage medium
RU2689431C2 (en) Dpi adaptation method and electronic device
CN111867177B (en) LED driving apparatus and method, and readable storage medium
CN111025178B (en) Stability test method for main-standby switching of power supply module and related components
CN107729577B (en) Data searching method based on multidimensional hash table, terminal equipment and storage medium
CN104050925A (en) Displaying method and device for LED display screen and LED display screen
CN112421760B (en) Method and device for controlling exciting current of UPS isolation transformer
CN110825444B (en) Pin configuration method of electronic control unit
CN108230992A (en) Luminous tube matrix drive method, device and storage medium
CN113298790A (en) Image filtering method, device, terminal and computer readable storage medium
CN111381875B (en) Data comparator, data processing method, chip and electronic equipment
CN118944661A (en) A GPIO multiplexing circuit and multiplexing method thereof
CN113056072A (en) Light intensity control method and device for indicator lamp and indicator lamp
CN107678584B (en) Driving method and device of touch screen and intelligent terminal
CN113692177B (en) Control method, device and terminal for power consumption of refrigeration system of data center

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210203

Address after: 518119 No.1 Yan'an Road, Kuiyong street, Dapeng New District, Shenzhen City, Guangdong Province

Applicant after: BYD Semiconductor Co.,Ltd.

Address before: 518118 BYD Road, Pingshan New District, Shenzhen, Guangdong 3009

Applicant before: BYD Co.,Ltd.

GR01 Patent grant
GR01 Patent grant