CN109152163A - The control method and device of breath light in a kind of non real-time system - Google Patents

The control method and device of breath light in a kind of non real-time system Download PDF

Info

Publication number
CN109152163A
CN109152163A CN201810672758.8A CN201810672758A CN109152163A CN 109152163 A CN109152163 A CN 109152163A CN 201810672758 A CN201810672758 A CN 201810672758A CN 109152163 A CN109152163 A CN 109152163A
Authority
CN
China
Prior art keywords
breath light
spi
control
non real
impulse waveform
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
CN201810672758.8A
Other languages
Chinese (zh)
Other versions
CN109152163B (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.)
Allwinner Technology Co Ltd
Original Assignee
Allwinner 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 Allwinner Technology Co Ltd filed Critical Allwinner Technology Co Ltd
Priority to CN201810672758.8A priority Critical patent/CN109152163B/en
Publication of CN109152163A publication Critical patent/CN109152163A/en
Application granted granted Critical
Publication of CN109152163B publication Critical patent/CN109152163B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

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

Abstract

Technical solution of the present invention includes a kind of control method of breath light in non real-time system, the timing parameter for including the following steps: S10, configuring SPI control module;S20, SPI impulse waveform is generated using color code according to time parameter and timing requirements;S30, it is worked according to SPI pulse shape control breath light.The invention has the benefit that using Software Coding SPI impulse waveform, it is worked by SPI control module hardware transport pulse control breath light, the case where capable of largely avoiding pure software control from being influenced by factors such as system load, multitask, breathing timing, it is few to occupy chip pin for spi bus simultaneously, the pin of chip is saved, space is saved for PCB layout, reduces cost, and easy to use.

Description

