little MORE Help
and now we're here :
'device: 16F627A master clear is on pin#4 (RA5)
TRISA = %00010000 ' port A all outputs, except MCLR is input
PORTB = 0
TRISB = %00111111 'PORT B ALL INPUT, EXCEPT 6 & 7 OUTPUT
option_REG = %01111111 'enable weak pullups on port B
INTCON = %10001000 ' Define the interrupt origin ....YESSSS
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
on interrupt goto poo
START:
LOW RENCA : LOW EJECT
WHILE READY = 0
'zzzzzzzzzzzzzzzzzzzz ... waiting !!!
WEND
GOTO Start 'GOTO what to do if not ready ???
DISABLE INTERRUPT
poo:
IF NOT FOOTSW THEN false 'we are looking for a Portb.5 interrupt ... not PortB.4 or else
T = 1000 '1mS AT 4 mHZ ...........Note: 1000 for MPSIM, 1 for real
freq:
TOGGLE RENCA
PAUSE T 'frequency should be 500 Hz (2mS period)
GOTO freq
false:
RESUME
ENABLE INTERRUPT
end
************************************************** ***********************
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