How to create a 100ms delay between button pressed and line grounded?
Here is the circuit:



The rest is firmware.

The passive pullup on the GP3 pin is enabled.  The pin therefore goes low when the button is pressed and high when not.  The firmware debounces this and puts the result on the OUT pin.  Since debouncing includes a delay, you simply make this delay your desired 100 ms.

Normally I use 50 ms debouncing delay, because that's about the maximum where humans still feel the action is immediate.  If you want a deliberate delay, make the debouncing delay as long as you need.

Look at the button every iteration of a timed loop.  If the instantaneous state of the button is the same as the debounced state, reset the debounce counter to maximum.

Decrement the debounce counter each loop.  If it reaches 0, then then the last state of the input line becomes the new debounced state.  Reset the counter to maximum.

Adjust the debounce counter maximum value to however many loop iterations you do in your desired 100 ms delay time.

For example, lets say you run the loop every overflow of the free-running timer 0.  That's every 256 instruction cycles, which is every 256 &micro;s.  It would take 391 iterations to get to 100 ms.  Since it would be easier to use a 8 bit counter, you could divide the timer 0 overflows by 2 (run the loop every second time).  Now it takes 195 iterations for 100 ms, which fits nicely into a 8-bit variable.