Hi experts,
My customer is using timer - pwm for communication. For example, pwm with 25% duty represent 0, pwm with 75% duty represent 1, so a continuous pwm with different duty can represent serial data.
To generate such pwm, they need to change the duty of pwm cycle by cycle. One way to do it is changing the compare register in each interrupt.
However, the pwm is at high frequency, the period is 1.25 us. An empty interrupt service function may already longer than the pwm period, so it's not fast enough to change the compare register in the interrupt.
For pwm of such high frequency, any suggestion on how to change its duty cycle by cycle?
Regards,
Hang.