CN114974106A - LED display device, LED display method and electronic equipment - Google Patents

LED display device, LED display method and electronic equipment Download PDF

Info

Publication number
CN114974106A
CN114974106A CN202210920594.2A CN202210920594A CN114974106A CN 114974106 A CN114974106 A CN 114974106A CN 202210920594 A CN202210920594 A CN 202210920594A CN 114974106 A CN114974106 A CN 114974106A
Authority
CN
China
Prior art keywords
display
pin
register
led
controller module
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.)
Granted
Application number
CN202210920594.2A
Other languages
Chinese (zh)
Other versions
CN114974106B (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.)
Shenzhen Injoinic Technology Co Ltd
Original Assignee
Shenzhen Injoinic Technology 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 Shenzhen Injoinic Technology Co Ltd filed Critical Shenzhen Injoinic Technology Co Ltd
Priority to CN202210920594.2A priority Critical patent/CN114974106B/en
Priority to CN202211473255.0A priority patent/CN115731853A/en
Publication of CN114974106A publication Critical patent/CN114974106A/en
Application granted granted Critical
Publication of CN114974106B publication Critical patent/CN114974106B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • G09G3/22Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources
    • G09G3/30Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels
    • G09G3/32Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED]

Abstract

The embodiment of the application discloses an LED display device, an LED display method and electronic equipment, wherein the LED display device comprises a display controller module which is integrated in a microcontroller, and the display controller module comprises the following registers: a display pin configuration register, which configures pin numbers corresponding to the anode and the cathode of each LED; the display control register is used for realizing the enabling, reloading and LED number of the display controller module and the clock frequency division configuration of the display controller module; a display pin output enabling register is used for configuring pin output enabling corresponding to the anode and the cathode of the LED; a display pin output enable backup register to output a copy of an enable register value for the display pin; a display pin output data register is used for configuring pin output data corresponding to the anode and the cathode of the LED; a display pin outputs a data backup register that is a copy of the display pin output data register value. By adopting the embodiment of the application, the LED display performance can be improved.

Description

