Signal processing method for maintaining signal relative relationship and electronic device thereof
11210985 · 2021-12-28
Assignee
Inventors
Cpc classification
H04N21/242
ELECTRICITY
G09G2320/029
PHYSICS
G09G2320/064
PHYSICS
G09G2320/0247
PHYSICS
G09G2320/0653
PHYSICS
G09G3/20
PHYSICS
International classification
G09G3/20
PHYSICS
Abstract
A signal processing method for maintaining a signal relative relationship and an electronic device thereof are provided. The signal processing method includes: detecting that a current input period of a vertical synchronization signal changes relative to a previous input period; determining whether a frequency difference between a pulse width modulation signal and the vertical synchronization signal is within an acceptable range, and when the frequency difference is not within the acceptable range, performing a frequency adjustment stage to adjust a period of the pulse width modulation signal to be close to the current input period; selectively performing a phase adjustment stage to adjust a phase of the pulse width modulation signal to a phase of the vertical synchronization signal; and maintaining a relative phase relationship between the pulse width modulation signal and the vertical synchronization signal.
Claims
1. A signal processing method for maintaining a signal relative relationship, comprising: detecting that a current input period of a vertical synchronization signal changes relative to a previous input period; determining whether a frequency difference between a pulse width modulation (PWM) signal and the vertical synchronization signal is within an acceptable range, and when the frequency difference is not within the acceptable range, performing a frequency adjustment stage to adjust a period of the PWM signal to be close to the current input period; determining whether a phase of the PWM signal needs to be adjusted, and when the phase of the PWM signal needs to be adjusted, performing a phase adjustment stage to adjust the phase of the PWM signal to a phase of the vertical synchronization signal; and maintaining a relative phase relationship between the PWM signal and the vertical synchronization signal; wherein a period change amplitude of the PWM signal is inversely proportional to a time required to adjust the phase of the PWM signal to the phase of the vertical synchronization signal.
2. The signal processing method according to claim 1, wherein a change between the current input period and the previous input period is that a difference between the current input period and the previous input period exceeds a preset threshold.
3. The signal processing method according to claim 1, wherein at the frequency adjustment stage, the period of the PWM signal is adjusted in stages to be close to the current input period and is adjusted by one step value at each stage.
4. The signal processing method according to claim 1, wherein the step of maintaining a relative phase relationship between the PWM signal and the vertical synchronization signal is: maintaining the relative phase relationship in which the phase of the PWM signal is equal to the phase of the vertical synchronization signal, or maintaining the relative phase relationship in which the PWM signal is different from the vertical synchronization signal by a target phase difference.
5. An electronic device for maintaining a signal relative relationship, comprising: a display control circuit electrically connected to a display device, wherein the display control circuit outputs a vertical synchronization signal; a pulse width modulation (PWM) control circuit electrically connected to the display control circuit and the display device respectively, wherein the PWM control circuit receives the vertical synchronization signal, when a current input period of the vertical synchronization signal changes relative to a previous input period, the PWM control circuit determines whether a frequency difference between a PWM signal and the vertical synchronization signal is within an acceptable range, and when the frequency difference is not within the acceptable range, the PWM control circuit performs a frequency adjustment stage to adjust a period of the PWM signal to be close to the current input period; the PWM control circuit further determines whether a phase of the PWM signal needs to be adjusted, and when the phase of the PWM signal needs to be adjusted, the PWM control circuit performs a phase adjustment stage to adjust the phase of the PWM signal to a phase of the vertical synchronization signal; and the PWM control circuit maintains a relative phase relationship between the PWM signal and the vertical synchronization signal; and a processor electrically connected to the display control circuit and the PWM control circuit to control the display control circuit and the PWM control circuit; wherein a period change amplitude of the PWM signal is inversely proportional to a time required to adjust the phase of the PWM signal to the phase of the vertical synchronization signal.
6. The electronic device according to claim 5, wherein a change between the current input period and the previous input period is that a difference between the current input period and the previous input period exceeds a preset threshold.
7. The electronic device according to claim 5, wherein at the frequency adjustment stage, the period of the PWM signal is adjusted in stages to be close to the current input period and is adjusted by one step value at each stage.
8. The electronic device according to claim 5, wherein the PWM control circuit maintains the relative phase relationship in which the phase of the PWM signal is equal to the phase of the vertical synchronization signal, or the PWM control circuit maintains the relative phase relationship in which the PWM signal is different from the vertical synchronization signal by a target phase difference.
9. The electronic device according to claim 5, wherein the electronic device is a system-on-a-chip (SoC).
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
DETAILED DESCRIPTION
(8) A signal processing method for maintaining a signal relative relationship provided in the disclosure is applicable to an electronic device connected to a display device, and a PWM control circuit is used to process a PWM signal. In the disclosure, it can be ensured that phases of the PWM signal and a vertical synchronization signal do not change slowly all the time to reduce a risk of water ripples, and it is ensured that a period change amplitude of the PWM signal is not extremely large to avoid a panel flicker.
(9)
(10) In an embodiment, the electronic device 10 is a system-on-a-chip (SoC), and the processor 12, the display control circuit 14, and the PWM control circuit 16 are all built in the SoC.
(11)
(12) As shown in step S12, the PWM control circuit 16 determines whether a frequency difference between the PWM signal S.sub.PWM and the vertical synchronization signal Vsync is within an acceptable range, and the acceptable range is a frequency range of the vertical synchronization signal Vsync. When the frequency difference is within the acceptable range, it indicates that a frequency of the PWM signal S.sub.PWM is close to or the same as a frequency of the vertical synchronization signal Vsync. Therefore, no frequency adjustment needs to be performed, and a next step (step S16) is directly performed. When the PWM control circuit 16 determines that the frequency difference value is not within the acceptable range, as shown in step S14, the PWM control circuit 16 performs a frequency adjustment stage on the PWM signal S.sub.PWM to adjust a period of the PWM signal S.sub.PWM to be close to the current input period of the vertical synchronization signal Vsync. At the frequency adjustment stage in step S14, the PWM control circuit 16 gradually adjusts the period of the PWM signal S.sub.PWM to be close to the current input period, and adjusts the period of the PWM signal S.sub.PWM by one step value at each stage. For example, the step value may be 1 millisecond (ms). If the period of the PWM signal S.sub.PWM needs to be increased, the period of the PWM signal S.sub.PWM is increased by 1 ms each time until the period of the PWM signal S.sub.PWM is close to the current input period.
(13) As shown in step S16, the PWM control circuit 16 determines whether a phase of the PWM signal S.sub.PWM needs to be adjusted. When the phase of the PWM signal S.sub.PWM does not need to be adjusted, a current phase may be considered as a new target phase, and a next step (step S20) is directly performed. When the phase of the PWM signal S.sub.PWM needs to be adjusted, as shown in step S18, a phase adjustment stage is performed, so that the PWM control circuit 16 adjusts the phase of the PWM signal S.sub.PWM to a phase of the vertical synchronization signal Vsync.
(14) Finally, as shown in step S20, regardless of whether the phase of the PWM signal S.sub.PWM is adjusted, the PWM control circuit 16 maintains a relative phase relationship between the PWM signal S.sub.PWM and the vertical synchronization signal Vsync. In other words, regardless of whether the target phase is adjusted, for small fluctuation of the vertical synchronization signal Vsync, the PWM control circuit 16 slightly changes the frequency of the PWM signal S.sub.PWM to maintain the relative phase relationship between the PWM signal S.sub.PWM and the vertical synchronization signal Vsync. In one embodiment, there are two forms of maintaining the relative phase relationship between the PWM signal S.sub.PWM and the vertical synchronization signal Vsync. In one form, the PWM control circuit 16 maintains the relative phase relationship in which the phase of the PWM signal S.sub.PWM is equal to the phase of the vertical synchronization signal Vsync. In the other form, the PWM control circuit 16 maintains the relative phase relationship in which the phase of the PWM signal S.sub.PWM is different from the phase of the vertical synchronization signal Vsync by a target phase difference.
(15) Because different display devices 20 have different panel characteristics and compatibility, the determining, by the PWM control circuit 16, whether to adjust the phase of the PWM signal S.sub.PWM is affected by this factor. As shown in
(16) In an embodiment, a period change amplitude of the PWM signal S.sub.PWM is inversely proportional to a time required to adjust the phase of the PWM signal S.sub.PWM to the phase of the vertical synchronization signal Vsync.
(17) In view of above, because different display devices have different panel characteristics, each display device has a curve diagram of a relationship between a period change amplitude of a PWM signal and a phase adjustment time. A most suitable adjustment method and parameter are selected for each display device to stabilize a relative relationship between the PWM signal and the vertical synchronization signal without a panel flicker and a water ripple.
(18)
(19)
(20) Therefore, after the frequency is adjusted, the current phase difference can be fixed as the target phase difference, and then only a small amplitude change of the vertical synchronization signal Vsync needs to be compensated, so that the target phase difference can be maintained to a specific magnitude, thereby maintaining the relative phase relationship between the PWM signal S.sub.PWM and the vertical synchronization signal Vsync.
(21) Therefore, on the premise that there is no water ripple or panel flicker, in the disclosure, characteristics of different display devices are utilized and a frequency adjustment manner and a phase adjustment manner are used to adjust the frequency of the PWM signal to be the same as the frequency of the vertical synchronization signal and maintain a stable phase relationship, thereby effectively maintaining an optimal relative relationship between the PWM signal and the vertical synchronization signal.
(22) While the disclosure has been described by the way of example and in terms of the preferred embodiments, it is to be understood that the invention need not be limited to the disclosed embodiments. On the contrary, it is intended to cover various modifications and similar arrangements included within the spirit and scope of the appended claims, the scope of which should be accorded the broadest interpretation so as to encompass all such modifications and similar structures.