To take care of switch bounce, add the following: Nebelong Bjarne wrote: > > Eke, if you post the code it would be easier to help you. > > OR > ;--------------------------------- > ; Just toggle the LED, HIGHLY sensitive to button bounces !!!! port equ 0x06 ;for portB temp1 equ 0x07 temp2 equ 0x08 > Wait4In1 > btfss Port,_InPin ; Loop untill _InPin gets high > goto Wait4In1 > ;--- call delay ;call 10 millisec delay btfss Port,_InPin ;check to see if button is still pressed? goto Wait4In1 no, go back to start > btfsc Port,_OutPin ; Toggle LED > goto ToggleLEDOff > ToggleLEDOn > bsf Port,_OutPin ; Turn LED on > goto ToggleLED_end > ToggleLEDOff > bcf Port,_OutPin ; Turn LED off > ToggleLED_end > ;--- > Wait4In2 > btfsc Port,_InPin ; Loop untill _InPin relases > goto Wait4In2 > ;--- > goto Wait4In1 ; Repeat delay movlw 0x0A ;10 millisec delay, assuming you are using 4 Mhz osc. movwf temp1 delaya movlw 0x0FA movwf temp2 delayb nop nop decfsz temp2,f goto delayb decfsz temp1,f goto delaya return ;or "retlw 0" Another thing, make sure your unused pins are tris'ed to output, or if tris'ed to input, make sure they are connected to VCC or gnd. Oh, and welcome to the wonderfull world of PICs, I hope it serves you well. Quentin