enter image description here
#INCLUDE <P16F84A.INC>
__CONFIG 3FF1H
BSF STATUS,5
MOVLW B'0000000'
MOVWF TRISB
MOVLW B'11000'
MOVWF TRISA
BCF STATUS,5
MOVLW B'10000000'
MOVWF PORTB
SW1
BTFSC PORTA,0
GOTO SW2
GOTO TOPLED
TOPLED
MOVLW B'01111001'
MOVWF PORTB
GOTO SW1
SW2
BTFSC PORTA,1
GOTO TOPLED1
GOTO SW3
TOPLED1
MOVLW B'10000110'
MOVWF PORTB
GOTO SW1
SW3
BTFSC PORTA,2
GOTO SW1
GOTO BOTLED
BOTLED
MOVLW B'11110011'
MOVWF PORTB
GOTO SW1
END
im trying to make it function using the three top buttons instead the ones in the bottom
i wonder what solution i have to do to make it function that way, above is my code for the schematic in the picture
New contributor
Jarren James Parungao is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.