From James.eaton@accenture.com Tue Sep 04 04:00:44 2001
Subject:Re: BX-3,CX3 repair

--- In CloneWheel@y..., richardon@n... wrote:
> In the moment our hardest problem is the need for a microcontroller
> with 45 IO ports. There is a SX with 40 IO ports, but that seems to
> be maximum. multiplexing could be an solution.
> Any ideas ?

richy

Scan the keyboard using a 12 out x 6 in matrix. This would need 6
outputs and 12 inputs to the PIC.

1 line for each chromatic note
1 line for each octave (top c is another octave)

How it would work:
Set octave buss 1 high, measure the 12 output lines
Set octave buss 1 low again, set octave buss 2 high, measure the 12
output lines
Set octave buss 2 low again, set octave buss 3 high, measure the 12
output lines.
etc.

You will need a small signal diode (e.g. 1N4148) where every key
contact connects the 12 note lines with the 6 octave lines otherwise
you will get shorts when pressing keys in other octaves not being
scanned at that moment.

This technique is used by most MIDI controllers. Add another set of
contacts (and another 6 octave lines) if you need velocity
sensitivity.

Different manufacturers use different matrix dimensions. I believe
Roland uses 6 output lines and half octave busses.

Regards

James