GamePad/Expansion port

From WiiUBrew
Jump to navigation Jump to search
This article is incomplete. Please help to improve it, or discuss the issue on the talk page.

Pinout

Labelled pinout of Gamepad Expansion Port

This port is completely digital, and all pins are either at 0 Volts (GND) or 2.8 Volts (Vcc or Vddio).

While Vcc and Vddio are both at 2.8 Volts, they are incompatible, and shorting the two will result in many protection mechanisms triggering. This behavior is described in more detail in the input protection section.

Pin (LTR) Purpose Notes
0 GND Left charging cradle pad is also GND. Very useful test point.
1 SDA Pulled to Vddio if enabled. Strictly open-drain.
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 SDA and SCL.
4 Vcc Isolated and regulated power at 2.8 Volts. Peak current is 300mA, stable at 200mA.

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

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. 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.

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.

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 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.