PDA

View Full Version : Pwm



JARI NETWORKS
- 31st August 2006, 13:10
Can someone tell me how to program a pic16f628a in PBP with a frequence of 0.3 Hz??

mister_e
- 31st August 2006, 13:47
.3 Hz is impossible with the hardware PWM module. My best bet will be to create one using the Timer interrupts.... but ...ahem... 0.3 HZ is really slow... what is the purpose of a so slow frequency? Maybe a old 555 could do the job.

.3 KHZ it's possible @4MHZ
hpwm 1,255,300

JARI NETWORKS
- 31st August 2006, 14:08
my purpose was to fade in and out 3 leds in 1 sec. but maybe is it possible to do it with 3 ports of a pic16f628a chip and a cyclus of 1 sec.

mister_e
- 1st September 2006, 01:49
so the frequency don't really matter... anyway @.3Hz you'll see them flash so. over hundreds HZ will do the job.

You should look at Multi_SSPWM from Darrel Taylor. it should be enough to start.. and probably finish the whole thing.
http://www.pbpgroup.com/modules/wfsection/article.php?articleid=12

JARI NETWORKS
- 1st September 2006, 06:03
OK thanks for the link.

Greets Jan