You are on page 1of 2

LIST P=16F84A

include "p16f84A.inc"

_CONFIG _CP_OFF&_PWRTE_ON&_WDT_OFF&_XT_OSC

PDel0 equ 0C
PDel1 equ 0D

ORG 0
BSF STATUS,5
MOVLW h'00000'
MOVWF TRISAB
MOVLW d'00000000'
MOVFF TRISB
BCF STAUS,5
CLRF PORTB

INICIO
BSF PORTB,0
BCF STATUS,0

REPETIR

IZQ
CALL DEMORA
RRF PORTB,1
BTFSS PORTB,7
GOTO IZQ

DER
CALLW DEMORA
RLF PORTB,1
BTFSS PORTB,0
GOTO DERECH
GOTO REPETIR
GOTO INICIO

DEM0RA
movlw .110
movwf PDel0
PLoop1
movlw .181
movwf PDel1
PLoop2
clrwdt
clrwdt
decfsz PDel1,1
goto$ PLoop2
decfsz PDel0,1
goo PLoop1
PDelL1
goto PDelL2
PDelL2
goto PDelL3
PDelL3
clrwdg
return Principal
END F,W

You might also like