Está en la página 1de 2

__CONFIG

_CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC

list p=16F84A
#include P16F84A.inc
AUX1
AUX2
AUX3
contador

EQU 0X0D
EQU 0X0E
EQU 0X0F
EQU 0x0c

org 0
bsf STATUS,RP0
clrf TRISB
movlw b'00011111'
movwf TRISA
bcf STATUS,RP0
clrf contador
movlw 0x01
movwf PORTB
PRINCIPAL
btfsc PORTA,0
goto PRINCIPAL
goto INCREMENTO
INCREMENTO
call RETARDO
incf contador,1
movf contador,0
goto DISPLAY
DISPLAY
call DIS
movwf PORTB
goto PRINCIPAL
DIS

addwf PCL, 1
retlw 0x01
retlw 0x4f
retlw 0x12
retlw 0x06
retlw 0x4c
retlw 0x24
retlw 0x20
retlw 0x0f
retlw 0x00
retlw 0x0c
goto LIMPIAR

LIMPIAR
movlw 0x01
movwf PORTB
clrf contador

return

RETARDO
movlw d'70'
movwf AUX1
movwf AUX2
movwf AUX3
OTRO1
movwf AUX1
OTRO2
movwf AUX2
REG
decfsz AUX2,1
goto REG
decfsz AUX1,1
goto OTRO2
decfsz AUX3,1
goto OTRO1
return
end

También podría gustarte