Professional Documents
Culture Documents
Encender Led Pic PDF
Encender Led Pic PDF
include "p16f877a.inc"
; CONFIG
; __config 0xFF39
__CONFIG _FOSC_XT & _WDTE_OFF & _PWRTE_OFF & _BOREN_OFF & _LVP_OFF & _CPD_OFF
& _WRT_OFF & _CP_OFF
org 0x00
bsf STATUS,RP0
bcf STATUS,RP1
movlw b'11110000'
movwf TRISB
bcf STATUS,RP0
CLRF PORTB
INICIO
ENCENDER
btfss PORTB,7
goto ENCENDER
bsf PORTB,0
ENCENDIDO
btfsc PORTB,7
goto ENCENDIDO
APAGAR
btfss PORTB,7
goto APAGAR
bcf PORTB,0
APAGADO
btfsc PORTB,7
goto APAGADO
goto INICIO
end