ORG 0X00 ; STARTING LOCATION
GOTO INITIAL
ORG 0x04 ; The interrupt vector
GOTO ISR
INITIAL: BSF STATUS,RP0 ; SELECT BANK 1
MOVLW 0X1F ;
MOVWF PORTA
MOVLW 0X03
MOVWF PORTB
BCF STATUS,RP0
CLRF PORTA
CLRF PORTB
CLRF INTCON
BSF INTCON,GIE
BSF INTCON,INTE ; Enable external INT-pin interrupts
ISR: CLRF PORTA
CLRF PORTB
BSF PORTB,5
CALL DELAY
BCF PORTB,5
BCF INTCON,INTF ; CLEAR THE INTERRUPT FLAG BIT
RETFIE ; RETURN FROM INTERRUPT
hey.... pls help me.. the problem is after interrupted, it got light up my LED at portb,5...... but then i not turn off the LED.... from the program above it should light up the LED then delay awhile then turn off the LED.... why ya??? it just light up the LED>..... and i need to turn off and on the power supply to reset it~~~~ why???
GOTO INITIAL
ORG 0x04 ; The interrupt vector
GOTO ISR
INITIAL: BSF STATUS,RP0 ; SELECT BANK 1
MOVLW 0X1F ;
MOVWF PORTA
MOVLW 0X03
MOVWF PORTB
BCF STATUS,RP0
CLRF PORTA
CLRF PORTB
CLRF INTCON
BSF INTCON,GIE
BSF INTCON,INTE ; Enable external INT-pin interrupts
ISR: CLRF PORTA
CLRF PORTB
BSF PORTB,5
CALL DELAY
BCF PORTB,5
BCF INTCON,INTF ; CLEAR THE INTERRUPT FLAG BIT
RETFIE ; RETURN FROM INTERRUPT
hey.... pls help me.. the problem is after interrupted, it got light up my LED at portb,5...... but then i not turn off the LED.... from the program above it should light up the LED then delay awhile then turn off the LED.... why ya??? it just light up the LED>..... and i need to turn off and on the power supply to reset it~~~~ why???