You are on page 1of 1

__config 0xFFFA

LIST P=16F877A
INCLUDE<P16F877A.INC>
RADIX HEX
;*******ZONA DE VARIABLES*******;
cblock 0x20
FAC_1
FAC_2
P_H
P_L
endc
;*******ZONA DE MACROS*******;
movlf macro k,f
movlw k
movwf f
endm

movff macro f1,f2


movfw f1
movwf f2
endm
;*******ZONA DE PROGRAMACION*******;
org 0x00
goto INICIO
org 0x05
INICIO
movlf 0x34,FAC_1
movlf 0x25,FAC_2
movlf 0x00,P_L
movlf 0x00,P_H
BUCLE
bcf STATUS,0
movfw FAC_1
addwf P_L,1
btfsc STATUS,0
incf P_H,1
bcf STATUS,2
decf FAC_2,1
btfss STATUS,2
goto BUCLE
fin
goto fin
end

You might also like