Thank you Joe for the link.

HI Paul

I use the 6 MHZ crystal. I did draw the schematic digram but i do not have a sofware to draw the schematic , so i use free hand.

Let me expalain how i connect .
the PIC16C745have 28 pins

connect pin 8 and 19 to the ground
pin 20 to +5 V
pin 21 connnect to a resistor and Led then + 5 V

pin 21 _______(Resistor)____(Led)___ +5V
pin 22 connect reisistor ( also the resistor connect to the ground ) + then the switch and follow by + 5V

(ground)
^
I
I
pin 22.______Resistor__(switch)___(+5V)

pin 23 connect reisistor ( also the resistor connect to the ground ) + then the switch and follow by + 5V


(ground)
^
I
I
pin 23.______Resistor__(switch)___(+5V)

And the cystal have got 4 pins

Pin no 7 to the ground
pin 8 to pin 9 of PIC16C745
pin 14 to the 5V

This schematic is tofor match for :

AIN org 00000030h

Start
bsf STATUS,RP0 ; select bank1
movlw b'00000110' ; Set pins PORTB 1,2 as Input
movwf TRISB ;
bcf STATUS, RP0 ; go back to Bank 0
ON
btfss PORTB,1 ; Has S1 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

end