Hola
Estoy intentando usar el PORTA de este PIC como salida, pero no me responde, no activa los pines a los que les env=EDo un alto.
=BFMe pueden ayudar?
El c=F3digo es el siguiente:
;------------------ Encabezado ------------------
list P=3D16F628A #include
;------------------- Variables ------------------
cnta equ 0x20 cntb equ 0x21 cntc equ 0x22
;-------------- Direcci=F3n de inicio -------------
org 0x00 goto Inicio
;---------- Direcci=F3n de interrupci=F3n -----------
org 0x04
;--------------------- Cont ---------------------
Cont call DecrB decfsz cnta,1 goto Cont return
DecrB call DecrC decfsz cntb,1 goto DecrB return
DecrC decfsz cntc,1 goto DecrC return
;---------------- Led -----------------
Led btfss PORTA,4 ; si el led est=E1 apagado goto LedEnc ; envio a encender bcf PORTA,4 ; si no, lo apago goto LedFin
LedEnc bsf PORTA,4 ; enciendo el led goto LedFin
LedFin return
;-------------------- Inicio --------------------
Inicio clrf PORTA movlw 0x07 ; turn comparators off and... movwf CMCON ; ...enable pins for I/O functions bsf STATUS,RP0 ; configurando puertos bcf STATUS,RP1 ; configurando puertos movlw 0x10 movwf TRISA bcf STATUS,RP0
;-------------------- Bucle ---------------------
Bucle movlw 0x06 movwf cnta movlw 0x14 movwf cntb movlw 0x08 movwf cntc
call Cont call Led goto Bucle
;------------------------------------------------ end ;------------------------------------------------