We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello all, I am new to microcontroller and to this forum.It seems I have a conceptional problem in PWM generation. My Idea is:PWM module gemnarates a square wave which has the peak value 5 volt and low value 0 volt.I can set pulse period (and hence frequency) and pulse width using PPx and PWx registers respectively.The average voltage output which I get out of it is:5xduty cycle ratio. If I change pulse width, I change duty cycle ratio. Now,can I treat this output as an analog voltage?Can I run a device which needs analog voltage with this PWM output (even if I do not filter it)? Could you please clear my confusions up? (I am sorry for my elementary questions) Regards, Denis
"Can I run a device which needs analog voltage with this PWM output (even if I do not filter it)?" That depends on the device! Often, you don't need a specific filter circuit because the device itself provides an inherent filtering action; eg, a motor has a significant mechanical inertia, and this is often sufficient to provide the "filtering" effect for PWM drive.