LED display device, LED display method and electronic equipment
Technical Field
The application relates to the technical field of electronics, in particular to an LED display device, an LED display method and electronic equipment.
Background
With the rapid development of electronic technology, electronic devices (such as mobile phones, tablet computers, etc.) are becoming more and more popular. Along with the popularization of electronic devices, the electric quantity also becomes a pain point of the electronic devices, and a TWS charging bin and the like are also favored by users.
At present, a plurality of nixie tubes or LEDs are used as display modes of battery electric quantity in products such as a mobile power supply and a TWS charging bin. The display mode has the characteristics of friendly display, low cost, low power consumption, long service life, easiness in realization and the like, but the current display mode is limited in display content or has a display flicker phenomenon, so that the problem of how to improve the LED display performance is urgently solved.
Disclosure of Invention
The embodiment of the application provides an LED display device, an LED display method and electronic equipment, and the LED display performance can be improved.
In a first aspect, an embodiment of the present application provides an LED display device, where the LED display device includes a display controller module, the display controller module is integrated inside a microcontroller MCU, and the display controller module includes: a register module including a display pin configuration register, a display control register, a display pin output enable backup register, a display pin output data backup register, wherein,
the display pin configuration register is used for configuring GPIO pin numbers corresponding to the anode and the cathode of each LED;
the display control register is used for realizing enabling, reloading and LED number of the display controller module and clock frequency division configuration of the display controller module;
the display pin output enabling register is used for configuring GPIO pin output enabling corresponding to the anode and the cathode of the LED;
the display pin output enable backup register is used for outputting a copy of an enable register value for the display pin;
the display pin output data register is used for configuring GPIO pin output data corresponding to the anode and the cathode of the LED;
and the display pin output data backup register is used for copying the output data register value of the display pin.
In a second aspect, embodiments of the present application provide an LED display method, which includes the LED display device described in the first aspect, the method includes:
initializing the display pin configuration register according to a schematic diagram of the LED display screen;
configuring LED number parameters and frequency division coefficients in the display control register;
initializing a timer, wherein the timer is used for updating the display content of the LED display screen;
acquiring initial display content;
and configuring the display pin output enabling register and the display pin output data register according to the initial display content.
In a third aspect, an embodiment of the present application provides an electronic device, which includes the LED display apparatus as described in the first aspect.
The embodiment of the application has the following beneficial effects:
it can be seen that, in the LED display device, the LED display method, and the electronic device described in the embodiments of the present application, the LED display device includes a display controller module, the display controller module is integrated inside a microcontroller MCU, and the display controller module includes: the register module comprises a display pin configuration register, a display control register, a display pin output enabling backup register, a display pin output data register and a display pin output data backup register, wherein the display pin configuration register is used for configuring GPIO pin numbers corresponding to the anode and the cathode of each LED; the display control register is used for realizing the enabling, reloading and LED number of the display controller module and the clock frequency division configuration of the display controller module; the display pin output enabling register is used for configuring GPIO pin output enabling corresponding to the anode and the cathode of the LED; a display pin output enable backup register for outputting a copy of an enable register value for the display pin; the display pin output data register is used for configuring GPIO pin output data corresponding to the anode and the cathode of the LED; the display pin outputs the data backup register for copying the register value of the data output by the display pin, so the backup register has the characteristics of less resource occupation, easy realization and the like in hardware realization, does not need to frequently refresh display (control the state of GPIO) in software realization, fully combines the respective advantages of software and hardware, greatly improves the efficiency of a processor, and further improves the LED display performance.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an LED display screen provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of an LED display device provided in an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a display controller module according to an embodiment of the present disclosure;
FIG. 4 is a schematic flow chart of an LED display method according to an embodiment of the present disclosure;
fig. 5 is a schematic flowchart of another LED display method according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The following describes embodiments of the present application in detail.
In the related art, as shown in fig. 1, fig. 1 is a 188 digital tube internal schematic diagram with 5 pins, and it can be seen that the inside is composed of a plurality of LEDs. In the following description, the nixie tube and the LED are collectively referred to as an LED. Each LED diode is controlled (turned on or off) by two GPIO pins, and compared with a common-anode nixie tube or a common-cathode nixie tube, the nixie tube has the advantages that the number of occupied GPIO pins is much smaller, and the nixie tube needs dynamic refreshing, namely, each LED is turned on in a fixed time cycle, and each LED is turned on simultaneously by using the principle of persistence of vision as long as the turning-on time of each LED is short enough.
At present, basically, when the LED display is driven, either a hardware manner or a software manner is used.
The method of using hardware has the advantages that software intervention is not needed, and the defects that the displayed content is limited and only a plurality of types of digital tubes can be fixed.
In the method, a software mode is used, just as opposed to a hardware mode, any type of nixie tube can be controlled, but the dynamic refresh is realized by controlling the state of the GPIO in a fixed time (generally in an interrupt mode) by the software. The software refreshing mode is relatively laboursome for the 8-bit 51 single chip microcomputer with lower performance, and particularly when other important tasks need to be processed (such as receiving serial port data and the like), the problem of display flicker is likely to occur due to untimely refreshing, and the problem of display flicker is caused by the fact that LED refreshing cannot be performed when other important tasks are processed. This manner of refreshing through software is relatively inefficient for the overall efficiency of the processor, even if there is no display flicker problem.
For the defects in the related art, please refer to fig. 2, and fig. 2 is a schematic structural diagram of an LED display device provided in an embodiment of the present application, where the LED display device includes an MCU and an LED display screen, the MCU includes a display controller module, that is, the display controller module is integrated inside the microcontroller MCU, and the display controller module includes: a register module including a display pin configuration register, a display control register, a display pin output enable backup register, a display pin output data backup register, wherein,
the display pin configuration register is used for configuring GPIO pin numbers corresponding to the anode and the cathode of each LED;
the display control register is used for realizing enabling, reloading and LED number of the display controller module and clock frequency division configuration of the display controller module;
the display pin output enable register is used for configuring GPIO pin output enables corresponding to the anode and the cathode of the LED;
the display pin output enable backup register is used for outputting a copy of an enable register value for the display pin;
the display pin output data register is used for configuring GPIO pin output data corresponding to the anode and the cathode of the LED;
and the display pin output data backup register is used for copying the output data register value of the display pin.
In the embodiment of the application, in terms of hardware, a digital module, called a display controller module, needs to be implemented and integrated inside the MCU. The display controller module includes the following registers. And the display pin configuration register is used for configuring GPIO pin numbers corresponding to the anode and the cathode of each LED. And the display control register comprises the enabling and reloading of the display controller module, the number of LEDs and the clock frequency division configuration of the display controller module. The clock obtained by dividing the input clock of the display controller module by the clock frequency is referred to as a refresh clock. And the display pin output enable register is used for configuring GPIO pin output enable corresponding to the anode and the cathode of the LED. The display pin outputs an enable backup register for which a copy of the enable register value is output. And the display pin output data register is used for configuring the GPIO pin output data corresponding to the anode and the cathode of the LED. A display pin outputs a data backup register that is a copy of the display pin output data register value.
In this embodiment, the register module includes a display pin configuration register (pos _ pin _ cfg, neg _ pin _ cfg), a display control register (display _ ctrl), a display pin output enable register (pos _ pin _ out _ en, neg _ pin _ out _ en), a display pin output enable backup register (pos _ pin _ out _ en _ bak, neg _ pin _ out _ en _ bak), a display pin output data register (pos _ pin _ out _ data, neg _ pin _ out _ bak), and a display pin output data backup register (pos _ pin _ out _ data _ bak, neg _ pin _ out _ bak).
In this embodiment of the application, the display pin configuration register may include a pos _ pin _ cfg register and a neg _ pin _ cfg register; a display control register, namely a display _ ctrl register; the display pin output enable register may include a pos _ pin _ out _ en register and a neg _ pin _ out _ en register; the display pin output enable backup register may include a pos _ pin _ out _ en _ bak register and a neg _ pin _ out _ en _ bak register; the display pin output data register may include a pos _ pin _ out _ data register and a neg _ pin _ out _ data register; the display pin output data backup register may include a pos _ pin _ out _ data _ bak register and a neg _ pin _ out _ data _ bak register.
Optionally, the display controller module is configured to reset through an internal reset signal when the MCU is started;
the display control register is used for controlling the positive and negative electrode output enable of one LED by using the value of the display pin output enable backup register in each refresh clock after the reset is finished and the enable bit of the display control register is written to be 1 by software, and controlling the positive and negative electrode output data of one LED by using the value of the display pin output data backup register; counting from zero, and adding 1 to each refreshing clock until the number of LEDs in the display control register is reached;
the display control register is further configured to copy the value of the display pin output enable register to the display pin output enable backup register and copy the value of the display pin output data register to the display pin output data backup register when the reload bit in the display control register is written to 1 by software.
In the specific implementation, when the MCU is started, the display controller module is reset by an internal reset signal, and after the reset is completed, after the software writes the enable bit of the display control register to 1, the display controller module controls the positive and negative output enables of one LED using the value of the display pin output enable backup register in each refresh clock, and controls the positive and negative output data of one LED using the value of the display pin output data backup register. Counting from zero, adding 1 to each refresh clock, and repeating the steps until the number of LEDs in the display control register is increased. When software writes 1 in the reloading bit in the display control register, the display controller module copies the value of the display pin output enable register to the display pin output enable backup register, and copies the value of the display pin output data register to the display pin output data backup register.
In the embodiment of the application, in terms of software, according to an LED schematic diagram to be displayed, a display pin configuration register, a display control register, a display pin output enable register, and a display pin output data register of a display controller module are configured, then a reload bit of the display control register is written with 1, and finally an enable bit of the display control register is written with 1. When the content of the display needs to be changed, only the display pin output enabling register and the display pin output data register need to be changed, and then the reloading bit of the display control register is written with 1.
In the embodiment of the application, an LED display method realized in a software and hardware combination mode is provided. The display method has the characteristics of less resource occupation, easy realization and the like in hardware realization. In software implementation, frequent refreshing of the display (control of the state of the GPIO) is not needed, the respective advantages of software and hardware are fully combined, and the efficiency of the processor is greatly improved.
Optionally, the display controller module includes a clock pin, a reset pin, a bus pin, and an output pin, where the clock pin is used to input a clock signal of the display controller module;
the reset pin is used for inputting a reset signal of the display controller module;
the bus pin is used for connecting the MCU internal bus; the output pin is used for outputting an output signal of the display controller module, and the output pin is also used for connecting a pin of the LED display screen.
In a specific implementation, as shown in fig. 3, the display controller module may include a clock pin clk, a reset pin rst, a bus pin sys _ bus [ … ], and an output pin gpio [ … ], where clk, rst, and sys _ bus [ … ] may also be input signals of the display controller module, and gpio [ … ] is an output signal of the display controller module. Wherein clk refers to a clock signal of the display controller module, rst refers to a reset signal of the display controller module, sys _ bus [ … ] refers to a signal connected to the MCU internal bus, which may include at least one signal, which may include at least one of: address, data, etc., which are not limited herein, the MCU can read and write the register module inside the display controller module through the sys _ bus. gpio [ … ] is the output signal of the display controller module, which is connected to the LED display screen pin, gpio [0] is connected to the first pin of the LED display screen, gpio [1] is connected to the second pin of the LED display screen, and so on.
Optionally, the display controller module further includes a frequency dividing module and a refreshing module;
the frequency division module is used for counting the clock signal from 0 when the enable bit of the display controller module is enabled, and outputting a rising edge pulse signal with a clk duration when the counted value is greater than a frequency division coefficient;
and the refreshing module is used for turning off all pin output enabling when the display controller module enabling bit is enabled and the rising edge pulse signal is 1, and determining the output enabling and the positive pin and the negative pin of the output data according to the LED refreshing index variable.
In a specific implementation, as shown in fig. 3, the frequency dividing module counts the input clock clk when display _ ctrl [0] is equal to 1, starts counting from 0, outputs a rising edge pulse signal tick having a duration of one clk when the count value is greater than or equal to the value of display _ ctrl [ k + m +1: m +2], starts counting from 0, and loops.
When display _ ctrl [0] is equal to 1 and tick =1, all gpio output enable is turned off, the output data is set to 0, and then the positive gpio and the negative gpio for outputting the enable and output data can be determined according to the current value of LED _ index. For example, the following steps are carried out:
when n =3, when led _ index =1, pos _ pin _ cfg [5:3] represents the positive gpio pin number, neg _ pin _ cfg [5:3] represents the negative gpio pin number, pos _ pin _ out _ en _ bak [1] represents the positive gpio output enable, neg _ pin _ out _ en _ bak [1] the negative gpio output enable, pos _ pin _ out _ data _ bak [1] represents the positive gpio output data, neg _ pin _ out _ data _ bak [1] the negative gpio output data. In a specific implementation, every time an LED is refreshed, 1 is added to the value of the LED _ index, and when the value of the LED _ index is greater than or equal to display _ ctrl [ m:1], the value of the LED _ index is set to 0, and the steps are repeated.
Optionally, the display pin configuration register includes: a first display pin configuration register and a second display pin configuration register;
the first display pin configuration register is used for configuring a positive pin of the LED display screen according to the following formula:
2 n >=a
wherein n represents the digit, and a represents the maximum pin number of the LED display screen.
In specific implementation, the display pin configuration register comprises a pos _ pin _ cfg register, which is used for configuring the anode pin of the LED display screen according to formula 2 n >= number of pins of LED display panel, where n represents the number of bits, e.g. n =3 if LED display panels with a maximum of 5 pins need to be supported, then pos _ pin _ cfg [ n-1: 0]]Then represents the anode pin number of the first LED of the LED display screen, pos _ pin _ cfg [ n +2: n](ii) a The number of the anode pin of the second LED of the LED display screen is represented, and so on. The display pin configuration register may also include a neg pin cfg register for configuring the LED display screen negative pin, similar to the pos pin cfg register.
Optionally, the display control register is configured to:
configuring an enabling function according to an enabling bit of a display controller module of the display control register;
resetting and reloading according to the bit number setting of the LED display screen, backing up the value of the display pin output enabling register to the display pin output enabling backup register after the reloading is effective, and backing up the value of the display pin output data register to the display pin output data backup register;
the maximum division factor is determined according to the following formula:
2 k >=c
where k represents the number of bits and c represents the maximum division factor.
Wherein, the display control register is a display _ ctrl register, display _ ctrl [0]Indicating a display controller module enable bit, a 1 indicating enable, and a 0 indicating disable. According to equation 2 m >=4, display _ ctrl [ m:1] for a maximum number of LEDs (LED _ max) of an LED display screen, where m represents a number of bits, e.g., an LED display screen with a maximum of 16 LEDs needs to be supported]And the number of the LEDs of the LED display screen is represented. display _ ctrl [ m +1 [ ]]Indicating reload, write 1 valid, after write 1The display controller module copies the value of the pin out enable register pos _ pin _ out _ en to the pin out enable backup register pos _ pin _ out _ en _ bak, copies the value of the neg _ pin _ out _ en register to the neg _ pin _ out _ en _ bak, copies the value of the pos _ pin _ out _ data register to the pos _ pin _ out _ data _ bak, and copies the value of the neg _ pin _ out _ data register to the neg _ pin _ out _ data _ bak.
In addition, the value of the maximum division factor is determined according to equation 2 k >= maximum division factor, display _ ctrl [ k + m +1: m +2 = maximum division factor]And k represents the number of register bits occupied by the frequency division coefficient.
In a specific implementation, the pos _ pin _ out _ en register has LED _ max bits valid, and each bit represents the positive output enable of one LED.
In a specific implementation, the neg _ pin _ out _ en register has valid LED _ max bits, each bit representing the negative output enable of one LED.
The pos _ pin _ out _ data register has valid LED _ max bits, and each bit represents the positive output data of one LED.
The neg _ pin _ out _ data register has valid LED _ max bits, and each bit represents the negative output data of one LED.
It can be seen that, in the LED display device described in this embodiment of the present application, the LED display device includes a display controller module, the display controller module is integrated inside the microcontroller MCU, and the display controller module includes: the register module comprises a display pin configuration register, a display control register, a display pin output enabling backup register, a display pin output data register and a display pin output data backup register, wherein the display pin configuration register is used for configuring GPIO pin numbers corresponding to the anode and the cathode of each LED; the display control register is used for realizing the enabling, reloading and LED number of the display controller module and the clock frequency division configuration of the display controller module; the display pin output enabling register is used for configuring GPIO pin output enabling corresponding to the anode and the cathode of the LED; a display pin output enable backup register for outputting a copy of an enable register value for the display pin; the display pin output data register is used for configuring GPIO pin output data corresponding to the anode and the cathode of the LED; the display pin outputs the data backup register for copying the register value of the data output by the display pin, so the backup register has the characteristics of less resource occupation, easy realization and the like in hardware realization, does not need to frequently refresh display (control the state of GPIO) in software realization, fully combines the respective advantages of software and hardware, greatly improves the efficiency of a processor, and further improves the LED display performance.
Further, as shown in fig. 4, fig. 4 is a diagram of an LED display method provided in the embodiment of the present application, which is applied to the LED display device shown in fig. 2, and specifically includes the following steps:
401. and initializing the display pin configuration register according to a schematic diagram of the LED display screen.
402. And configuring the LED number parameters and the frequency division coefficients in the display control register.
403. Initializing a timer, wherein the timer is used for updating the display content of the LED display screen.
404. Initial display content is obtained.
405. And configuring the display pin output enabling register and the display pin output data register according to the initial display content.
In the embodiment of the application, the LED number parameter is used for determining the maximum value of the LED _ index; the division factor is used to divide the input clock clk, since it is possible that the frequency of clk is high.
The method comprises the steps of initializing a pos _ pin _ cfg register and a neg _ pin _ cfg register according to a schematic diagram of an LED display screen to be displayed, configuring the value of the number display _ ctrl [ m:1] of LEDs and the value of a frequency division coefficient display _ ctrl [ k + m +1: m +2] in the display _ ctrl register, then initializing a timer, updating display contents of the LED display screen, and then configuring a display pin output enabling register pos _ pin _ out _ en, a neg _ pin _ out _ en, a display pin output enabling backup register pos _ pin _ out _ data and a neg _ pin _ out _ data register according to initial contents to be displayed.
Optionally, when the enable bit of the display control register is 1, the value of the display pin output enable register and the value of the display pin output enable backup register are reloaded with the corresponding display pin output enable backup register and the display pin output data backup register, so that the display control register is enabled.
In specific implementation, the value of display _ ctrl [ m +1] is set to 1, the hardware will automatically reload the values of the display pin output enable register pos _ pin _ out _ en, neg _ pin _ out _ en, the display pin output enable backup register pos _ pin _ out _ data, and neg _ pin _ out _ data registers to the corresponding display pin output data registers pos _ pin _ out _ data, neg _ pin _ out _ bak, the display pin output data backup register pos _ pin _ out _ data _ bak, and neg _ pin _ out _ data _ bak registers, and finally the value of display _ ctrl [0] is set to 1, enabling the display controller module.
Optionally, when the timer ends, the display pin output enable register and the display pin output data register are updated according to a next display content, and the next display content is updated by setting the display control register reload bit to be 1.
In specific implementation, when the timer is up, the display pin output enabling registers pos _ pin _ out _ en and neg _ pin _ out _ en and the display pin output data registers pos _ pin _ out _ data and neg _ pin _ out _ data are updated according to the content to be displayed, and then the value of display _ ctrl [ m +1] is set to 1 for reloading, so that the updated content can be displayed.
For example, as shown in fig. 5, when the software program starts to run, the pos _ pin _ cfg register and the neg _ pin _ cfg register are initialized according to a specific LED screen (i.e. an LED display screen schematic diagram to be displayed), and the display _ ctrl register is configured: the frequency division coefficient, the number of LEDs, namely the value of the number of LEDs display _ ctrl [ m:1] in the display _ ctrl register and the value of the frequency division coefficient display _ ctrl [ k + m +1: m +2 ]. A timer is then initialized, which is used to update the display content of the LED display screen. Then, according to the initial content to be displayed, the display pin output enable registers pos _ pin _ out _ en and neg _ pin _ out _ en, the display pin output enable backup registers pos _ pin _ out _ data and neg _ pin _ out _ data are configured. Setting the value of display _ ctrl [ m +1] to 1, the hardware will automatically reload the values of display pin output enable register pos _ pin _ out _ en, neg _ pin _ out _ en, display pin output enable backup register pos _ pin _ out _ data, neg _ pin _ out _ data to the corresponding display pin output data register pos _ pin _ out _ data, neg _ pin _ out _ bak, display pin output data backup register pos _ pin _ out _ data _ bak, neg _ pin _ out _ data _ bak, and finally setting the value of display _ ctrl [0] to 1, so as to enable the display controller module. When the timer is up, the display pin output enabling registers pos _ pin _ out _ en, neg _ pin _ out _ en and the display pin output data registers pos _ pin _ out _ data and neg _ pin _ out _ data are updated according to the content to be displayed, then the value of display _ ctrl [ m +1] is set to be 1 to be reloaded, and the updated content can be displayed.
In the embodiment of the application, the LED display method is realized in a mode of combining software and hardware. The display method has the characteristics of less resource occupation, easy realization and the like in hardware realization. In software implementation, frequent refreshing of the display (control of the state of the GPIO) is not needed, the respective advantages of software and hardware are fully combined, and the efficiency of the processor is greatly improved.
An embodiment of the present application further provides an electronic device, which includes the LED display device shown in fig. 2. The electronic device may be at least one of a smart phone, a tablet computer, a vehicle-mounted device, a wearable device, and the like, which is not limited herein.
The foregoing is an implementation of the embodiments of the present application, and it should be noted that, for those skilled in the art, several modifications and decorations can be made without departing from the principle of the embodiments of the present application, and these modifications and decorations are also regarded as the protection scope of the present application.