The control method and device of breath light in a kind of non real-time system
Technical field
The present invention relates to a kind of control method and device of breath light in non real-time system, belong to control technology field.
Background technique
Breath light refers to that light completes gradually changing from bright to dark under the control of micro computer, feels to seem that people exists Breathing.It is widely used on mobile phone, and becomes one of the attraction of each famous brand Mobile phone, plays a reminder announced Effect.
In the prior art, breath light control technology usually has two classes, first is that by independent control chip controls, second is that using The control of software analogue technique;And software analogue technique generallys use two ways: it goes to control by GPIO analog pulse sequence, or Person is to go to control by adjusting PWM duty cycle.
In such a way that independent control chip goes control, the timing for controlling breath light accurately can may be used by hardware guarantee It leans on, but increases the cost of equipment;And software analogue technique in non real-time system by system load, multitask, breathing etc. The factors such as timing requirements influence, and when system load height, device bus is in busy condition, and breath light identifies the pulsewidth of low and high level In the case that difference is minimum, it is generally difficult to reach ideal control effect.
Summary of the invention
To solve the above problems, the purpose of the present invention is to provide a kind of control method of breath light in non real-time system and Color code is encoded to binary code in advance by the way of SPI simulation by device, and binary code is recycled to generate SPI impulse wave Shape is sent to breath light through spi bus by SPI control module, to guarantee that timing meets breathing in every frame SPI impulse waveform Lamp work requirements can reach preferable control effect by way of soft or hard combination.
Technical solution used by the present invention solves the problems, such as it is:
The control method of breath light, includes the following steps: in a kind of non real-time system
S10, the timing parameter for configuring SPI control module;
S20, SPI impulse waveform is generated using color code according to time parameter and timing requirements;
S30, it is worked according to SPI pulse shape control breath light.
Further, in the step S10, the timing parameter includes clock polarity, phase and frequency.
Further, the step S20 includes:
S21, the color code for obtaining color to be shown;
S22, color code is converted into corresponding binary code sequence;
S23, for utilizing the binary code sequence raw according to the timing requirements of clock frequency and breath light low and high level At SPI impulse waveform.
Further, the step S30 includes:
SPI impulse waveform is resolved to counterlogic level value according to the pulsewidth of impulse waveform by S31, breath light control circuit 0 or 1;
S32, breath light illuminating circuit control corresponding breath light luminescence display according to logic level values.
The control device of breath light in a kind of non real-time system, comprising:
Clock configuration module, for configuring the timing parameter of SPI control module;
SPI control module, for generating SPI impulse waveform using color code according to time parameter and timing requirements;
Lamp module is breathed, for working according to SPI pulse shape control breath light.
Further, the time parameter in the time configuration module includes clock polarity, phase and frequency.
Further, the SPI control module, including
Color cell, for obtaining the color code of color to be shown;
Coding unit, for color code to be converted to corresponding binary code sequence;
SPI control unit, for utilizing the binary system according to the timing requirements of clock frequency and breath light low and high level Code sequence generates SPI impulse waveform.
Further, the breathing lamp module includes:
Breath light control circuit unit, for SPI impulse waveform to be resolved to counterlogic according to the pulsewidth of impulse waveform Level value 0 or 1;
Breath light illuminating circuit unit, for controlling corresponding breath light luminescence display according to the logic level values.
The beneficial effects of the present invention are: in a kind of non real-time system that the present invention uses breath light control method and dress It sets, using Software Coding SPI impulse waveform, is worked by SPI control module hardware transport pulse control breath light, it can be larger The case where degree avoids pure software control from being influenced by factors such as system load, multitask, breathing timing, while spi bus occupies Chip pin is few, has saved the pin of chip, saves space for PCB layout, reduces cost, and easy to use.
Detailed description of the invention
Fig. 1 is the control method flow chart of breath light in a kind of non real-time system of the embodiment of the present invention one;
Fig. 2 is the control method flow chart of breath light in a kind of non real-time system of the embodiment of the present invention two;
Fig. 3 is the control method flow chart of breath light in a kind of non real-time system of the embodiment of the present invention three;
Fig. 4 is a frame SPI impulse waveform schematic diagram of the invention;
Fig. 5 is the controling device structure diagram of breath light in a kind of non real-time system of the embodiment of the present invention four;
Fig. 6 is the controling device structure diagram of breath light in a kind of non real-time system of the embodiment of the present invention five;
Fig. 7 is the controling device structure diagram of breath light in a kind of non real-time system of the embodiment of the present invention six.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, right in the following with reference to the drawings and specific embodiments The present invention is described in detail.
Embodiment one
Referring to Fig.1, in the present embodiment, the control method of breath light in a kind of non real-time system of the invention, including it is as follows Step:
S10, the timing parameter for configuring SPI control module 20;
S20, SPI impulse waveform is generated using color code according to time parameter and timing requirements;
S30, it is worked according to SPI pulse shape control breath light.Wherein, the timing parameter includes clock polarity, phase And frequency.
Embodiment two
Referring to Fig. 2, in the present embodiment, the step S20 includes:
S21, the color code for obtaining color to be shown;
S22, color code is converted into corresponding binary code sequence;
S23, SPI is generated using the binary code sequence according to the timing requirements of clock frequency and breath light low and high level Impulse waveform.
Embodiment three
Referring to Fig. 3, in the present embodiment, the step S30 includes:
SPI impulse waveform is resolved to counterlogic level value according to the pulsewidth of impulse waveform by S31, breath light control circuit 0 or 1;
S32, breath light illuminating circuit control corresponding breath light luminescence display according to logic level values.
Specifically, each lamp source of breath light of the invention may be regarded as a pixel, the three primary colours face of each pixel 256 grades of brightness changes may be implemented in color, and lamp source passes through the pulsewidth recognition logic level value of input pulse waveform, when input pulse When high level lasting time about 200ns, the low level duration about 1ms, breath light is identified as logical zero;When the height of input pulse When level duration about 1ms, the low level duration about 200ns, breath light is identified as logic 1.
SPI clock frequency is higher, more accurate to the control of breath light, and each binary code is corresponding in impulse waveform SPI clock periodicity is equal to the product of clock frequency level duration corresponding with the binary code in timing requirements.This reality It applies in example, the pulse data for receiving 24bit every time with breath light is a frame, and breath light control circuit is resolved to red blue green three Kind color code, driving illuminating circuit shine.Assuming that user's setpoint color code is 0x0000FF, SPI control module 20 generates such as Fig. 4 Shown frame pulse waveform, wherein preceding 16bit data high level lasting time is about 200ns, can be known by breath light control circuit Not Wei 0x00,0x00, rear 8bit high level lasting time is about 1ms, 0xFF can be identified as by breath light control circuit, to drive Dynamic breath light illuminating circuit shows corresponding color.
Example IV
Referring to Fig. 5, in the present embodiment, the control device of breath light in a kind of non real-time system, comprising:
Clock configuration module 10, for configuring the timing parameter of SPI control module 20;
SPI control module 20, for generating SPI impulse waveform using color code according to time parameter and timing requirements;
Lamp module 30 is breathed, for working according to SPI pulse shape control breath light.
Wherein, the time parameter in the time configuration module 10 includes clock polarity, phase and frequency.
Specifically, connecing breathing lamp module 30 on the MOSI pin of SPI control module 20, SPI control module is initialized 20 and configurable clock generator parameter, logical zero and logic 1 are separately encoded into SPI according to the color code of user setting by SPI control module 20 Impulse waveform simultaneously be transmitted to breathing lamp module 30, breathing lamp module 30 impulse waveform parse and control corresponding breath light brightness with Color change.
Embodiment five
Referring to Fig. 6, in the present embodiment, the SPI control module 20, including
Color cell 21, for obtaining the color code of color to be shown;
Coding unit 22, for color code to be converted to corresponding binary code sequence;
SPI control unit 23, for according to the timing requirements of clock frequency and breath light low and high level using described two into Code sequence processed generates SPI impulse waveform.
Embodiment six
Referring to Fig. 7, in the present embodiment, the breathing lamp module 30 includes:
SPI impulse waveform is resolved to correspondence for the pulsewidth according to impulse waveform and patrolled by breath light control circuit unit 31 Collect level;
Breath light illuminating circuit unit 32, for controlling corresponding breath light luminescence display according to the logic level.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above, only presently preferred embodiments of the present invention, the invention is not limited to above embodiment, as long as It reaches technical effect of the invention with identical means, all should belong to protection scope of the present invention.In protection model of the invention Its technical solution and/or embodiment can have a variety of different modifications and variations in enclosing.

