And now the question; is this achievable using a 16FXXX device and the PBP PULSIN command?
a 16F device running @ 20 Mhz max... so PULSIN will give you 2µs per count.
PBP 16F compiler uses 16 bits ... so, 65535 counts at a maximum
Pulsin will give you a valid result from 1 to 65535 unit +/- 1 count.
@ 50% duty cycle your period can be ... 4 to 131070 µs +/- 4µs
a 16F device running @ 4Mhz ... so PULSIN will give you 10µs per count.
PBP 16F compiler uses 16 bits ... so, 65535 counts at a maximum
Pulsin will give you a valid result from 1 to 65535 unit +/- 1 count.
@ 50% duty cycle your period can be ... 20 to 655350 µs +/- 20µs
from that you can understand what precision and resolution you can get with the PULSIN command.
That's quite simple ...
Alain
PS: Gioppy gave you ... half of the answer !!! LOL
Last edited by Acetronics2; - 10th November 2008 at 18:54.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks