Geac 8340
Posted: 20 Dec 2020, 21:49
A library's worth of Geac 8000 series Public Enquiry Terminal (PET) keyboards showed up on eBay recently for a reasonable price.
The switches are Hi-Tek grid, with the expected fraction of broken corners. The PCB has some 74-series TTL, but no computing elements. Instead, the terminal needs to scan the matrix somewhat directly. In another post there was some interest in the details of how this works, so here goes.
Two input signals control the serial-to-parallel shift register U3 (74LS164).
The last bit into the SR (QA) selects one of two demultiplexers U1 and U2 (74LS156), roughly the left and ride sides of the keyboard.
The previous three bits (QB, QC, QD) are the select lines for both demuxes.
These four bits drive exactly one column in the matrix low and the rest high.
The first bit (QH) into the SR is not connected, but must be accounted for in serial loading.
The next three bits (QE, QF, QG) are the select lines for the multiplexer U4 (74LS251). They read one row of the matrix.
The output signal is the inverting output of the mux (W). It is high if the switch is closed at the selected position. The clock line also drives the mux's gate, so the output is hi-Z when not active. A pull-up resistor is therefore inappropriate; a pull-down resistor could be added, but isn't really necessary, provided the keyboard is always plugged in.
The choice of key codes and the row and column designations are arbitrary, provided that all 128 patterns are checked. The scheme here gives codes that (roughly) correspond to the physical layout of keys.
The remaining output gives the state of the jumper J2, which has a pull-up. Maybe this selected a French layout or something?
Any four GPIOs can be used. A quick QMK prototype uses the first Arduino ones. I chose an A-Star Micro here because the power pins are less in the way of the USB connector for this bare-bones converter. A Teensy or even Pro Micro would work fine.
With this scanning arrangement, every clock pulse reads the state of some key. I enumerated the key codes in the most straightforward way. This old TTL can still handle a clock faster than an ATMega32U4's 16MHz, so there's no performance issue. But it's presumably possible to devise a more clever CS undergrad quiz kind of de Bruijn sequence algorithm that accounts for the intermediate states and the fact that the eighth bit shifted out doesn't matter to visit all 128 keys in fewer than 1024 clock cycles.
I suspect that they are all the same model, but the one I snagged is 8340-01.
The keys are strikingly orange, so this must have been near a sunny window for decades. The red SEND key still manages to stand out.The switches are Hi-Tek grid, with the expected fraction of broken corners. The PCB has some 74-series TTL, but no computing elements. Instead, the terminal needs to scan the matrix somewhat directly. In another post there was some interest in the details of how this works, so here goes.
Two input signals control the serial-to-parallel shift register U3 (74LS164).
The last bit into the SR (QA) selects one of two demultiplexers U1 and U2 (74LS156), roughly the left and ride sides of the keyboard.
The previous three bits (QB, QC, QD) are the select lines for both demuxes.
These four bits drive exactly one column in the matrix low and the rest high.
The first bit (QH) into the SR is not connected, but must be accounted for in serial loading.
The next three bits (QE, QF, QG) are the select lines for the multiplexer U4 (74LS251). They read one row of the matrix.
The output signal is the inverting output of the mux (W). It is high if the switch is closed at the selected position. The clock line also drives the mux's gate, so the output is hi-Z when not active. A pull-up resistor is therefore inappropriate; a pull-down resistor could be added, but isn't really necessary, provided the keyboard is always plugged in.
The choice of key codes and the row and column designations are arbitrary, provided that all 128 patterns are checked. The scheme here gives codes that (roughly) correspond to the physical layout of keys.
The remaining output gives the state of the jumper J2, which has a pull-up. Maybe this selected a French layout or something?
Any four GPIOs can be used. A quick QMK prototype uses the first Arduino ones. I chose an A-Star Micro here because the power pins are less in the way of the USB connector for this bare-bones converter. A Teensy or even Pro Micro would work fine.
With this scanning arrangement, every clock pulse reads the state of some key. I enumerated the key codes in the most straightforward way. This old TTL can still handle a clock faster than an ATMega32U4's 16MHz, so there's no performance issue. But it's presumably possible to devise a more clever CS undergrad quiz kind of de Bruijn sequence algorithm that accounts for the intermediate states and the fact that the eighth bit shifted out doesn't matter to visit all 128 keys in fewer than 1024 clock cycles.