You are on page 1of 2

;*****************************************************************************

;*
*
;*
INSTITUTO TECNOLOGICO DE OAXACA
*
;*
INGENIERIA ELECTRONICA
*
;*
ENCENDER 8 LEDS CON 3 ENTRADAS
;*
MICROCONTROLADORES
*
;*
MARTINEZ GOMEZ LUIS ANGEL
;*
;*****************************************************************************
INCLUDE "P16F887.INC"
ORG 0X00
BSF STATUS, RP0
MOVLW 0X07
MOVWF TRISA
MOVLW 0X00
MOVWF TRISB
BSF STATUS, RP1
MOVLW 0X00
MOVWF ANSEL
BCF STATUS,RP0
BCF STATUS,RP1
LED
CLRF PORTB
BTFSC PORTA,2
CALL A4
BTFSC PORTA,1
CALL A2
BTFSC PORTA,0
CALL A1
BSF PORTB,0
GOTO LED
A1 BSF PORTB,1
GOTO LED
A2 BTFSC PORTA,0
CALL A3
BSF PORTB,2
GOTO LED
A3 BSF PORTB,3
GOTO LED
A4 BTFSC PORTA,1
CALL A6
BTFSC PORTA,0
CALL A5
BSF PORTB,4
GOTO LED
A5 BSF PORTB,5
GOTO LED
A6 BTFSC PORTA,0
CALL A7
BSF PORTB,6
GOTO LED

A7 BSF PORTB,7
GOTO LED
END