# Weird RC time constants for possible debouncing

I am modifying a CTK-450 keyboard (manufactured by CASIO) into a MIDI controller. Going over the schematics, I found the way the keyboard CPU reads the keystates, which is rather simple. They are arranged in a matrix, which has 11 output scan lines (it really has some more, but those are for other buttons on the keyboard) and 6 input lines (again, they are really 8, but only 6 are useful in this case).

KO0 - KO10 are the output scan lines and KI2-KI7 are the inputs from the keys. The keys themselves are in a button matrix with diodes.

My question is about the debouncing RC time constants used in the circuit, if the RC circuits are even debouncing and not filtering some RF.

It is my understanding that the output side has RC circuits with time constant to=1µs, and the input side has time constants of ti=0.1µs. Are these plausible debounce times for normal key switches? I believe they are way too short to be, and if they were debouncing, I still can't explain why the output side would even have to be debounced, and with a 10x larger time constant than the input side at that.

If these RC circuits are not debouncing, what could they be doing? Some RF filtering maybe? What could they be filtering at the 1MHz-10MHz range? I've looked up what's broadcast in that range, and there seems to only be shortwave radio, including ham radio, but I don't believe the interference would be so big as to warrant adding a filter to the circuit in the first place.

What are these RC circuits doing, and what could explain the odd time constants?

Also, if the RC circuits are not debouncing, could it be the CPU performing that task? This is an open question I have, as I have to modify the circuit through an Arduino in the future, and would like to know more or less how the keyboard is doing its thing.

• Probably the CPU is doing the denouncing. The R and C is probably limiting the current into the protection diodes of each MCU input to the specifications (probably needed to be well under 2 mA.)
– jonk
Commented Feb 11, 2020 at 16:07
• My guess is EMI. Commented Feb 11, 2020 at 16:09
• I would think the 1K resistors would be doing the current protection on the diodes in the first place, why would one need the capacitors, and what could explain the variable values depending on the side of the circuit? I have realised that some other buttons only have an RC on the output side, and the diode is a different one to the one used for the keys, so maybe it is something to do with that, but I am not too sure. Commented Feb 11, 2020 at 16:10
• @winny What EMI could there be at those frequencies that could warrant the RC circuits in the first place? Maybe some other component on the PCB itself? I doubt they would choose to shield from ham radio, the interference would be rather small. Commented Feb 11, 2020 at 16:11
• On the input side (at top) the capacitors are connected to the processor (probably to limit rise / fall / overshoot) and on the output side they are connected to the connector (isolated from the processor by 1k with probably much the same purpose). Very likely an EMI precaution against noise generated by the processor output pins and switch closures. Commented Feb 11, 2020 at 16:12