You are on page 1of 2

PDel0 equ include org 0 PEPE movlw

0x0c p16f628a.inc

B'10001000' ;GIE y RBIE movwf INTCON goto org INICIO 4

PEPE3

goto

INTER1 PORTB bsf movlw movwf clrf bcf STATUS,RP0 b'11111110' TRISB OPTION_REG STATUS,RP0 ;Espera goto PEPE2

INICIO clrf

;RP0=Salida

PEPE2

nop

INTER1 bcf

PORTB,0 ;Apaga PB0 bcf INTCON,RBIF ;Limpia RBIF btfsc goto PORTB,2 x1N PORTB,1 x01 x00 PORTB,1 x11 x10 RETA RETA RETA RETA RETA RETA RETA RETA PORTB,0 RETA PORTB,0 Interrupcin 1 1 1 1 2

x0N

btfsc goto goto btfsc goto goto

x1N

x00

call call x01 call call x10 call call x11 call call UNO bsf call bcf FINRET retfie ;Fin de RETA movlw movwf PLoop0 clrwdt decfsz goto PDelL1 goto PDelL2 clrwdt return

;Enciende PB0 ;Apaga PB0

.248 PDel0

; ; ; PDel0, 1 ; PLoop0 ; PDelL2 ; ;

set numero de repeticion | clear watchdog + (1) es el tiempo 0 ? no, loop ; 2 ciclos delay 1 ciclo delay 2+2 Fin.

END