LED Frequency

05 Apr 2011

I'd like to flash two externals LED at two different frequencies between 0-63hz on the PWM outputs. I don't have a scope handy so if anyone knows a quick mathematical way of working this out I'd love some example code

many thanks

05 Apr 2011

period (seconds = 1/Frequency)

them * 1000 to get milli seconds ..

hear are some I calculated ..

Freq. P Sec P mS 5.00 0.20 200.00 10.00 0.10 100.00 15.00 0.07 66.67 20.00 0.05 50.00 25.00 0.04 40.00 30.00 0.03 33.33 35.00 0.03 28.57 40.00 0.03 25.00 45.00 0.02 22.22 50.00 0.02 20.00 55.00 0.02 18.18 60.00 0.02 16.67 65.00 0.02 15.38 70.00 0.01 14.29

Duty = 1/2 of Period.

Enjoy :)