Quote Originally Posted by lerameur View Post
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/
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.