View Single Post
Old 27th Oct 2018, 10:10 pm   #115
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,554
Default Re: MK14 schematic revisions

Quote:
Originally Posted by GrahamN View Post
...can easily be modified to suit other computers of that era relatively simply (I'm thinking KIM1, Acorn System 1, etc.).
Yes, I've already done this. Not with the computers you mention but with numerous other items of equipment which have relatively complex programming but are only programmable through their keypads, things like low end burglar alarm panels and so on. It's an especially useful thing to be able to do when you have a large quantity of items all of which are only keypad programmable and all of which need the same set of initial parameters programmed into them, normally a tedious, slow and error prone manual job. When doing this with other equipment I use an Arduino driving a general purpose 4 * 4 opto matrix and the information to be programmed is just held in look up tables in the Arduino source code.

The very first incarnation of a scheme I used like this did actually use relays because I had lots of those and no optocouplers. Apart from the noise and the slower speed (relays need time to physically get from off to on, and from on back to off again) there is also the problem that their contacts bounce just like the contacts in switches do.

Using optos (which turn on and and off a lot faster and don't bounce) you can ramp the speed up until character entry speed is as fast as the target system can manage to accept it - usually the speed limiting factor is the target system's built in key debounce delay. The entry speed in that MK14 video is about 5 percent less than the absolute maximum character input rate the MK14 can reliably accept without starting to miss incoming characters.

For other systems you also have to factor in how long it will be after any given input before the system has performed the requested action and is ready to accept another input character.

Last time I was discussing this (in a now closed MK14 thread) TonyDuell pointed out that I could have used only twelve optocouplers, with four connected to the rows and eight connected to the column/cathode drive lines. To 'press' any given key you'd turn on one of the row optos and one of the column optos, and those two optos in series, one above the other, would connect the desired row and column together. I think on any standard Arduino or Pi you could probably find 12 digital outputs to drive those 12 optocouplers, so there wouldn't be any need for any additional encoding hardware between the micro and the opto LEDs.

On my original interface I don't use 20 digital outputs each driving one opto LED, instead the opto LEDS are connected in a matrix in a similar fashion to 'Charlieplexing', such that specific parallel binary values output to the rows and columns of the opto LED matrix turn on only one chosen LED and turn all the others off. It works well but it is another reason why my original design would be very complicated for anyone else to build.

However, consider also a further, simpler development of Tony's idea, which is to use 2 * 4051 ICs wired back to back. These ICs are essentially digitally controllable 8-way rotary switches with a digitally controlled SPST 'enable' switch in series, so,

-Connect the switch 'common' terminals of the two ICs together

-Connect the 'enable' pins of the two ICs together.

-Connect the eight switched terminals of the first IC to the eight keypad column lines.

-Connect the first four switched terminals of the second IC to the four keypad row lines

-Connect three column select control lines from the uP to the 'select' pins of the first IC

-Connect three row select control lines from the uP to the 'select' pins of the second IC

-Connect one more line from the uP to the commoned 'enable' lines of the two ICs.

Now, to press a key-

-The uP outputs row and column select addresses to the two ICs.

-The uP momentarily enables both ICs. This has the effect of joining one row to one column momentarily.

This should work because the 4051s have the property of allowing signals to flow through their 'switch contacts' in either direction.

There's one drawback with this idea of using 2 * 4051 ICs - the resulting interface is not as well isolated as one using an opto matrix and would be potentially unsafe to disconnect from a running MK14. But if you don't mind leaving the interface connected then this is probably a much easier way to do it than by using optos.

Incidentally this (the idea of using two back to back 4051s as a micro-controllable matrix keypad 'presser') is not my original idea, it came out of a discussion over on the Arduino forums quite some time ago.
SiriusHardware is online now