The manual gives the units. It varies with the oscillator frequency.
4MHz = 10µS
20MHz = 2µS
which works out to 40/fOsc.
The manual gives the units. It varies with the oscillator frequency.
4MHz = 10µS
20MHz = 2µS
which works out to 40/fOsc.
Actually the manual gives the resolution, but does not specify the units of measure.
(I've read the manual)
they probably could clarify that part a bit.The resolution of PULSIN is dependent upon the oscillator frequency. If a 4MHz oscillator is used, the pulse width is returned in 10us increments. If a 20MHz oscillator is used, the pulse width will have a 2us resolution. Defining an OSC value has no effect on PULSIN. The resolution always changes with the actual oscillator speed.
Thanks for your reply.
Edit: that 40/fOsc should come in handy when I cannot find a standard crystal. ( Have lots of 10.24Mhz etc lying about) Thanks
Last edited by nomad; - 25th October 2007 at 01:12. Reason: added "edit" line
Bookmarks