15

I've been studying the PCB from an ELSI 8002 calculator from 1974. I'm thinking of repurposing the case for a project, though now that I've fixed it (by re soldering the battery connectors) I don't know if I can bear to pull it apart. (sniff) Maybe, I'll buy a more deeply broken one for my project...

enter image description here

Sentimentality aside, I'm rather confused by the layout of the keypad. The keypad initially looked like a typical matrix keypad, but after carefully studying the traces I've found that it isn't using rows or columns.

enter image description here

At first I thought this might be because they were trying to save pins on the micro controller. A matrix layout with n row and m columns requires n+m pins. But, really, we only need a unique pair of pins for each button. So, really we only need x pins where n*m <= x Choose 2.

enter image description here

A 4x5 matrix has 20 buttons and 20 <= 7 Choose 2 = 21. (really only 18 buttons are needed since the reset button "C" is mapped in a special way and shares no pins with the other buttons, and there is an unused pad, though maybe it's used in other models?)

This is my attempt to match each key to two pins. For example the number 9 is connected to pins A and D.

I thought this was what was going on since rows and columns don't have a common pin... but the layout uses 9 pins... ? With 9 pins why not just make it a matrix?

I don't know what's going on, but it's still a lovely device...

futurebird
  • 652
  • 6
  • 14
  • 3
    Reducing the pin count is not the only criterion in electronics design. I doubt the engineers who designed this circuit will be here to answer you. – Dmitry Grigoryev Apr 29 '16 at 09:43
  • Well asked, however we would need to be psychic to know the reasoning they had. Or use necromancy. That aside, maybe arranging as a matrix would have needed another layer. – PlasmaHH Apr 29 '16 at 09:44
  • There isn't anything else going on on that part of the board-- a matrix in two layers seems like the easy solution. Perhaps it's just some random reason. Though, I was hoping there was some logic here that I was missing. Maybe it makes the traces shorter? This is starting to remind me of the traveling salesman problem. – futurebird Apr 29 '16 at 09:53
  • 1
    I expect that at least part of it would be that a matrix would need more vias. The cost of via hardly matters these days, but they weren't always so cheap. – JRE Apr 29 '16 at 10:01
  • Are those traces gold plated? – JRE Apr 29 '16 at 10:02
  • I don't know. Is there a fast way to check if it is gold that won't harm the board? I'd scratch on ceramic it but it's not practical. – futurebird Apr 29 '16 at 10:14
  • 3
    Ah, hand made layout using tape. No fancy PCB design software back then and yes it will be gold plated. – JIm Dearden Apr 29 '16 at 10:36
  • 2
    It's not about the number of pins but more about decoding the keys in software. E.g. You just have to monitor pins E and I - if any of those two gets a signal, then an operation key was pressed. Else if ABC gets a signal, a number was pressed. Remember, that is an awfully slow and tiny CPU by todays standards. Saving one single "if" or read of an input key is an issue. I would make this an answer, but can't as the question is on hold. – asdfex Apr 29 '16 at 16:05
  • The keyboard scan is typically shared with the display multiplexing- that influences the optimal scheme. – Spehro Pefhany Apr 29 '16 at 16:43
  • asfdx has the right idea, I think. What you really need to do is get a data sheet for the calculator chip, and find out what it expects. Early calculators were quite specialized in terms of I/O and internal software organization. The were not GP microcomputers which were repurposed for calculator use, and if the chip designer didn't design for matrix operation, well.... – WhatRoughBeast Apr 29 '16 at 17:28
  • 2
    Concerning the table futurebird compiled: If you put the entries of the C and E columns to the other side of the diagonal, you see what is going on: All odd numbers on A, all even numbers on C. All simple operations on E and the more special ones on I. Can't show it in the comments, but reorder the columns as HFGBD and the rows as ACEI and you get a very neat 4x5 matrix that is way easier to decode than a matrix ordered by position of the key. – asdfex Apr 29 '16 at 20:38
  • 1
    asdfex: Thank you! that makes total sense. You really ought to write that up as an answer. – futurebird Apr 29 '16 at 21:02
  • @asdfex The question is no longer on old, feel free to write a detailed answer. – pipe Apr 30 '16 at 17:32

1 Answers1

23

It is not only the number of pins used to read a keypad matrix that matters. One thing to consider is the number of crossings of traces, i.e. the number of vias needed. Each one needs a hole to be drilled and this process was not as much automatic in the seventies as it is today. But, this is not the major point here:

A 4x5 matrix following the geometrical layout of keys is complex to decode in the processor. While this is a trivial thing to do in todays CPUs, pocket calculator always had and still have very simple processor architectures. At that time, mainly because of the price. Remember, the computer processor of 1971 was the Intel 4004, 4 Bit and 100k instructions per second and it can be assumed that the chip of this calculator (I was not able to find a datasheet) is less powerful.

The table @futurebird created while inspecting the circuit looks like there is a total mess of connections. Actually, this is not true as we see by simply rearranging columns and rows:

   H F G B D
A  1 3 5 7 9
C  2 4 6 8 0
E  .     % C
I  * / + - =

Here we can clearly see the intention of the developers: All the even numbers share pin C, all odd ones share pin A. This makes decoding a key press to form a number in memory as simple as possible: On the silicon there needs to be just a "5 inputs to 3 bit encoder" to get bits 3..1 of the resulting digit in binary representation while the lowest bit is set or cleared depending on whether line A or C was active. In the same manner, all operations can be detected by checking line I and the more special ones on input E.

Compare that to decoding a digit from the basic 4x5 matrix: Here there are 7 inputs to be checked to retrieve 4 bits of the resulting number. It is obvious that this look-up-table consumes more space on the silicon fabric.

Using this matrix connections, the expensive features on silicon are kept at a minimum, while putting a little thought in carefully planning the structure of the matrix and a little effort in designing a PCB matching the intended connections which doesn't add a lot to the overall costs of the device.

asdfex
  • 2,669
  • 1
  • 13
  • 17
  • 1
    If I recall correctly, old calculators used a bit-serial architecture, which is much simpler, slower, lower power, and less silicon than something fancy like a 4004. In bit-serial, math operations require one clock cycle per bit of data. For an example of a bit-serial operation see https://en.wikipedia.org/wiki/Serial_binary_adder . – Tom Anderson Jan 08 '17 at 20:05
  • I just wanted to say this was an amazing answer. Thank you! – futurebird Jan 10 '17 at 04:46