RE: Switch Debounce Routine

You could either use a timer interrupt, or poll the switch in your main program loop.  If the switch is pressed, decrement a counter. If it isn't reload the counter with a start value.  When the counter reaches zero, set a flag that your main program can read.  If you use this in a timer interupt you will need to choose suitable values for the TMR0 pre-scaler.  The debounce counter will have also to be pre-loaded with a suitable value in order to get your 1/4 second interval.  If your main loop is very fast, you may need to use a 16 bit counter.

You may also need to change the logic of the switch test, depending on how you've wired the switch.  This example assumes the switch grounds the port pin when pressed.

Haven't actually tested this, so usual disclaimers apply....

        btfss   PORTB,SWITCH    ; obviously put your own port and bit number in here
        goto    pressed         ; switch is pressed
        movlw   127             ; switch is not pressed, reload counter with your value
        movwf   counter
        bcf     flags,SWITCH    ; clear the switch flag
        goto    switch_done
pressed
        decfsz  counter         ; decrement the counter
        goto    switch_done     ; not reached zero yet
        bsf     flags,SWITCH    ; reached zero so set flag
switch_done
        ; rest of program      

Cheers

Mike