Claims (10)

1. An LED display device, characterized in that, LED display device includes display controller module, display controller module is integrated inside microcontroller MCU, display controller module includes: a register module including a display pin configuration register, a display control register, a display pin output enable backup register, a display pin output data backup register, wherein,
the display pin configuration register is used for configuring GPIO pin numbers corresponding to the anode and the cathode of each LED;
the display control register is used for realizing enabling, reloading and LED number of the display controller module and clock frequency division configuration of the display controller module;
the display pin output enabling register is used for configuring GPIO pin output enabling corresponding to the anode and the cathode of the LED;
the display pin output enable backup register is used for outputting a copy of an enable register value for the display pin;
the display pin output data register is used for configuring GPIO pin output data corresponding to the anode and the cathode of the LED;
and the display pin output data backup register is used for copying the output data register value of the display pin.
2. The LED display device of claim 1, wherein,
the display controller module is used for resetting through an internal reset signal when the MCU is started;
the display control register is used for controlling the positive and negative electrode output enable of one LED by using the value of the display pin output enable backup register in each refresh clock after the reset is finished and the enable bit of the display control register is written to be 1 by software, and controlling the positive and negative electrode output data of one LED by using the value of the display pin output data backup register; counting from zero, and adding 1 to each refreshing clock until the number of LEDs in the display control register;
the display control register is further configured to copy the value of the display pin output enable register to the display pin output enable backup register and copy the value of the display pin output data register to the display pin output data backup register when the reload bit in the display control register is written to 1 by software.
3. The LED display device according to claim 1 or 2, wherein the display controller module comprises a clock pin, a reset pin, a bus pin and an output pin, wherein the clock pin is used for inputting a clock signal of the display controller module;
the reset pin is used for inputting a reset signal of the display controller module;
the bus pin is used for connecting the MCU internal bus; the output pin is used for outputting an output signal of the display controller module, and the output pin is also used for connecting a pin of the LED display screen.
4. The LED display device of claim 3, wherein the display pin configuration register comprises: a first display pin configuration register and a second display pin configuration register;
the first display pin configuration register is used for configuring a positive pin of the LED display screen according to the following formula:
2 n >=a
wherein n represents the digit, and a represents the maximum pin number of the LED display screen.
5. The LED display device of claim 4, wherein the display control register is configured to:
configuring an enabling function according to an enabling bit of a display controller module of the display control register;
resetting and reloading according to the bit number setting of the LED display screen, backing up the value of the display pin output enabling register to the display pin output enabling backup register after the reloading is effective, and backing up the value of the display pin output data register to the display pin output data backup register;
the maximum division factor is determined according to the following formula:
2 k >=c
where k represents the number of bits and c represents the maximum division factor.
6. The LED display device of claim 3, wherein the display controller module further comprises a frequency division module and a refresh module;
the frequency division module is used for counting the clock signal from 0 when the enable bit of the display controller module is enabled, and outputting a rising edge pulse signal with a clk duration when the counted value is greater than a frequency division coefficient;
and the refreshing module is used for turning off all pin output enabling when the display controller module enabling bit is enabled and the rising edge pulse signal is 1, and determining the output enabling and the positive pin and the negative pin of the output data according to the LED refreshing index variable.
7. An LED display method applied to the LED display apparatus according to any one of claims 1 to 6, the method comprising:
initializing the display pin configuration register according to a schematic diagram of the LED display screen;
configuring LED number parameters and frequency division coefficients in the display control register;
initializing a timer, wherein the timer is used for updating the display content of the LED display screen;
acquiring initial display content;
and configuring the display pin output enabling register and the display pin output data register according to the initial display content.
8. The method according to claim 7, wherein when the display control register enable bit is 1, the display control register is enabled by reloading the value of the display pin output enable register and the value of the display pin output data register with the corresponding display pin output enable backup register and the display pin output data backup register.
9. The method according to claim 8, wherein at the end of the timer period, the display pin output enable register and the display pin output data register are updated according to a next display content, and the next display content is updated by setting a display control register reload bit to 1.
10. An electronic device characterized in that it comprises a LED display device according to any one of claims 1-6.
CN202210920594.2A 2022-08-02 2022-08-02 LED display device, LED display method and electronic equipment Active CN114974106B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210920594.2A CN114974106B (en) 2022-08-02 2022-08-02 LED display device, LED display method and electronic equipment
CN202211473255.0A CN115731853A (en) 2022-08-02 2022-08-02 LED display device, related LED display method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210920594.2A CN114974106B (en) 2022-08-02 2022-08-02 LED display device, LED display method and electronic equipment

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202211473255.0A Division CN115731853A (en) 2022-08-02 2022-08-02 LED display device, related LED display method and electronic equipment

