Changes

Identified all the pin functions and the PHY
Line 14: Line 14:  
| 0        || GND    || Left charging cradle pad is also GND. Very useful test point.
 
| 0        || GND    || Left charging cradle pad is also GND. Very useful test point.
 
|-
 
|-
| 1        || P1      || Unknown open-drain communication port pulled to Vddio if enabled.
+
| 1        || SDA    || Pulled to Vddio if enabled. Strictly open-drain.
 
|-
 
|-
| 2        || P2      || Unknown open-drain communication port pulled to Vddio if enabled.
+
| 2        || SCL    || Pulled to Vddio if enabled. Strictly open-drain.
 
|-
 
|-
| 3        || Psense  || Expansion port device presence detect input. Normally directly shorted to Vcc to enable P1 and P2.
+
| 3        || Psense  || Expansion port device presence detect input. Normally directly shorted to Vcc to enable SDA and SCL.
 
|-
 
|-
 
| 4        || Vcc    || Isolated and regulated power at 2.8 Volts. Peak current is 300mA, stable at 200mA.
 
| 4        || Vcc    || Isolated and regulated power at 2.8 Volts. Peak current is 300mA, stable at 200mA.
 
|}
 
|}
   −
None of the pins read a frequency..
+
The busmaster clocks I2C at a whopping 1MHz, so the microcontroller must be chosen carefully to be able to handle such bus speed.
    
=== Input protection ===
 
=== Input protection ===
 
Nintendo has quite overengineered the expansion port, to protect against electrical damage to the main board.
 
Nintendo has quite overengineered the expansion port, to protect against electrical damage to the main board.
 
Expansion port Vcc is generated separately, and appears to be completely isolated from the rest of the system.
 
Expansion port Vcc is generated separately, and appears to be completely isolated from the rest of the system.
P1 and P2 are directly connected to a TSSOP8 package isolation chip, and appears to be fully custom. It's designed to kill the chip instead of the rest of the system in the event of electrical failure.
+
SDA and SCL are directly connected to a TSSOP8 package isolation chip, and appears to be fully custom. It's designed to kill the chip instead of the rest of the system in the event of electrical failure.
 
Psense is connected to the same isolation chip via an 1kOhm resistor.
 
Psense is connected to the same isolation chip via an 1kOhm resistor.
    
It's really important to only drive or connect the pins in a way they are designed to. Failure to follow the instructions will result in many protection mechanisms triggering, turning the GamePad off, or even potentially damaging some components either on the GamePad board, or the microcontroller used to poke the expansion port.
 
It's really important to only drive or connect the pins in a way they are designed to. Failure to follow the instructions will result in many protection mechanisms triggering, turning the GamePad off, or even potentially damaging some components either on the GamePad board, or the microcontroller used to poke the expansion port.
   −
P1 and P2 are strictly open-drain. Trying to connect them to anything other than GND will result in protection mechanism kicking in.
+
SDA and SCL are strictly open-drain. Trying to connect them to anything other than GND will result in protection mechanism kicking in.
To drive P1 and P2, set the microcontroller's output level low first, and then set pin mode to output, and that will drive them to logic level 0. To drive them logic level 1, just set pin mode to input. Trying to set the microcontroller pin's output level to high will result in the GamePad's protection mechanism triggering an emergency shutdown, and could even potentially damage the microcontroller itself.
+
To drive SDA and SCL to logic level 0, set the microcontroller's output level low first, and then set pin mode to output. To drive them logic level 1, just set pin mode to input and/or floating (High-Z) with internal pull disavbled. Trying to set the microcontroller pin's output level to high will result in the GamePad's protection mechanism triggering an emergency shutdown, and could even potentially damage the microcontroller itself.
    
It's highly advised to directly short Psense to Vcc, without any circuitry impeding the path of the trace.
 
It's highly advised to directly short Psense to Vcc, without any circuitry impeding the path of the trace.
2

edits