Analog to PWM conversion

N

Thread Starter

nathna

How I can convert an analog signal into PWM digital output? What will be the algorithm for this? Is there any Web page out there referring to this?
 
To convert analog signal to PWM, you can use timer.

First, convert or scale analog input value to be converted and send the value to preset value of timer. Then, the preset time of timer will be vary depend on the value read by analog input channel.

After that, configure that timer to act as free running pulse generator, then the ON period and OFF period of pulse will be depend on preset value which is get value from analog input.

Hope this help
 
Top