Publications (2)

Publication Number Publication Date
CN114974106A true CN114974106A (en) 2022-08-30
CN114974106B CN114974106B (en) 2022-10-18

Family

ID=82970178

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202210920594.2A Active CN114974106B (en) 2022-08-02 2022-08-02 LED display device, LED display method and electronic equipment
CN202211473255.0A Pending CN115731853A (en) 2022-08-02 2022-08-02 LED display device, related LED display method and electronic equipment

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202211473255.0A Pending CN115731853A (en) 2022-08-02 2022-08-02 LED display device, related LED display method and electronic equipment

Country Status (1)

Country Link
CN (2) CN114974106B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030222893A1 (en) * 2002-05-30 2003-12-04 Lockheed Martin Corporation Light emitting diode display and method for the illumination thereof
US20070171241A1 (en) * 2006-01-20 2007-07-26 Semiconductor Energy Laboratory Co., Ltd. Driving method of display device
CN101404133A (en) * 2008-11-04 2009-04-08 李舒 Multi-digit digital pipe control circuit and method thereof
CN201255839Y (en) * 2008-10-14 2009-06-10 昆明理工大学 Liquid medicine dosage controller
CN102190008A (en) * 2011-05-13 2011-09-21 广州国联通信有限公司 LED dynamic indicating screen of train
US8077180B1 (en) * 2007-12-21 2011-12-13 Matrox Graphics, Inc. Systems for and methods of using a display controller to output data
CN103127731A (en) * 2013-03-06 2013-06-05 浙江科技学院 Wireless interactive multifunctional LED ornamental toy with identity recognition function
CN103531145A (en) * 2013-10-12 2014-01-22 大连国宁电子有限公司 Wireless nixie tube display screen
CN104011783A (en) * 2011-10-24 2014-08-27 先进模拟科技公司 Low cost led driver with improved serial bus
CN106531062A (en) * 2016-12-01 2017-03-22 成都凯天电子股份有限公司 Display circuit device for dynamic-static driven scanning of multiple groups of LED nixie tubes
CN107240270A (en) * 2016-03-29 2017-10-10 上海中科深江电动车辆有限公司 Silent cop
CN207781155U (en) * 2017-12-28 2018-08-28 杭州之山智控技术有限公司 Circuit for improving numeral method
CN208861645U (en) * 2018-10-18 2019-05-14 南京工程学院 A kind of automobile tail light instruction massaging device
GB2564541B (en) * 2017-05-22 2020-09-02 Lg Display Co Ltd Gate shift register and organic light emitting diode display including the same
CN111856256A (en) * 2020-09-24 2020-10-30 深圳英集芯科技有限公司 Quick charging equipment test system and test method thereof
CN112397032A (en) * 2019-08-19 2021-02-23 Tcl集团股份有限公司 Dynamic backlight driving module, method and display driving module

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030222893A1 (en) * 2002-05-30 2003-12-04 Lockheed Martin Corporation Light emitting diode display and method for the illumination thereof
US20070171241A1 (en) * 2006-01-20 2007-07-26 Semiconductor Energy Laboratory Co., Ltd. Driving method of display device
US8077180B1 (en) * 2007-12-21 2011-12-13 Matrox Graphics, Inc. Systems for and methods of using a display controller to output data
CN201255839Y (en) * 2008-10-14 2009-06-10 昆明理工大学 Liquid medicine dosage controller
CN101404133A (en) * 2008-11-04 2009-04-08 李舒 Multi-digit digital pipe control circuit and method thereof
CN102190008A (en) * 2011-05-13 2011-09-21 广州国联通信有限公司 LED dynamic indicating screen of train
CN104011783A (en) * 2011-10-24 2014-08-27 先进模拟科技公司 Low cost led driver with improved serial bus
CN103127731A (en) * 2013-03-06 2013-06-05 浙江科技学院 Wireless interactive multifunctional LED ornamental toy with identity recognition function
CN103531145A (en) * 2013-10-12 2014-01-22 大连国宁电子有限公司 Wireless nixie tube display screen
CN107240270A (en) * 2016-03-29 2017-10-10 上海中科深江电动车辆有限公司 Silent cop
CN106531062A (en) * 2016-12-01 2017-03-22 成都凯天电子股份有限公司 Display circuit device for dynamic-static driven scanning of multiple groups of LED nixie tubes
GB2564541B (en) * 2017-05-22 2020-09-02 Lg Display Co Ltd Gate shift register and organic light emitting diode display including the same
CN207781155U (en) * 2017-12-28 2018-08-28 杭州之山智控技术有限公司 Circuit for improving numeral method
CN208861645U (en) * 2018-10-18 2019-05-14 南京工程学院 A kind of automobile tail light instruction massaging device
CN112397032A (en) * 2019-08-19 2021-02-23 Tcl集团股份有限公司 Dynamic backlight driving module, method and display driving module
CN111856256A (en) * 2020-09-24 2020-10-30 深圳英集芯科技有限公司 Quick charging equipment test system and test method thereof

