Reload pedal for PlayStation and PlayStation 2 - Ben Ryves 2017-2018
--------------------------------------------------------------------


Pin connections
---------------

The circuit for this reload pedal is very simple - to the point where a
schematic was more complicated than simply listing the pin connections!

I recommend buying a cheap PlayStation controller extension cable and
cutting it in half to get the controller plug. When looking at the plug
(visible pins) the pins are numbered from 1 on the left to 9 on the right.

Some cables or controllers have pin 8 (GUN) missing which can be used to
confirm you have the pin numbers the right way around. Alternatively, use
a multimeter to check the voltages between pins 4, 5 and 3.

.-------------------------------.
| PlayStation   | ATtiny2313    |
|-------------------------------|
| 1 DATA Brown  | 18 MISO (PB6) |
| 2 CMD  Orange | 17 MOSI (PB5) |
| 3 +8V  Grey   | N/C           |
|-------------------------------|
| 4 GND  Black  | 10 GND        |
| 5 VCC  Red    | 20 VCC        |
| 6 ATT  Yellow | 16 PB4        |
|-------------------------------|
| 7 CLK  Blue   | 19 UCSK (PB7) |
| 8 GUN  N/C    | N/C           |
| 9 ACK  Green  | 15 PB3        |
'-------------------------------'

I cannot guarantee that the wire colours are the same in all cables - the
colours in the above table were found in my extension cables, but I'd
recommend double checking before soldering anything.

You will also need to connect the pedal switch between ground and the AVR
pin 9 (PD5). A 10K resistor should be connected between AVR pins 1 (/RESET)
and 20 (VCC) and a 100nF ceramic capacitor should be connected between pins
10 (GND) and 20 (VCC).

An optional LED can be installed between pin 8 (PD4) and pin 10 (GND) with
an appropriate current-limiting resistor in series. This lights up when the
pedal is pressed and is not required for proper operation of the circuit.