Mechanical contacts bounce for 5~20ms; RC (τ=1~10ms) smooths it and a Schmitt (74HC14) squares it up.
Typical values: R=10k, C=0.1~1μF; keep a cheap software consistency check as a second layer.
RC alone without the Schmitt hysteresis makes things worse - they are a matched pair.
| Scheme | Delay | Cost | Use |
|---|---|---|---|
| Software only | 10~20ms | Zero | General MCU |
| RC+Schmitt | τ | Low | Quality designs |
| Dedicated chip | Fixed | Medium | Key matrices |
| Flip-flop latch | Instant | Low | Edge capture |
| RC only | τ | Lowest | Avoid alone |
| Filter+IRQ | τ | Low | Combined |
Apply the points above to Switch debounce; the figures are typical engineering values, so confirm them against the device datasheet and the actual design before release.
The quantities and component characteristics discussed here follow current national standards and the corresponding IEC documents: Per GB/T 17574 and the corresponding IEC documents. Ratings and derating follow the device datasheet and the product design file. Always check the device datasheet and the product design file for ratings and derating.
Locate the issue with the approach above, then confirm with measurements; safety-related circuits must follow the standards and manufacturer requirements.