Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

MCU capable of driving multiple groups of RGB lamps and driving method thereof

A pin and timer technology, applied in the direction of program loading/starting, machine execution device, program control design, etc., can solve the problems of large storage space, inflexible RGB scanning driver, fixed scanning time, etc., to achieve flexible data sources, The effect of low hardware resource requirements and low size requirements

Active Publication Date: 2021-09-24
NANJING QINHENG MICROELECTRONICS CO LTD
View PDF7 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Purpose of the invention: In order to solve the problems in the prior art that the RGB scanning drive is not flexible enough, the scanning time is fixed, and the storage space is large through the hardware method, the present invention provides a method for driving multiple groups of RGB lights on the MCU

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • MCU capable of driving multiple groups of RGB lamps and driving method thereof
  • MCU capable of driving multiple groups of RGB lamps and driving method thereof
  • MCU capable of driving multiple groups of RGB lamps and driving method thereof

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0036] Embodiment 1: Drive 128 common anode RGB lamps to realize color transformation effect.

[0037] Such as image 3 , each RGB light has 4 pins, a common anode pin A, and 3 color control pins are R, G, and B. Mark all pins of the 128 RGB lights as A0-A127, R0-R127, G0-G127, B0-B127. Such as figure 2 The 128 RGB lights shown are arranged in a matrix, and the MCU needs to provide 16 row pins (COM pins) COM0-COM15 and 24 column pins (SEG pins) SEG0-SEG23 in total. Since it is a common sun lamp, a PMOS tube needs to be added at the COMx end. In addition, according to the needs of the application scene, buttons can be connected to the row pins and column pins of the MCU, and the scanning detection of the buttons can be performed while driving the RGB light display.

[0038] Such as Figure 4 , the MCU includes: 16 row pins and row pin driving circuits; three groups of eight PWM modules, column pins and column pin driving circuits, the PWM module is connected to the column...

Embodiment 2

[0048] Embodiment 2: Drive 128 common anode RGB lamps to output white light and perform brightness gradient.

[0049] The device of the second embodiment is the same as that of the first embodiment, except for the driving method.

[0050] Since the output is white light, for an RGB light, the PWM values ​​of the R, G, and B pins need to be consistent. The first line interrupt loading value is 128, and the brightness value is incremented. Increment by 1, the brightness value is between 100-200, step by 2 each time, step by 3 when the brightness value is between 30-100, and step by 5 for less than 30, so as to obtain a more obvious brightness gradient effect.

[0051] You can also set the display effect of the RGB light matrix according to other needs, change the scanning row pins at any time according to the needs, choose any combination of row pins, and the remaining GPIO ports of the MCU can be used as row pins for scanning, and the control is very flexible and convenient .

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an MCU capable of driving multiple groups of RGB lamps and a driving method thereof, which are used for flexibly driving the multiple groups of RGB lamps on the MCU. The method comprises the steps of setting a blanking timer and an interrupter, triggering the interrupter when a display driving period is ended, outputting the pins of a closing column of a hardware, starting timing by the blanking timer, executing an interruption software to load the PWM wave data of a column pin driving signal corresponding to the next row of lamp effect; and when a blanking period is finished, using the hardware to synchronously start all the PWM modules to work, and entering the next display driving period; in the display driving period and the blanking period, enabling the PWM wave modules and the blanking timer to work continuously in turn. According to the present invention, the next row of PWM wave data is loaded by fully utilizing the blanking period, the synchronous driving problem of the pins of the RGB lamps is solved, the driving time and data can be configured to each round of scanning more flexibly under the condition that the driving effect is not influenced at all, the requirement for the size of a buffer area is extremely low, a hardware circuit is simpler, and the cost is lower.

Description

technical field [0001] The invention relates to the field of single-chip microcomputers, in particular to an MCU capable of driving multiple groups of RGB lamps and a driving method thereof. Background technique [0002] The colorful lighting effect not only brings visual enjoyment to users, but also makes the product look more cool and technological. Therefore, many electronic product manufacturers now use this as a selling point to improve product quality. The combination of multiple groups of RGB lights is often used to achieve lighting effects. Through the adjustment of the red, green, and blue lights in each RGB light, various colors of light and shade can be achieved. [0003] In the early days, software codes were used to drive multiple groups of RGB lights, but this method has high requirements for software execution time. Not only does it need to dynamically change the PWM duty cycle of the drive pin, but also requires a RGB 3-terminal synchronous drive, which takes...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/30G06F9/445H05B45/325
CPCG06F9/30003G06F9/30098G06F9/44521H05B45/325Y02B20/40
Inventor 王春华
Owner NANJING QINHENG MICROELECTRONICS CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products