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).

enter image description here

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.

  • \$\begingroup\$ 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.) \$\endgroup\$
    – jonk
    Commented Feb 11, 2020 at 16:07
  • \$\begingroup\$ My guess is EMI. \$\endgroup\$
    – winny
    Commented Feb 11, 2020 at 16:09
  • \$\begingroup\$ 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. \$\endgroup\$ Commented Feb 11, 2020 at 16:10
  • \$\begingroup\$ @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. \$\endgroup\$ Commented Feb 11, 2020 at 16:11
  • \$\begingroup\$ 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. \$\endgroup\$ Commented Feb 11, 2020 at 16:12

1 Answer 1


It is for EMI purposes.

Even though a single row is scanned every 4.5ms or so (about 220Hz) if the scope picture in the service manual is accurate (it may not be), there are 16 scan outputs (15 used), so the scanning happens at 3.5 MHz rate (my estimate, could be wrong, most likely it is slower given the RC time constant of 1 MHz and the pulse shape on service manual) where one wire goes down and another goes up. Given the physical size of the unit, each of the scanning signals also have considerable length inside the unit to form an antenna, whether on wires between PCBs or copper traces on PCB.

Most often the overlooked part is not the scanning rate of roughly 3.5 MHz, but the edge rate of the signal. Basically, the sharper the edges of the pulse, the higher frequencies it must have. Infinitely fast sharp edge would in theory have infinite bandwidth. That is why there is slew rate limiting on the scan output wires in the form of a RC filter. 1kohm and what seems to be 1nF indeed has cutoff at 1 MHz.

It limits the bandwidth of the scanning signal so it does not radiate much.

  • \$\begingroup\$ Thank you very much. This makes complete sense. And thank you for going so far as to looking into the service manual that I've been staring at for hours. It's fantastic to have people like you around. \$\endgroup\$ Commented Feb 11, 2020 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.