Hi,

I have a 16F84A, and wish to count valid pulses.

The idea is this:

INTERRUPT ENABLE
ON INTERRUPT GOTO DO_INTERRUPT
Main Routine
----
----
----
Goto Main Routine

DO_INTERRUPT

Get the time since the last interrupt. If time is too short or too long, reset the counter.
If valid, add 1 to the number of pulses received.
If pulses received = 48, then I have received a valid signal.

RESUME


The problem is compounded by the fact that I have C code to do it, but want to use PICBasic. The C Code uses TMR0, TOIF and TOIF, but I can't find how to do this with PICBasic.

Please help.


Dave