yie23
Joined: 09 Dec 2010 Posts: 11
|
problem with interrupt |
Posted: Fri Dec 10, 2010 4:11 am |
|
|
this is my code
Code: |
#include <p16f877a.inc>
__config 0x3f7a
ORG 0x00
WAIT 1 EQU 0X20
WAIT 2 EQU 0X21
WAIT 3 EQU 0X22
ORG 0X110
BCF STATUS, RP1
BSF STATUS, RP0
MOVLW 0X06
MOVWF ADCON 1
MOVLW 0X4F
MOVWF TRISA
MOVLW 0X00
MOVWF TRISB
BCF STATUS, RP0
BCF STATUS, RP1
GMI
MOVLW 0X02
MOVWF PORTB
CALL DELAY
MOVLW 0X04
MOVWF PORTB
CALL DELAY
MOVLW 0X08
MOVWF PORTB
CALL DELAY
GOTO GMI
BSF STATUS, RP1
SSF STATUS, RP0
BTFSC EECON, WR
GOTO $-1
BCF STATUS, RP0
MOVF DATA_EE_ADR, W
MOVWF EEADR
MOVF DATA_EE_DATA, W
MOVWF EEDATA
BSF STATUS, RP0
BCF EECON, EEPGD
BSF EECON 1, WREN
BCF INTCON, GIE
MOVLW 55H
MOVEECON
MOVLW AAh
MOVWF EECON 2
BSF INTCON GIE
BCF EECON 1, WREN
DELAY
MOVLW 0X13
MOVWF WAIT 1
MOVLW 0XFF
MOVWF WAIT 2
MOVLW 0XFF
MOVWF WAIT 3
DECFSZ WAIT 3,1
GOTO $-1
DECFSZ WAIT 2,1
GOTO $-5
DECFSZ WAIT 1,1
GOTO $-9
RETURN
END
|
i need to call interrupt in that coding at the led coding . anyone can u help me ? |
|