Code:
list p=16f84A ; list directive to define processor
#include <p16F84A.inc> ; processor specific variable definitions
errorlevel -302 , -207 ; suppress message 302 from list file
__config _XT_OSC & _CP_OFF & _PWRTE_OFF & _WDT_OFF
var1 equ 0x0C
ORG 0x00 ; processor reset vector
GOTO main ; go to beginning of program
ORG 0x004 ; interrupt vector location
NOP
RETFIE ; return from interrupt
main:
MOVLW 0x00
BSF STATUS, RP0
MOVWF TRISB
BCF STATUS, RP0
k: MOVLW 0xFF
MOVWF PORTB
CALL delay
MOVLW 0X00
MOVWF PORTB
CALL delay
GOTO k
delay:
MOVLW 0xFF
MOVWF var1
h: DECFSZ var1, F
GOTO h
RETURN
end
your reply will be much appreciated!