HUmm.. two pics.. well
I thought about going to a waveform chip like the ICL8038.. but I wanted a more 'modern' solution going with a single Pic,
I am going try tonight what Henrik mentioned above.
K
HUmm.. two pics.. well
I thought about going to a waveform chip like the ICL8038.. but I wanted a more 'modern' solution going with a single Pic,
I am going try tonight what Henrik mentioned above.
K
I tried different value of PR2, (had tried it before..)
Still am getting 60Hz at PR2 255 and at 200 I get 77hz at 100 I get a steady 5v out...
Here is the link of the program I use for mytest: http://www.warburtech.com/products/compilers/picbasic.pro.compiler/sample.code/hardpwm.pbp/
I was playing around with internal frequency, just to let you know that it do not work. Decreasing the int freq to 500Khz decreases the min freq to 30Hz but also the max freq at 130Hz !!
K
That is not your only issue. Because you are dealing with reciprocal values, granularity (resolution) is going to be very poor throughout. At high PR2 values, you will see very little change in frequency - eg. reducing PR2 from 255 to 254 you may not be able to detect any change in frequency. However, at the other end of scale, incrementing PR2 will result in a huge change in frequency.
Why pay for overpriced toys when you can have
professional grade tools for FREE!!!
Bookmarks