Hola, necesito ayuda con un problema que tengo con unos pulsadores utilizando un Pic16f84A, la cuestion es que no me responde nada del circuito, solo me aparecen ceros, y ya descarte problema de montaje, y no se trata de rebotes del pulsador, ya que he probado con todads las soluciones de la parte fisica, inclusive con retardos para el pulsador, por favor ayuda, aqui adjunto el circuito y el código, es bastante básico. Muchas gracias por su colaboración.
___________________________________________________________________________
__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC
LIST p=16F84A
INCLUDE <P16F84A.INC>
N0 EQU h'00'
N1 EQU h'01'
N2 EQU h'02'
N3 EQU h'03'
N4 EQU h'04'
N5 EQU h'05'
N6 EQU h'06'
N7 EQU h'07'
N8 EQU h'08'
N9 EQU h'09'
N10 EQU h'10'
N11 EQU h'11'
N12 EQU h'12'
N13 EQU h'13'
N14 EQU h'14'
N15 EQU h'15'
N16 EQU h'16'
N17 EQU h'17'
N18 EQU h'18'
N19 EQU h'19'
N20 EQU h'20'
N21 EQU h'21'
N22 EQU h'22'
N23 EQU h'23'
N24 EQU h'24'
N25 EQU h'25'
N26 EQU h'26'
N27 EQU h'27'
N28 EQU h'28'
N29 EQU h'29'
N30 EQU h'30'
N31 EQU h'31'
N32 EQU h'32'
N33 EQU h'33'
N34 EQU h'34'
N35 EQU h'35'
N36 EQU h'36'
N37 EQU h'37'
N38 EQU h'38'
N39 EQU h'39'
N40 EQU h'40'
N41 EQU h'41'
N42 EQU h'42'
N43 EQU h'43'
N44 EQU h'44'
N45 EQU h'45'
N46 EQU h'46'
N47 EQU h'47'
N48 EQU h'48'
N49 EQU h'49'
N50 EQU h'50'
N51 EQU h'51'
N52 EQU h'52'
N53 EQU h'53'
N54 EQU h'54'
N55 EQU h'55'
N56 EQU h'56'
N57 EQU h'57'
N58 EQU h'58'
N59 EQU h'59'
N60 EQU h'60'
ORG 0
bsf STATUS,RP0
clrf TRISB
movlw h'1F'
movwf TRISA
bcf STATUS,RP0
clrf PORTB
clrf PORTA
clrf 0C
Configuracion
btfsc PORTA,0
goto Decremento
Incremento
Call Retardo_200ms
incf 0C
Validacion
movlw d'61'
subwf 0C,W
btfss STATUS,02
goto Valida
No_valida
movlw h'60'
movwf PORTB
decf 0C
goto Configuracion
Valida
movfw 0C
Call Tabla
movwf PORTB
goto Configuracion
Decremento
btfsc PORTA,1
goto Configuracion
Validacion_b
movlw h'00'
subwf 0C,W
btfss STATUS,02
goto Valida_b
No_valida_b
goto Configuracion
Valida_b
Call Retardo_200ms
decf 0C
movfw 0C
Call Tabla
movwf PORTB
goto Configuracion
Tabla
Addwf PCL,F
DT N0, N1, N2, N3, N4, N5, N6, N7, N8, N9, N10, N11, N12, N13, N14, N15, N16, N17, N18, N19, N20, N21, N22, N23, N24, N25, N26, N27, N28, N29, N30
DT N31, N32, N33, N34, N35, N36, N37, N38, N39, N40, N41, N42, N43, N44, N45, N46, N47, N48, N49, N50, N51, N52, N53, N54, N55, N56, N57, N58, N59, N60
INCLUDE "C:\RETARDOS.INC"
END
___________________________________________________________________________
__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC
LIST p=16F84A
INCLUDE <P16F84A.INC>
N0 EQU h'00'
N1 EQU h'01'
N2 EQU h'02'
N3 EQU h'03'
N4 EQU h'04'
N5 EQU h'05'
N6 EQU h'06'
N7 EQU h'07'
N8 EQU h'08'
N9 EQU h'09'
N10 EQU h'10'
N11 EQU h'11'
N12 EQU h'12'
N13 EQU h'13'
N14 EQU h'14'
N15 EQU h'15'
N16 EQU h'16'
N17 EQU h'17'
N18 EQU h'18'
N19 EQU h'19'
N20 EQU h'20'
N21 EQU h'21'
N22 EQU h'22'
N23 EQU h'23'
N24 EQU h'24'
N25 EQU h'25'
N26 EQU h'26'
N27 EQU h'27'
N28 EQU h'28'
N29 EQU h'29'
N30 EQU h'30'
N31 EQU h'31'
N32 EQU h'32'
N33 EQU h'33'
N34 EQU h'34'
N35 EQU h'35'
N36 EQU h'36'
N37 EQU h'37'
N38 EQU h'38'
N39 EQU h'39'
N40 EQU h'40'
N41 EQU h'41'
N42 EQU h'42'
N43 EQU h'43'
N44 EQU h'44'
N45 EQU h'45'
N46 EQU h'46'
N47 EQU h'47'
N48 EQU h'48'
N49 EQU h'49'
N50 EQU h'50'
N51 EQU h'51'
N52 EQU h'52'
N53 EQU h'53'
N54 EQU h'54'
N55 EQU h'55'
N56 EQU h'56'
N57 EQU h'57'
N58 EQU h'58'
N59 EQU h'59'
N60 EQU h'60'
ORG 0
bsf STATUS,RP0
clrf TRISB
movlw h'1F'
movwf TRISA
bcf STATUS,RP0
clrf PORTB
clrf PORTA
clrf 0C
Configuracion
btfsc PORTA,0
goto Decremento
Incremento
Call Retardo_200ms
incf 0C
Validacion
movlw d'61'
subwf 0C,W
btfss STATUS,02
goto Valida
No_valida
movlw h'60'
movwf PORTB
decf 0C
goto Configuracion
Valida
movfw 0C
Call Tabla
movwf PORTB
goto Configuracion
Decremento
btfsc PORTA,1
goto Configuracion
Validacion_b
movlw h'00'
subwf 0C,W
btfss STATUS,02
goto Valida_b
No_valida_b
goto Configuracion
Valida_b
Call Retardo_200ms
decf 0C
movfw 0C
Call Tabla
movwf PORTB
goto Configuracion
Tabla
Addwf PCL,F
DT N0, N1, N2, N3, N4, N5, N6, N7, N8, N9, N10, N11, N12, N13, N14, N15, N16, N17, N18, N19, N20, N21, N22, N23, N24, N25, N26, N27, N28, N29, N30
DT N31, N32, N33, N34, N35, N36, N37, N38, N39, N40, N41, N42, N43, N44, N45, N46, N47, N48, N49, N50, N51, N52, N53, N54, N55, N56, N57, N58, N59, N60
INCLUDE "C:\RETARDOS.INC"
END