I tried this interrupt. READY is always low; when FOOTSW goes low, the freq loop runs but only as long as FOOTSW is low. When FOOTSW goes high, the clock stops; it will start again when FOOTSW goes low again. I don't understand this.

'device: 16F627A master clear is on pin#4 (RA5)
TRISA = %00010000 ' port A all outputs, except MCLR is input
TRISB = %00111111 'PORT B ALL INPUT, EXCEPT 6 & 7 OUTPUT
option_REG = %01111111 'enable weak pullups on port B
FOOTSW var portb.5 'Foot switch OR CCREADY must be high
READY var portb.4 'at start

T var word
J VAR WORD


RENCA var portb.7 'FREQUENCY OUTPUT TO J1 PIN 13
EJECT var portb.6 '100 mS PULSE TO J1 PIN 21

START:
WHILE READY = 0
LOW RENCA : LOW EJECT
on interrupt goto poo

poo:
T = 100 '1mS AT 4 mHZ

freq:

PULSOUT RENCA, T 'frequency should be 500 Hz (2mS period)
PAUSEus T*7

GOTO freq
WEND
end