Hi,
I'm trying to read an old keyboard from the Wang 300 series calculators. These calculators from the '60s used nixie tubes, diode-transistor logic, and power supplies of -11V, 0V, and +11V. -11V was logic True, 0V was logic False, and +11V was just used as a pull up for the PNP transistor bases.
I want to read this keyboard from a PIC32 using 3.3V and GND. I'm getting some good results, but I'm also seeing behavior I don't understand.
I've attached the keyboard's schematic. My understand of DTL logic is weak and my understanding of what happens when I try to substitute voltages is even weaker.
My approach is to set the keyboard's "-11V" line to GND and leave the "0V" and "+11V" unconnected. I set KBE (Keyboard Enable) to GND. KBC is also unconnected. I'm hoping that by not driving the transistors, I'm just leaving that part of the circuit disabled and keeping things simpler. I need to read the key press from KB1, KB2, KB4, KB8, KB16, and KBI. I thought the way to do that was to connect those to the PIC32's inputs with the internal weak pull ups (WPU). When a button is pressed, it would connect the cathode of certain diodes to the keyboard's -11V line (which I have set to GND) through a 33K resistor. That would pull selected pins down to GND.
That was the plan anyway. What happens is that the inputs all remain high even when I press keys.
(The diodes are FD1684. I can't find a data sheet for them, so the forward voltage is unknown.)
So I tried turning off all the WPUs except one, on the KBI line. That works a little better. When no key is pressed, I read 0x3f. When the Change Sign key (which has diodes on all the inputs) is pressed, I read 0x00 (the schematic says the key code is 63, or 0x3f, so I'm reading the complement of that). When I press the 0 key, I get 0x0f (which is also good: the schematic says the 0 key is code 48, or 0x30. When I read 0x0f, I'm getting the complement of that.) I was happy until I pressed the 1 key (code 49, 0x31) and I read a value of 0x00. In fact, most keys read as 0x00. The 5 key (code 53) reads as 0x3f but maybe it's just broken. The Enter key (code 33, 0x21) sometimes reads as 0x1e (which is good - the complement of 0x21) but I've also seen 0x00, 0x20, and 0x02.
I don't understand why having a WPU on all the lines does not work. I don't understand why having a WPU on only one of the lines ever works. And given that it sometimes works, I don't understand why it always works for some keys, never works for others, and intermittently works for some. Can anyone explain it?
As a last resort, I could generate +/-11V for the keyboard, but then I'd need level shifters for the PIC32. I'd love it if I could just drive this keyboard with 3.3V. Is it going to be possible?
Thank you,
Bob