Be careful... RCTime and Pulsin operate on DIGITAL pins of the PIC. those pins will trip from low to High when the threshold voltage is reached. It's NOT going to trip the moment your Sine-wave goes high... so technically the ON period time will be considerably less than the OFF period time. The entire period (ON+OFF) will be correct for the frequency you're measuring, but the ON cycle (or OFF cycle) on it's own will bear absolutely no resemblence to what you expect, and worse, will vary depending on the input level. IMO this is one of those bum applications for a PIC. Better with an NE567!
Bookmarks