I am using VHDL to read encoder pulses on an FPGA. Currently, I detect the change in the two pins and wait a set time for the any bouncing to stop and repeat. It just occurred to me that instead of waiting for my PC817 to settle, I read the change and change the inputs to outputs driven to the what the change was for a short time to shunt away the bounce. Is that common practice..bad practice?