Hi Everyone:
I would like to ask how to achieve PWM output and continuous low level switching?
I saw that the LPC51U68 implements PWM output with STIMER and CTIMER. According to the routine I have implemented the normal PWM output, but I also need to output a continuous low level, and can switch freely. In the routine, PWM can't give 0, then How can I achieve this?
Thank you everyone~~
Hello,
Just to make sure i'm understanding.
Do you mean from the same pin be able to generate a pwm signal for a period of time, then switch to constant 0V for a period of time, then switch back the pwm signal, and so on.
Is that correct?
Best Regards,
Sabina
Hi Sabina Bruce:
Thank you very much, at present I am using the H-bridge circuit to develop DC motor driver software, so I need to complement the PWM output with dead zone, I hope to get the relevant routine of this MCU, thank you~~
Hello,
You can get a constant value by deinitializing the PWM for the period of time that you need to be a logical 0. I have tested it with a small delay to check the voltage level of the pin. I use CTIMER_Deinit(CTIMER); to deinitialize the module. At this point you can use the pin for another purpose or Initialize it when you need the PWM signal again. I based myself on the example for ctimer_pwm_example from the SDK for the LPC51U68.
Best Regards,
Sabina