Hi everybody,

I'm using the PIC16C745 microchip to do my final year project
the situation is, if switch 1 is pressed, LED will light up and when switch 2 is pressed again, the LED will go off. I am using an assembly language ( sofware MPLab version 7.2) to write the code. I have encounter some problem, when i apply the 5 V to the circuit. The Led must Light up, but it did not .
Here is myCode:

MAIN org 00000030h

Start
bsf STATUS,RP0 ; select bank1
clrf PORTB ; clear PORTB output latch
movlw b'00000110' ; Set all pins PORTB 1,2 as Input
MOVWF TRISB ;

ON
btfsc PORTB,1 ; Has S2 been press? (Normally high,goes low when pressed.)
goto ON ; No, go back check again
movlw b'00000001' ; move it from register 1 to w.
movwf PORTB ; move it to PORTB to light up the LED

OFF
btfsc PORTB,2 ; Has key been press? (Normally high, goes low when pressed.)
goto OFF ; No, check again
movlw b'00000000' ; move it from register 1 to w.
movwf PORTB ; OFF the LED

DebounceA
btfss PORTB,1 ; Has key been released?
goto DebounceA ; No, wait again
goto Start ; Loop again
end ; directive indicates end of code

I use only one port instead to be an input and output. When i build the code inside the PIC16C745, the Led still not turn on. Can you help me to see weather to code i have done correctly. Thank you