Low frequency PWM?
Low frequency PWM?
I'm testing some pwm program with pic 12F617. Everything works fine, but I wonder how to set frequency of pwm to 10Hz or less. If I set clock speed to 1MHz and prescaler divide to 16, I get only 61,03516 Hz.
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
Re: Low frequency PWM?
Hi
Such low frequencies are not always possible with pic's look in the device datasheet and it will tell you what is the minimum PWM frequency you can get with various Clock frequencies
with the hardware pwm module you can also use timers and do your own PWM to achieve 10Hz
Such low frequencies are not always possible with pic's look in the device datasheet and it will tell you what is the minimum PWM frequency you can get with various Clock frequencies
with the hardware pwm module you can also use timers and do your own PWM to achieve 10Hz
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Low frequency PWM?
There is an example of software PWM using a timer interrupt available here which may help.
http://www.matrixtsl.com/article.php?a=52
http://www.matrixtsl.com/article.php?a=52
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Low frequency PWM?
Thank you for input. Yes, I saw that example. But I also find this topic, here on forum. The last two examples are very helpfull. I made it that way and I get pwm signal with 10Hz frequency.