Claims (8)

1. the control method of breath light in a kind of non real-time system, which comprises the steps of:
S10, the timing parameter for configuring SPI control module;
S20, SPI impulse waveform is generated using color code according to time parameter and timing requirements;
S30, it is worked according to SPI pulse shape control breath light.
2. the control method of breath light in non real-time system according to claim 1, it is characterised in that: the step S10 In, the timing parameter includes clock polarity, phase and frequency.
3. the control method of breath light in non real-time system according to claim 2, it is characterised in that: the step S20 Include:
S21, the color code for obtaining color to be shown;
S22, color code is converted into corresponding binary code sequence;
S23, SPI pulse is generated using the binary code sequence according to the timing requirements of clock frequency and breath light low and high level Waveform.
4. the control method of breath light in non real-time system according to claim 3, it is characterised in that: the step S30 Include:
S31, breath light control circuit according to the pulsewidth of impulse waveform by SPI impulse waveform resolve to counterlogic level value 0 or 1;
S32, breath light illuminating circuit control corresponding breath light luminescence display according to logic level values.
5. the control device of breath light in a kind of non real-time system, it is characterised in that: including
Clock configuration module (10), for configuring the timing parameter of SPI control module (20);
SPI control module (20), for generating SPI impulse waveform using color code according to time parameter and timing requirements;
It breathes lamp module (30), for being worked according to SPI pulse shape control breath light.
6. the control device of breath light in non real-time system according to claim 5, it is characterised in that: the time configuration Time parameter in module (10) includes clock polarity, phase and frequency.
7. the control device of breath light in non real-time system according to claim 6, it is characterised in that: the SPI control Module (20), including
Color cell (21), for obtaining the color code of color to be shown;
Coding unit (22), for color code to be converted to corresponding binary code sequence;
SPI control unit (23), for utilizing the binary system according to the timing requirements of clock frequency and breath light low and high level Code sequence generates SPI impulse waveform.
8. the control device of breath light in non real-time system according to claim 7, it is characterised in that: the breath light mould Block (30), comprising:
Breath light control circuit unit (31), for SPI impulse waveform to be resolved to counterlogic according to the pulsewidth of impulse waveform Level value 0 or 1;
Breath light illuminating circuit unit (32), for controlling corresponding breath light luminescence display according to the logic level values.
CN201810672758.8A 2018-06-26 2018-06-26 Control method and device for breathing lamp in non-real-time system Active CN109152163B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810672758.8A CN109152163B (en) 2018-06-26 2018-06-26 Control method and device for breathing lamp in non-real-time system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810672758.8A CN109152163B (en) 2018-06-26 2018-06-26 Control method and device for breathing lamp in non-real-time system

