John,
You've Enabled Interrupts, but there aren't any handlers defined.
That usually causes everything to Lock-Up from "Continuous Interruptus".
Interrupts have nothing to do with the COUNT statement.
If it was to exit sleep mode? Don't enable the GIE bit.
But the way you're doing it, you're going to miss a lot of pulses.
It really should use interrupts to count the pulses.
<br>
Bookmarks