I've thought of (what I think is) a clever simple way to connect a controller (such as for a supergun) to a base unit/console through a 4 wire interface. The theory starts with the standard use of parallel load shift registers like the SNES uses, but multiplexing the register's output with the clock signal to reduce the pins from 3 unidirectional to 1 uni, 1 bidirectional in order to have a powered interface on only 4 wires instead of 5 (there aren't any 5-wire household connectors). I plan to use this idea sometime with cheap/common RJ-14 punchdowns/patch cords to connect my controllers instead of expensive/rare/amateurish Neo DA-15 connectors, giant DB-25, DE-9s (hard to find plastic connectors and needs even more expensive logic for 12+ buttons) or some other silly interface like a ribbon cable.
The idea:
![[IMG]](https://web.archive.org/web/2im_/http://img402.imageshack.us/img402/4074/fooho3.gif)
When the console tristates the CLK line, the controller's data will take over the bus, with the resistor though the console can drive the line high again to clock the register. All it means logically is one more bit in your state machine.
The state machine:
0: load
1: pull CLK high
2: tristate
3: clock data in
4: pull CLK low, goto 1 unless all buttons are read, then goto 5
5: clock output latch to sync all buttons, goto 0
I put it together using 50 states to read in 12 buttons (U,D,L,R,1P,COIN,1-6), so with a common 48 kHz clock you can have 16x button oversampling and the controller end draws like 1mA at 3V.
The idea:
![[IMG]](https://web.archive.org/web/2im_/http://img402.imageshack.us/img402/4074/fooho3.gif)
When the console tristates the CLK line, the controller's data will take over the bus, with the resistor though the console can drive the line high again to clock the register. All it means logically is one more bit in your state machine.
The state machine:
0: load
1: pull CLK high
2: tristate
3: clock data in
4: pull CLK low, goto 1 unless all buttons are read, then goto 5
5: clock output latch to sync all buttons, goto 0
I put it together using 50 states to read in 12 buttons (U,D,L,R,1P,COIN,1-6), so with a common 48 kHz clock you can have 16x button oversampling and the controller end draws like 1mA at 3V.
If you mean a Supergun, I can't decide whether or not to go through with it, it's a big project if you want to make something pretty like a Sigma unit.![[IMG]](https://web.archive.org/web/2im_/http://img143.imageshack.us/img143/7227/snes001qc6.th.jpg)
![[IMG]](https://web.archive.org/web/2im_/http://img143.imageshack.us/images/thpix.gif)