Professional Documents
Culture Documents
LIST =P16F84A
INCLUDE <P16F84A.inc>
CBLOCK OxOC
CONTADOR
ENDC
org 0
INICIO
bsf STATUS,RP0
bsf PORTB,3
bsf PORTB,2
bsf PORTB,0
bsf PORTB,1
bcf PORTB,7
bcf PORTB,6
bcf PORTB,5
bcf PORTB,4
bcf STATUS,RP0
PRINCIPAL
clrf CONTADOR
movf CONTADOR,W
movwf PORTB
PULS1_PRES
btfss PULSADOR_1
goto PULS1_PRES
PULS2_PRES
btfss PULSADOR_2
goto PULS2_PRES
movf PORTB,W
andlw B'00001100'
addlw .1
movwf CONTADOR
addwf CONTADOR
addwf CONTADOR,F
movwf PORTB
goto PRINCIPAL
END