Also Published As

Publication number Publication date
CN115731853A (en) 2023-03-03
CN114974106B (en) 2022-10-18

Similar Documents

Publication Publication Date Title
CN108733342B (en) Volume adjusting method, mobile terminal and computer readable storage medium
CN107967419B (en) Unlocking control method and mobile terminal
CN108604218B (en) Method for establishing connection between devices with universal serial bus USB Type-C interface and terminal device
US11113226B2 (en) Firmware burning apparatus and system
WO2019184985A1 (en) Gate driving circuit and driving method therefor, and display device
EP2546825A1 (en) Method, device and terminal for identifying lcd screen
WO2005119465A1 (en) Data processing unit and bus arbitration unit
CN106066872B (en) A kind of data updating management method and electronic equipment
CN112711387A (en) Method and device for adjusting capacity of buffer area, electronic equipment and readable storage medium
US8935553B2 (en) Semiconductor device, radio communication terminal using same, and clock frequency control method
CN114416610B (en) PWM signal generation method, chip and electronic equipment
EP2667284A1 (en) Control system
CN114974106B (en) LED display device, LED display method and electronic equipment
CN212675893U (en) Backlight driving device and electronic device
CN111143240B (en) Image storage method, system and terminal equipment
CN106068494B (en) A kind of adaptation method and electronic equipment of DPI
CN101582037A (en) Method for sharing a basic input-output system as well as cutter point server and computer thereof
CN115566296B (en) Battery power display method, electronic device, program product and medium
CN112715040A (en) Method for reducing power consumption, terminal equipment and storage medium
CN112306213B (en) Display card mode switching method and device based on terminal, storage medium and terminal
JP2001344187A (en) Host interface circuit
CN109799715B (en) Data receiving method, device and terminal equipment
CN110213811B (en) Mobile terminal shutdown electric quantity control processing method, mobile terminal and storage medium
CN110147167B (en) Touch display driving circuit, operation circuit, display device and operation method thereof
CN107612539B (en) Method for processing clock input signal abnormity of level converter

Legal Events

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