LEDC Fade PWM *Phase*
Posted: Thu Dec 29, 2016 6:52 pm
Hello!
The LEDC peripheral allows changing / "fading" the duty cycle of the generated PWM over time. This is done by having the hardware add to or subtract from the register (LEDC_DUTY_HSCH) that sets when the PWM signal is latched low.
Is it possible to similarly fade the PWM phase? This could be done via a similar mechanism that incremented or decremented the LEDC_HPOINT_HSCH register. This could be useful for dimming AC devices as described here. Because TRIAC only turns off at zero crossing, we must control when output is latched high to dim AC.
I'm assuming the answer here is that this isn't supported by the hardware but thought I might ask anyway just in case.
I'm working on code that performs the fading of PWM phase in zero crossing interrupt (by altering as an alternative. I'll see how well this performs and report back. I'm assuming there will be timing jitter here but perhaps it will be fast enough for our purposes.
Thanks!
-c
The LEDC peripheral allows changing / "fading" the duty cycle of the generated PWM over time. This is done by having the hardware add to or subtract from the register (LEDC_DUTY_HSCH) that sets when the PWM signal is latched low.
Is it possible to similarly fade the PWM phase? This could be done via a similar mechanism that incremented or decremented the LEDC_HPOINT_HSCH register. This could be useful for dimming AC devices as described here. Because TRIAC only turns off at zero crossing, we must control when output is latched high to dim AC.
I'm assuming the answer here is that this isn't supported by the hardware but thought I might ask anyway just in case.
I'm working on code that performs the fading of PWM phase in zero crossing interrupt (by altering as an alternative. I'll see how well this performs and report back. I'm assuming there will be timing jitter here but perhaps it will be fast enough for our purposes.
Thanks!
-c