Publications (2)

Publication Number Publication Date
CN109152163A true CN109152163A (en) 2019-01-04
CN109152163B CN109152163B (en) 2020-06-02

Family

ID=64802237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810672758.8A Active CN109152163B (en) 2018-06-26 2018-06-26 Control method and device for breathing lamp in non-real-time system

Country Status (1)

Country Link
CN (1) CN109152163B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070211014A1 (en) * 2006-03-10 2007-09-13 Hyoung-Rae Kim Methods and Circuits for Synchronous Operation of Display Backlighting
WO2010068126A1 (en) * 2008-12-12 2010-06-17 Rafal Pietrak A method of encoding and decoding of synchronous serial transmission, particularly for low power devices and fiber optics media
CN102968963A (en) * 2012-11-30 2013-03-13 深圳市华星光电技术有限公司 LED (light-emitting diode) backlight driving circuit, liquid crystal display and driving method
CN105629741A (en) * 2014-10-31 2016-06-01 陕西盛迈石油有限公司 Intelligent household electrical appliance control system
CN107123372A (en) * 2017-04-19 2017-09-01 东莞博力威电池有限公司 The LED lamp panel of battery management system shows system and method
CN107633811A (en) * 2017-10-30 2018-01-26 王才旺 A kind of SCM Based OLED static state displays drive device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070211014A1 (en) * 2006-03-10 2007-09-13 Hyoung-Rae Kim Methods and Circuits for Synchronous Operation of Display Backlighting
WO2010068126A1 (en) * 2008-12-12 2010-06-17 Rafal Pietrak A method of encoding and decoding of synchronous serial transmission, particularly for low power devices and fiber optics media
CN102968963A (en) * 2012-11-30 2013-03-13 深圳市华星光电技术有限公司 LED (light-emitting diode) backlight driving circuit, liquid crystal display and driving method
CN105629741A (en) * 2014-10-31 2016-06-01 陕西盛迈石油有限公司 Intelligent household electrical appliance control system
CN107123372A (en) * 2017-04-19 2017-09-01 东莞博力威电池有限公司 The LED lamp panel of battery management system shows system and method
CN107633811A (en) * 2017-10-30 2018-01-26 王才旺 A kind of SCM Based OLED static state displays drive device

Also Published As

Publication number Publication date
CN109152163B (en) 2020-06-02

Similar Documents

Publication Publication Date Title
CN1162826C (en) Modulating circuit, image display therewith and modulating method
CN102026446B (en) System and method for non-linear dimming of a light source
CN1172280C (en) Modulation circuit and image display using said modulation circuit
TWI441564B (en) Method and device for driving an array of light sources
CN106535406B (en) The brightness correcting method of three primary colors LED light source
US9736901B2 (en) LED scanning array driver chip and regulation method capable of self-regulating brightness linear change
RU2009116928A (en) METHOD FOR COLOR TRANSITION FOR EXTERNAL OR GENERAL LIGHTING SYSTEM
CN106211483A (en) Separate room office intelligent lighting system
CN101686590A (en) Led dynamic backlight source control algorithm
CN109152163A (en) The control method and device of breath light in a kind of non real-time system
CN105958972A (en) Pwm control circuit and pwm signal generation method
CN110708793B (en) Cascade control method of cascade equipment, cascade equipment and illumination system
JP5479853B2 (en) Display drive circuit and display drive system
CN108604621A (en) Display device, display methods and program
US9924584B2 (en) Method and device capable of unique pattern control of pixel LEDs via smaller number of DMX control channels
CN109658875B (en) Color gamut control method and display device thereof
CN107231720A (en) A kind of control method based on all-colour LED
CN109712560A (en) A kind of driving control system of LED display module
JP5479854B2 (en) Display drive circuit and display drive system
CN106774138A (en) A kind of vehicle-mounted backlight evaluation system and method for being applied to the evaluation of vehicle backlight color
CN108282935B (en) LED dimming method, device, equipment and storage medium
CN103456279B (en) Mobile terminal and its color display
JP2011100068A (en) Display driving circuit and display driving system
CN109192145A (en) A kind of subregion light adjusting circuit and display device
CN112349240B (en) LED gray scale display control system and method

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