LED dot matrix screen brightness control method, device and equipment and storage medium
By adding clear data after the unit display data of the LED dot matrix screen and using the clock frequency to control the display time ratio, the problem of inflexible brightness adjustment of the LED dot matrix screen is solved, and brightness control and display smoothness in different scenarios are achieved.
Patent Information
- Application Number
- CN202310419255.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-14
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2043-04-14
AI Technical Summary
In the prior art, LED dot matrix screens have the problem of being unable to meet the requirements of different scenarios in terms of brightness control, resulting in unsmooth display and inflexible brightness adjustment.
By adding clear data after each unit displays data, and using the clock frequency of the clear data and the next unit display data to determine the display duration ratio, the brightness of the LED dot matrix screen is controlled to ensure a smooth refresh rate.
Flexible control of the brightness of the LED dot matrix screen is achieved in different scenarios, ensuring the smoothness and fluidity of the display.
Smart Images

Figure CN118800167B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronics, and in particular to an LED dot matrix screen brightness control method, device, equipment and storage medium. BACKGROUND
[0002] At present, LED dot matrix screens are widely used because they can display various Chinese characters, letters, numbers, pictures and the like and can realize dynamic movement. An LED dot matrix screen is a display set composed of a plurality of LED lamp beads through a specific circuit structure, and each LED lamp bead belongs to an independent LED display unit. By placing a dot matrix font library at any position of the LED dot matrix screen, the LED dot matrix screen can display a pattern corresponding to the dot matrix font library. When displaying, the dot matrix font library is generally stored in a storage medium such as FLASH, and when performing a display action, the font in the storage medium is read into the memory, and the CPU can light up the LED dot matrix screen according to the dot matrix font library in the memory.
[0003] However, when the LED dot matrix screen is applied to various scenes, different scenes have different requirements for brightness, and therefore, how to realize brightness control of the LED dot matrix screen is a problem to be solved. SUMMARY
[0004] The present application provides an LED dot matrix screen brightness control method, device, equipment and storage medium to solve the brightness control of the LED dot matrix screen in the prior art.
[0005] The present application provides an LED dot matrix screen brightness control method, comprising:
[0006] obtaining a target dot matrix set, the target dot matrix set comprising at least one target dot matrix data;
[0007] determining at least two unit display data arranged in a display direction corresponding to the target dot matrix set based on LED dot matrix screen parameters and the order of the target dot matrix data, the LED dot matrix screen parameters comprising the distribution row number or the distribution column number of LED lamp beads in the LED dot matrix screen, and the display direction comprising a row display direction or a column display direction;
[0008] adding zero data after the display data of each unit to determine a unit data set corresponding to the target dot matrix set, determining a display time length ratio of the display data of each unit and the corresponding zero data based on the clock frequency of the corresponding zero data and the next unit display data, and the display time length ratio is used for brightness control of the display data;
[0009] The unit data set is sent to a shift chip according to a display direction and unit by unit based on the clock frequency corresponding to each display data and each clear data in the unit data set, and the shift chip is used to send the unit data set to the LED dot matrix screen for display.
[0010] The LED dot matrix screen brightness control method provided in the application determines the display time length ratio of the display data and the corresponding clear data of each unit based on the clock frequency of the corresponding clear data and the next unit display data, and includes the following steps:
[0011] The data amount of the target unit data in the unit data set is determined, and the target unit data includes clear data or next unit display data.
[0012] The transmission time length of the target unit data of each unit is determined based on the clock frequency and the data amount of the target unit data.
[0013] The display time length ratio of the display data corresponding to the clear data and the clear data is determined based on the transmission time length ratio of the clear data and the next unit display data.
[0014] Before the transmission time length of the target unit data of each unit is determined based on the data amount and the clock frequency of the target unit data, the LED dot matrix screen brightness control method provided in the application further includes the following steps:
[0015] The clock frequency corresponding to each target unit data input by a user is obtained.
[0016] The LED dot matrix screen brightness control method provided in the application sends the unit data set in the unit data set to a shift chip according to a display direction and unit by unit based on the clock frequency corresponding to each display data and each clear data, and includes the following steps:
[0017] After each unit data in the unit data set is sent to the shift chip based on the clock frequency corresponding to each display data and each clear data, a latch signal is sent to the shift chip, the latch signal is used to instruct the shift chip to send the received data to the LED dot matrix screen, and the time length interval between the latch sending time of the latch signal and the end time of the sending of the received data is less than a first preset threshold.
[0018] The LED dot matrix screen brightness control method provided in the application determines at least two unit display data corresponding to the target dot matrix set arranged in a display direction based on the LED dot matrix screen parameters and the sorting of each target dot matrix data, and includes the following steps:
[0019] determine a display data subset corresponding to each of the target dot data based on the LED dot screen parameter;
[0020] determine at least two unit display data corresponding to the target dot set based on the sorting of each of the display data subset.
[0021] According to the LED dot screen brightness control method provided by the application, the sum of the display time length of each display data and the corresponding clear data is equal.
[0022] According to the LED dot screen brightness control method provided by the application, the method further comprises:
[0023] In the case that the display time length ratio is greater than or equal to a second preset threshold, trigger the first clock frequency of the corresponding unit clear data and the second clock frequency of the next unit display data, the first clock frequency is higher than the current clock frequency of the corresponding unit clear data, and the second clock frequency is lower than the current clock frequency of the next unit display data;
[0024] In the case that the display time length ratio is less than a third preset threshold, trigger the third clock frequency of the corresponding unit clear data and the fourth clock frequency of the next unit display data, the third clock frequency is lower than the current clock frequency of the corresponding unit clear data, and the fourth clock frequency is higher than the current clock frequency of the next unit display data, wherein the third preset threshold is less than the second preset threshold.
[0025] The application also provides an LED dot screen brightness control device, comprising:
[0026] The acquisition module is used to acquire a target dot set, and the target dot set comprises at least one target dot data;
[0027] The first determination module is used to determine at least two unit display data arranged in a display direction corresponding to the target dot set based on the LED dot screen parameter and the sorting of each target dot data, the LED dot screen parameter comprises the distribution row number or the distribution column number of LED lamp beads in the LED dot screen, and the display direction comprises a row display direction or a column display direction;
[0028] The second determination module is used to add clear data after each unit display data to determine a unit data set corresponding to the target dot set, determine the display time length ratio of each unit display data and the corresponding clear data based on the clock frequency of the corresponding clear data and the next unit display data, and the display time length ratio is used for brightness control of the display data.
[0029] The sending module is configured to send the unit data set to a shift chip in a display direction according to a clock frequency corresponding to each display data and each clear data in the unit data set, and the shift chip is configured to send the unit data set to the LED dot matrix screen for display.
[0030] The application further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the LED dot matrix screen brightness control method according to any one of the above when executing the program.
[0031] The application further provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executable on a processor to implement the LED dot matrix screen brightness control method according to any one of the above.
[0032] The LED dot matrix screen brightness control method, device, equipment and storage medium provided by the application determine at least two unit display data through a target dot matrix set, add clear data after each unit display data, determine the display time ratio of each unit display data and corresponding clear data through the clock frequency of the corresponding clear data and the next unit display data, control the brightness of each unit display data through the display time ratio on the basis of ensuring the smooth refresh rate, and meet the use of different scenes. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the present application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0034] Figure 1 is a flowchart of the LED dot matrix screen brightness control method provided by the embodiment of the present application;
[0035] Figure 2 is a display cycle schematic diagram of the LED dot matrix screen provided by the prior art;
[0036] Figure 3 is a display cycle schematic diagram of the LED dot matrix screen provided by the embodiment of the present application;
[0037] Figure 4 is an example schematic diagram of the filled area provided by the embodiment of the present application;
[0038] Figure 5 is a transmission schematic diagram of the target dot matrix set provided by the embodiment of the present application;
[0039] Figure 6 is a structural schematic diagram of an LED dot matrix screen brightness control device provided by an embodiment of the present application;
[0040] Figure 7 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0041] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described below in connection with the drawings in the present application, which will make the technical solutions in the present application clear and complete. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0042] To realize the brightness control of the LED dot matrix screen, an embodiment of the present application provides an LED dot matrix screen brightness control method, Figure 1 is a flowchart of the LED dot matrix screen brightness control method provided by an embodiment of the present application, as Figure 1 shown, the method comprises:
[0043] Step 110, obtaining a target dot matrix set, the target dot matrix set comprising at least one target dot matrix data.
[0044] Optionally, at least one target data required to be displayed according to an application scenario can be a Chinese character, a letter, a number, a picture, etc., the corresponding target dot matrix data is read from a dot matrix font library, and a target dot matrix set is constructed through the display order of each dot matrix data. In the dot matrix font library, each Chinese character, letter, number, picture, etc. stored is divided into multiple dots, such as 16*16, 8*16, 32*32 dots, etc., and the corresponding Chinese character, letter, number, picture, etc. is represented through the pixel set of the dots. Each dot corresponds to an LED lamp bead in the LED dot matrix screen, and the on-off state of each lamp bead represents the pixel of the dot, for example, the binary number "1" can indicate that the lamp bead is on, and the binary number "0" can indicate that the lamp bead is off. For example, taking each target data required to be displayed according to an application scenario as "he", "zuo", "yu", "kuai", taking "he" as an example, 11*13 dots can be included, and the target dot matrix data corresponding to the Chinese character "he" is constructed through the pixel set of each dot. Similarly, based on the display order of each Chinese character in "cooperation and pleasure" and the target dot matrix data corresponding to each Chinese character, the target dot matrix set corresponding to "cooperation and pleasure" is constructed.
[0045] Optionally, the distribution of the LED lamp beads of the LED dot matrix screen can comprise 32*64, 64*64, 32*128, etc., and the present application does not limit this.
[0046] Step 120: Based on the LED dot matrix screen parameters and the sorting of each target dot matrix data, determine at least two units of display data arranged in a display direction corresponding to the target dot matrix set, the LED dot matrix screen parameters include the number of distribution rows or columns of LED lamp beads in the LED dot matrix screen, and the display direction includes a row display direction or a column display direction.
[0047] Specifically, after determining the target dot matrix set and the display direction corresponding to the target dot matrix set, in order to further determine the position of the target dot matrix set in the LED dot matrix screen to be displayed to achieve a better display effect, in an embodiment of the present invention, at least two units of display data can be determined by sorting the LED dot matrix screen parameters and each target dot matrix data.
[0048] For example, taking the target dot matrix set as "Happy Cooperation", if the display direction is the row display direction, the dot matrix data of each row in each target dot matrix data can be first determined according to the number of columns of the distribution of LED lamp beads in the LED dot matrix screen, that is, the dot matrix data corresponding to "合", the dot matrix data corresponding to "作", the dot matrix data corresponding to "享", and the dot matrix data corresponding to "快" are determined in turn by row, and then the multi-unit display data corresponding to "Happy Cooperation" is determined according to the display order of "Happy Cooperation". Taking the target dot matrix data as "close", which includes 11*13 pixels, as an example, when the display direction is row display direction, the multi-unit display data corresponding to "close" can be determined as follows: 00000100000, 00001010000, 0001000100, 00100000100, 01000000010, 10011111001, 00000000000, 00111111100, 00100000100, 00100000100, 00100000100, 00111111100. The number of display data units is 13, and the number of bits of display data per unit is 11. 1 indicates that the LED is on, and 0 indicates that the LED is off.
[0049] If the display direction is the column display direction, the dot matrix data of each column in each target dot matrix data can be determined according to the distribution number of rows of LED lamp beads in the LED dot matrix screen, and the multi-cell display data corresponding to the target dot matrix set can be determined according to the ordering of each target dot matrix data in the target dot matrix set. Taking 'he' as an example, when the display direction is the column display direction, the multi-cell display data corresponding to 'he' can be determined as 0000010000000, 0000100000000, 0001000111111, 0010010100001, 0100010100001, 1000010100001, 0100010100001, 0010010100001, 0001000111111, 0000100000000, 0000010000000 in sequence. In the example, the number of cells of the display data is 11, and the bit data amount of each cell display data is 13.
[0050] In step 130, the zero-clearing data is added after the display data of each cell to determine the cell data set corresponding to the target dot matrix set, and the display time ratio of the display data and the corresponding zero-clearing data of each cell is determined based on the clock frequency of the corresponding zero-clearing data and the next cell display data, and the display time ratio is used for brightness control of the display data.
[0051] Specifically, in the prior art, the LED dot matrix screen is controlled by a micro control unit (MCU) through a driving circuit, and the MCU realizes the output of signals through a communication bus such as an SPI bus. Figure 2 is a display cycle schematic diagram of the LED dot matrix screen provided by the prior art, as Figure 2As shown, the MCU takes T as the unit preparation time for each target dot matrix data read from the dot matrix font library, and scans the target dot matrix data row by row or column by column through the t0 duration, and turns off the screen for t1 duration. The display action can be completed through the communication bus controller in conjunction with DMA. This process basically does not consume CPU. Therefore, when the MCU starts the display action, it will also start preparing the next target dot matrix data. That is, when the MCU starts the display action of the first target dot matrix data at the beginning of the t0 time period, it starts scanning the second target dot matrix data row by row or column by column, and it takes T unit preparation time to complete the preparation of the second target dot matrix data. The cycle is repeated in sequence to complete the continuous display of the LED dot matrix screen. In addition, since the driving circuit of the LED dot matrix screen cannot complete brightness control by controlling the magnitude of the hardware current, that is, the current of the driving circuit is fixed, for the LED dot matrix screen, the brightness can only be controlled by the proportion of the display time within the unit time. From the above, it can be seen that the brightness of the screen can be controlled by adjusting the ratio of the display time to the off time, that is, brightness control can be achieved through t0 / t1. If the screen brightness needs to be increased, the proportion of the display time t0 can be increased. If the screen brightness is reduced, the proportion of the display time t0 can be reduced. However, if the off time t1 is too long, the interval between two adjacent target dot matrix data is long, resulting in jumping of the LED dot matrix screen during display, resulting in low display smoothness. This is because in actual display, for each target dot matrix data, the display time t0 is divided into several equal parts, that is, each row or column is lit for the same length of time. For example, when displaying by column, when the number of columns of the LED dot matrix screen is n, t0 is divided into n equal parts. If displaying by row, when the number of rows of the LED dot matrix screen is m, t0 is divided into m equal parts. If only the off time t1 is dynamically adjusted, the interval between the display of the last column of the current target dot matrix data and the first column of the next target dot matrix data will be too long, causing the LED dot matrix screen to jump and the picture flow rate to decrease.
[0052] therefore, Figure 3 Schematic diagram of the display cycle of the LED dot matrix screen provided by the embodiment of the present invention, such as Figure 3 As shown in the embodiment of the present invention, the clearing data is added after each unit displays the data, which is equivalent to Figure 2The off time t1 in the illustration is dispersed to each unit display data, so that the display interval time of any two unit display data is more uniform, and the refresh rate is ensured to be smooth. Meanwhile, the brightness control through t0 / t1 becomes the brightness control through the ratio of each unit display data DTon and each unit off time DToff. Increasing the ratio increases the brightness, and decreasing the ratio decreases the brightness. The brightness control of the entire screen is realized through the brightness control of each unit. DTon / DToff is the display time ratio of each unit display data and the corresponding zero data. The unit display time ratio can be determined through the clock frequency of the corresponding zero data and the next unit display data.
[0053] In addition, for the brightness control of each unit data, the display time ratio of the unit can be controlled. When the unit data set is sent unit by unit, the data transmission rate of each unit data and the data transmission time of each unit data can be determined according to the corresponding clock frequency of each unit data. When the MCU starts the display action, it also starts to prepare the characteristics of the next target dot matrix data. Therefore, the target time of the current unit during display can be controlled through the data transmission time of the next unit. The current unit can be display data or zero data. The display data is represented by the lighting of the corresponding lamp bead during display, and the zero data is represented by the extinguishing of the lamp bead during display.
[0054] It should be noted that since a column is controlled by the output signal of a 3-8 decoder or a 4-16 decoder, the output of the decoder always selects a high level, so at any time, one unit data is selected, that is, the screen cannot be turned off by controlling the decoder, and only by transmitting all 0 data to the shift chip can the LED lamp bead of the corresponding column or row be extinguished.
[0055] Step 140, based on the clock frequency corresponding to each display data and each zero data in the unit data set, the unit data set is sent to the shift chip unit by unit in the display direction, and the shift chip is used to send the unit data set to the LED dot matrix screen for display.
[0056] Specifically, in the prior art, the MCU generally controls the time length by starting a timer. Starting the timer will introduce several interrupts, and the control process is relatively complex. Therefore, in the embodiment of the present application, by determining the clock frequency of each unit data, the shift chip can send the unit data to the LED dot matrix screen for display after the unit data set is sent to the shift chip unit by unit. Since the clock frequencies of different units are different, the brightness control of each unit display data can be realized by controlling the clock frequency.
[0057] Optionally, the determining, based on the LED dot matrix screen parameters and the sorting of the target dot matrix data, of at least two unit display data corresponding to the target dot matrix set arranged in a display direction, comprises:
[0058] determining, based on the LED dot matrix screen parameters, of a display data subset corresponding to each of the target dot matrix data;
[0059] determining, based on the sorting of each of the display data subsets, of at least two unit display data corresponding to the target dot matrix set.
[0060] Specifically, after the target dot matrix set is determined, there can be a case that a display area corresponding to each of the target dot matrix data is less than or equal to the LED dot matrix screen, in order to improve the display effect, in the embodiment of the present application, the size of the LED dot matrix screen is determined to determine a display data subset corresponding to each of the target dot matrix data, so that the bit data amount of each unit display data in the display data subset is consistent with the LED dot matrix screen, and the sorting of each of the target dot matrix data, i.e. the sorting of each of the display data subsets, is used to determine at least two unit display data corresponding to the target dot matrix set.
[0061] Optionally, taking the column display direction as an example, if the number of LED lamp beads in each column of the LED dot matrix screen is 16, and the bit data amount of each unit dot matrix data in the target dot matrix data is also 16, the dot matrix data corresponding to the target dot matrix data can be directly determined as the display data subset. If the number of LED lamp beads in each column of the LED dot matrix screen is 16, and the bit data amount of each unit dot matrix data in the target dot matrix data is 8, each unit dot matrix data needs to be supplemented with 8 bits of 0, so that the bit data amount of each unit dot matrix data after the 0 is supplemented is the same as the number of LED lamp beads in each column of the LED dot matrix screen.
[0062] Exemplarily, Figure 4 is an example schematic diagram of the filled area provided by the embodiment of the present application, as Figure 4As shown, taking the distribution of the LED dot matrix screen as 16*32 and the target dot matrix data as "conjunction" and the distribution range corresponding to the "conjunction" as 11*13 as an example, it is obvious that the distribution range corresponding to the "conjunction" is smaller than the distribution of the LED dot matrix screen, and therefore 0 can be filled according to the display direction. Taking the display direction as the row display direction, the multi-cell display data corresponding to the "conjunction" is respectively: the 0th row to the 5th row and the 19th row to the 31st row are all 0000000000000000, and the 6th row to the 18th row are filled with 00 before each row of dot matrix data in the target dot matrix data corresponding to the "conjunction" and filled with 000 after each row of dot matrix data, i.e. the 6th row is 0000000100000000, the 7th row is 0000001010000000, the 8th row is 0000010001000000, the 9th row is 0000100000100000,..., and the 18th row is 0000111111100000.
[0063] In addition, if the display direction is the column display direction, the multi-cell display data corresponding to the "conjunction" can be: the 0th column to the 2nd column and the 13th column to the 15th column are all 00000000000000000000000000000000, and the 2nd column to the 12th column are filled with 000000 before each column of dot matrix data in the target dot matrix data corresponding to the "conjunction" and filled with 0000000000000 after each column of dot matrix data. That is, the 2nd column is 00000000000100000000000000000000, the 3rd column is 00000000001000000000000000000000,..., and the 12th column is 00000000000100000000000000000000.
[0064] Optionally, the display time length ratio of the display data and the corresponding clear data of each cell is determined, including:
[0065] The data amount of the target cell data in the cell data set is determined, the target cell data including the clear data or the next cell display data;
[0066] The transmission time length of the target cell data of each cell is determined based on the clock frequency of the target cell data and the data amount;
[0067] The display time length ratio of the display data corresponding to the clear data and the clear data is determined based on the ratio of the transmission time length of the clear data and the next cell display data.
[0068] Specifically, when determining the display duration ratio of the display data and the corresponding clear data of each unit, the transmission duration of the clear data of the unit and the display data of the next unit needs to be determined first, and the reciprocal of the clock frequency is the clock period, 1 clock pulse is transmitted in each clock period, and 1 clock pulse can only transmit 1 bit of data. Therefore, the data transmission rate can be determined by the clock frequency. After the data amount of the target unit data of each unit is determined, the transmission duration of the target unit data of the unit can be determined by the ratio of the data amount to the data transmission rate of the target unit data of the unit. That is, the transmission duration of the clear data of the unit and the display data of the next unit can be determined based on the above method, the display duration ratio of the display data and the corresponding clear data can be determined by the ratio of the transmission duration of the clear data of the unit to the display data of the next unit, and then the brightness control is realized.
[0069] Optionally, before determining the transmission duration of the target unit data of each unit based on the data amount of the target unit data and the clock frequency, the method further comprises:
[0070] Obtaining the clock frequency corresponding to each target unit data input by a user.
[0071] Optionally, the clock frequency is a hardware configuration parameter. Before transmitting the target unit data, the clock frequency corresponding to the target unit data of the unit can be obtained to control the data transmission rate corresponding to the target unit data of the unit, and then control the transmission duration of the target unit data of the unit.
[0072] Optionally, the transmitting the unit data set to the shift chip unit by unit in the display direction based on the clock frequency corresponding to each display data and each clear data in the unit data set comprises:
[0073] After transmitting each unit data in the unit data set to the shift chip based on the clock frequency corresponding to each display data and each clear data in the unit data set, a latch signal is sent to the shift chip, the latch signal is used to instruct the shift chip to transmit the received data to the LED dot matrix screen, and the time interval between the latch transmission time point of the latch signal and the end time point of the transmission of the received data is less than a first preset threshold.
[0074] Specifically, when the MCU sends the target dot matrix set to the shift chip unit by unit, it generally transmits each unit data to the shift chip through a communication bus such as the SPI bus. The transmitted data is cached inside the shift chip until the shift chip receives a latch signal. The received unit data will be applied to the pin of the shift chip to change the level of the pin, thereby sending the received unit data as a unit signal to the LED dot matrix screen for display. Before receiving the latch signal, the level of the pin will not change, that is, the unit signal will not change. Based on the characteristics of the above-mentioned shift chip, in an embodiment of the present invention, after determining a unit data set and sending it unit by unit, the MCU sends the unit data to be sent to the shift chip through the SPI bus and based on the clock frequency corresponding to the data to be sent, and immediately sends a latch signal to the shift chip after the data transmission of the unit is completed. After receiving the latch signal, the shift chip sends the unit data to be sent to the LED dot matrix screen for display by changing the level of the pin, and after sending the latch signal, the MCU immediately sends the next unit data to be sent to the shift chip through the SPI bus, and immediately sends a latch signal to the shift chip after the data transmission of the next unit to be sent is completed, that is, when the previous unit data starts to be displayed, the next unit data starts to be transmitted, and after the next unit data transmission is completed, the previous unit data display is completed, that is, the display time of the previous unit data is controlled by the transmission time of the next unit data, and the brightness of the display data of the column or row is controlled by the ratio of the display time of the display data and the cleared data in the same column or row.
[0075] For example, Figure 5 FIG. 1 is a transmission diagram of a target dot set provided by an embodiment of the present invention, such as Figure 5 As shown in the figure, taking the display direction as column display direction as an example, the data of each unit in the target dot matrix set sent by the MCU to the SPI bus is sorted as on1, off1, on2, off2, on3, off3, etc., where oni represents the display data of the i-th column and offi represents the clear data of the i-th column. Therefore, the transmission and display process of the target dot matrix set includes the following steps:
[0076] 1) MCU sends the first column display data on1 to the shift chip through the SPI bus. The transmission duration of the first column display data on1 is STon1. After the transmission of the first column display data on1 is completed, a latch signal is immediately sent to the shift chip. The shift chip then sends the first column display data on1 to the LED dot matrix screen for display.
[0077] 2) When the first column display data on1 starts to display, the MCU sends the first column zero data off1 to the shift chip through the SPI bus, and the transmission duration of the first column zero data off1 is SToff1, that is, the first column zero data off1 starts to transmit at the same time when the first column display data on1 starts to display, and when the transmission of the first column zero data off1 ends, the first column display data on1 ends to display and starts to display the first column zero data off1 because the latch signal is sent to the latch signal immediately, and the transmission duration of the first column zero data off1 SToff1 is equal to the display duration of the first column display data on1 DTon1.
[0078] 3) When the first column zero data off1 starts to display, the MCU sends the second column display data on2 to the shift chip through the SPI bus, and the transmission duration of the second column display data on2 is STon2, that is, the second column display data on2 starts to transmit at the same time when the first column zero data off1 starts to display, and when the transmission of the second column display data on2 ends, the first column zero data off1 ends to display and starts to display the second column display data on2 because the latch signal is sent to the latch signal immediately, and the transmission duration of the second column display data on2 STon2 is equal to the display duration of the first column zero data off1 DToff1, and at the same time, the brightness of the first column display data can be controlled through DTon1 / DToff1.
[0079] 4) Each unit data is sent column by column according to the target dot matrix set, and until the target dot matrix set is sent, each target dot matrix data in the target dot matrix set can be displayed while the brightness is controlled.
[0080] Optionally, the sum of the display durations of each display data and the corresponding zero data is equal.
[0081] Specifically, for a determined micro control unit MCU, the frame preparation duration T of each target dot matrix data is a fixed value, and taking the display direction as column display and the number of LED lamp beads in each column of the LED dot matrix screen as n as an example, the sum of the display durations of the display data and the zero data in each unit data is equal and is T / n. After the display duration ratio of each unit data is determined, the display duration of the display data and the display duration of the zero data in the unit can be determined respectively based on the sum of the display durations of the units and the display duration ratio of the unit data, and the display duration of the zero data is the extinguishing duration of the LED lamp bead corresponding to the unit data.
[0082] Optionally, the method further comprises:
[0083] In a case where the display duration ratio is greater than or equal to a second preset threshold, a first clock frequency of the corresponding unit zero-clearing data and a second clock frequency of the next unit display data are triggered, the first clock frequency is higher than a current clock frequency of the corresponding unit zero-clearing data, and the second clock frequency is lower than a current clock frequency of the next unit display data.
[0084] In a case where the display duration ratio is less than a third preset threshold, a third clock frequency of the corresponding unit zero-clearing data and a fourth clock frequency of the next unit display data are triggered, the third clock frequency is lower than a current clock frequency of the corresponding unit zero-clearing data, and the fourth clock frequency is higher than a current clock frequency of the next unit display data, wherein the third preset threshold is less than the second preset threshold.
[0085] Specifically, in a case where the brightness of the LED dot matrix screen is high and needs to be adjusted, that is, in a case where the display duration ratio is greater than or equal to the second preset threshold, the micro control unit MCU can adjust the brightness by increasing the clock frequency of the corresponding unit zero-clearing data, that is, by reducing the transmission duration of the corresponding unit zero-clearing data, reducing the display duration of the unit display data, and adjusting the clock frequency of the next unit display data to increase the brightness, that is, by increasing the transmission duration of the next unit display data, reducing the display duration of the unit zero-clearing data, so that the display duration ratio of the unit is reduced, and the brightness is reduced. In a case where the brightness of the LED dot matrix screen is low and needs to be adjusted, that is, in a case where the display duration ratio is less than the third preset threshold, the micro control unit MCU can adjust the brightness by reducing the clock frequency of the corresponding unit zero-clearing data, that is, by increasing the transmission duration of the corresponding unit zero-clearing data, increasing the display duration of the unit display data, and adjusting the clock frequency of the next unit display data to reduce the brightness, that is, by reducing the transmission duration of the next unit display data, reducing the display duration of the unit zero-clearing data, so that the display duration ratio of the unit is increased, and the brightness is increased. In addition, the second preset threshold and the third preset threshold can be set according to experience, and the embodiments of the present application do not limit this.
[0086] The LED dot matrix screen brightness control method provided by the embodiments of the present application determines at least two unit display data through a target dot matrix set, adds zero-clearing data after each unit display data, determines the display duration ratio of each unit display data and the corresponding zero-clearing data through the clock frequencies of the corresponding zero-clearing data and the next unit display data, controls the brightness of each unit display data through the display duration ratio on the basis of ensuring a smooth refresh rate, and meets the use of different scenes.
[0087] The LED dot matrix screen brightness control device provided by the embodiments of the present application is described below, and the LED dot matrix screen brightness control device described below can be correspondingly referred to the LED dot matrix screen brightness control method described above.
[0088] The embodiment of the present application also provides an LED dot matrix screen brightness control device, Figure 6 is a structural schematic diagram of the LED dot matrix screen brightness control device provided by the embodiment of the present application, as Figure 6 shown, the LED dot matrix screen brightness control device 600 comprises an acquisition module 610, a first determination module 620, a second determination module 630 and a sending module 640, wherein:
[0089] The acquisition module 610 is used for acquiring a target dot matrix set, wherein the target dot matrix set comprises at least one target dot matrix data;
[0090] The first determination module 620 is used for determining at least two unit display data arranged in a display direction corresponding to the target dot matrix set based on an LED dot matrix screen parameter and the sorting of each target dot matrix data, wherein the LED dot matrix screen parameter comprises the distribution row number or the distribution column number of LED lamp beads in the LED dot matrix screen, and the display direction comprises a row display direction or a column display direction;
[0091] The second determination module 630 is used for adding zero-clearing data after each unit display data to determine a unit data set corresponding to the target dot matrix set, determining a display time length ratio of each unit display data and corresponding zero-clearing data based on the clock frequency of the corresponding zero-clearing data and the next unit display data, and using the display time length ratio to control the brightness of the display data;
[0092] The sending module 640 is used for sending the unit data set to a shift chip in units of display direction based on the clock frequency corresponding to each display data and each zero-clearing data in the unit data set, and the shift chip is used for sending the unit data set to the LED dot matrix screen for display.
[0093] The LED dot matrix screen brightness control device provided by the embodiment of the present application determines at least two unit display data through a target dot matrix set, adds zero-clearing data after each unit display data, determines the display time length ratio of each unit display data and corresponding zero-clearing data based on the clock frequency of the corresponding zero-clearing data and the next unit display data, controls the brightness of each unit display data through the display time length ratio on the basis of ensuring the smooth refresh rate, and meets the use of different scenes.
[0094] Optionally, the first determination module 620 is specifically used for:
[0095] determining a display data subset corresponding to each target dot matrix data based on the LED dot matrix screen parameter;
[0096] determining at least two unit display data corresponding to the target dot matrix set based on the sorting of each display data subset.
[0097] Optionally, the second determining module 630 is specifically used for:
[0098] determining a data amount of target unit data in the unit data set, the target unit data including clear data or next unit display data;
[0099] determining a transmission duration of the target unit data of each unit based on a clock frequency of the target unit data and the data amount;
[0100] determining a display duration ratio of the clear data to corresponding display data of the clear data based on a ratio of the transmission duration of the clear data to the next unit display data.
[0101] Optionally, the LED dot matrix screen brightness control apparatus 600 is further used for:
[0102] Before determining the transmission duration of the target unit data of each unit based on the data amount and the clock frequency of the target unit data, the method further includes:
[0103] obtaining a clock frequency corresponding to each target unit data input by a user.
[0104] Optionally, the sending module 640 is specifically used for:
[0105] after sending each unit data in the unit data set to a shift chip based on the clock frequency corresponding to each display data and each clear data in the unit data set, sending a latch signal to the shift chip, the latch signal being used to instruct the shift chip to send the received data to the LED dot matrix screen, and a time interval between a latch sending time of the latch signal and an end time of sending of the received data being less than a first preset threshold.
[0106] Optionally, a sum of the display duration of each display data and the display data corresponding clear data is equal.
[0107] Optionally, the LED dot matrix screen brightness control apparatus 600 is further used for:
[0108] in a case where the display duration ratio is greater than or equal to a second preset threshold, triggering a first clock frequency of the corresponding unit clear data and a second clock frequency of the next unit display data, the first clock frequency being higher than a current clock frequency of the corresponding unit clear data, and the second clock frequency being lower than a current clock frequency of the next unit display data;
[0109] When the display time ratio is less than the third preset threshold, the third clock frequency of the corresponding unit clearing data and the fourth clock frequency of the next unit display data are triggered, the third clock frequency is lower than the current clock frequency of the corresponding unit clearing data, and the fourth clock frequency is higher than the current clock frequency of the next unit display data, wherein the third preset threshold is less than the second preset threshold.
[0110] Figure 7 Schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730, and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 communicate with each other via the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the LED dot matrix screen brightness control method, which includes:
[0111] Acquire a target point array set, wherein the target point array set includes at least one target point array data;
[0112] Determining at least two units of display data arranged in a display direction corresponding to the target dot matrix set based on LED dot matrix screen parameters and the sorting of each target dot matrix data, wherein the LED dot matrix screen parameters include the number of rows or columns of LED lamp beads in the LED dot matrix screen, and the display direction includes a row display direction or a column display direction;
[0113] adding clearing data after the display data of each unit, determining a unit data set corresponding to the target dot matrix set, and determining a display duration ratio of the display data of each unit to the corresponding clearing data based on a clock frequency of the corresponding clearing data and the next unit display data, wherein the display duration ratio is used to control the brightness of the display data;
[0114] Based on the clock frequencies corresponding to the display data and the clear data in the unit data set, the unit data set is sent to the shift chip unit by unit according to the display direction. The shift chip is used to send the unit data set to the LED dot matrix screen for display.
[0115] Further, the logic instructions in the memory 730 described above can be implemented in the form of software functional units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or parts of the present application that essentially contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0116] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program can be executed by a processor to enable a computer to execute the LED dot matrix screen brightness control method provided by the above-mentioned methods, the method comprising:
[0117] obtaining a target dot matrix set, the target dot matrix set comprising at least one target dot matrix data;
[0118] determining at least two unit display data arranged in a display direction corresponding to the target dot matrix set based on LED dot matrix screen parameters and the ordering of the target dot matrix data, the LED dot matrix screen parameters comprising the distribution row number or the distribution column number of LED lamp beads in the LED dot matrix screen, and the display direction comprising a row display direction or a column display direction;
[0119] adding zero clearing data after each unit display data to determine a unit data set corresponding to the target dot matrix set, determining a display time length ratio of each unit display data and the corresponding zero clearing data based on the clock frequency of the corresponding zero clearing data and the next unit display data, and the display time length ratio being used for brightness control of the display data;
[0120] sending the unit data set to a shift chip in units according to the display direction based on the respective clock frequencies of each display data and each zero clearing data in the unit data set, and the shift chip being used for sending the unit data set to the LED dot matrix screen for display.
[0121] In yet another aspect, the present application also provides a non-transitory computer readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the LED dot matrix screen brightness control method provided by the above-mentioned methods, the method comprising:
[0122] obtaining a target dot set, the target dot set including at least one target dot data;
[0123] determining at least two unit display data arranged in a display direction corresponding to the target dot set based on LED dot screen parameters and the order of the target dot data, the LED dot screen parameters including the distribution number of rows or columns of LED lamp beads in the LED dot screen, and the display direction including a row display direction or a column display direction;
[0124] adding zero data after each unit display data to determine a unit data set corresponding to the target dot set, determining a display time ratio of each unit display data and corresponding zero data based on the clock frequency of the corresponding zero data and the next unit display data, and the display time ratio being used for brightness control of the display data;
[0125] sending the unit data set to a shift chip in units according to the display direction based on the clock frequency corresponding to each display data and zero data in the unit data set, and the shift chip being used for sending the unit data set to the LED dot screen for display.
[0126] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0127] From the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be realized by means of software and necessary general hardware platforms, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of software products, and the computer software products can be stored in a computer readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.
[0128] It should be pointed out finally that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit the same; and although the present application has been described in detail with reference to the foregoing embodiments, it should be appreciated by those skilled in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features thereof can be replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for controlling the brightness of an LED dot matrix screen, characterized in that: include: Acquire a target point array set, wherein the target point array set includes at least one target point array data; Determining at least two units of display data arranged in a display direction corresponding to the target dot matrix set based on LED dot matrix screen parameters and the sorting of each target dot matrix data, wherein the LED dot matrix screen parameters include the number of rows or columns of LED lamp beads in the LED dot matrix screen, and the display direction includes a row display direction or a column display direction; adding clearing data after the display data of each unit, determining a unit data set corresponding to the target dot matrix set, and determining a display duration ratio of the display data of each unit to the corresponding clearing data based on a clock frequency of the corresponding clearing data and the next unit display data, wherein the display duration ratio is used to control the brightness of the display data; Based on the clock frequencies corresponding to the display data and the clear data in the unit data set, the unit data set is sent to the shift chip unit by unit according to the display direction. The shift chip is used to send the unit data set to the LED dot matrix screen for display.
2. The LED dot matrix screen brightness control method according to claim 1, characterized in that: The determining of the display duration ratio of the display data of each unit and the corresponding cleared data based on the clock frequency of the corresponding cleared data and the next unit display data includes: Determining the data volume of target unit data in the unit data set, wherein the target unit data includes cleared data or next unit display data; determining a transmission duration of the target unit data of each unit based on a clock frequency and the data volume of the target unit data; Based on the ratio of the transmission duration of the clear data to the next unit display data, a ratio of the display data corresponding to the clear data to the display duration of the clear data is determined.
3. The LED dot matrix screen brightness control method according to claim 2, characterized in that: Before determining the transmission duration of the target unit data of each unit based on the data volume and clock frequency of the target unit data, the method further includes: Get the clock frequency corresponding to each target unit data input by the user.
4. The LED dot matrix screen brightness control method according to any one of claims 1 to 3, characterized in that: The step of sending the unit data set to the shift chip unit by unit according to the display direction based on the clock frequencies corresponding to the display data and the clear data in the unit data set comprises: Based on the clock frequencies corresponding to each display data and each clear data in the unit data set, after each unit data in the unit data set is sent to the shift chip, a latch signal is sent to the shift chip, and the latch signal is used to instruct the shift chip to send the received data to the LED dot matrix screen. The time interval between the latch sending moment of the latch signal and the sending end moment of the received data is less than a first preset threshold.
5. The LED dot matrix screen brightness control method according to any one of claims 1 to 3, characterized in that: The step of determining at least two units of display data arranged in a display direction corresponding to the target dot matrix set based on the LED dot matrix screen parameters and the sorting of each target dot matrix data includes: Based on the LED dot matrix screen parameters, determining a display data subset corresponding to each target dot matrix data; Based on the order of each of the display data subsets, at least two units of display data corresponding to the target dot matrix set are determined.
6. The LED dot matrix screen brightness control method according to any one of claims 1 to 3, characterized in that: The sum of the display durations of each display data and the cleared data corresponding to the display data is equal.
7. The LED dot matrix screen brightness control method according to any one of claims 1 to 3, characterized in that: The method further comprises: When the display time ratio is greater than or equal to a second preset threshold, triggering a first clock frequency for clearing data of the corresponding unit and a second clock frequency for displaying data of the next unit, wherein the first clock frequency is higher than a current clock frequency for clearing data of the corresponding unit, and the second clock frequency is lower than a current clock frequency for displaying data of the next unit; When the display time ratio is less than the third preset threshold, the third clock frequency of the corresponding unit clearing data and the fourth clock frequency of the next unit display data are triggered, the third clock frequency is lower than the current clock frequency of the corresponding unit clearing data, and the fourth clock frequency is higher than the current clock frequency of the next unit display data, wherein the third preset threshold is less than the second preset threshold.
8. A device for controlling brightness of an LED dot matrix screen, characterized in that: include: An acquisition module, configured to acquire a target point array set, wherein the target point array set includes at least one target point array data; A first determination module is configured to determine at least two units of display data arranged in a display direction corresponding to the target dot matrix set based on LED dot matrix screen parameters and the sorting of each target dot matrix data, wherein the LED dot matrix screen parameters include the number of rows or columns of LED lamp beads in the LED dot matrix screen, and the display direction includes a row display direction or a column display direction; a second determining module, configured to add clearing data after the display data of each unit, determine a unit data set corresponding to the target dot matrix set, and determine a display duration ratio of the display data of each unit to the corresponding clearing data based on a clock frequency of the corresponding clearing data and the next unit display data, wherein the display duration ratio is used to perform brightness control of the display data; The sending module is used to send the unit data set to the shift chip unit by unit in the display direction based on the clock frequency corresponding to each display data and each clear data in the unit data set. The shift chip is used to send the unit data set to the LED dot matrix screen for display.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the LED dot matrix screen brightness control method as described in any one of claims 1-7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the LED dot matrix screen brightness control method as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Novel smart multifunctional control system for LED lattice screen
CN204288762U
Method and system for operating an active display
EP4131234A1