User Tools

Site Tools


project:gba

Game Boy Advance

Originally this page was written as part of my project's scrap-book, however it has come to my attention that other sites are linking to this page for info on how to use the GBA serial port, if you are looking for this information, please consult 'CommsProbe' and 'RS232 Terminal' in the Code section.

CommsProbe allows the serial port of the GBA to be misused as a general purpose I/O port (allowing each of the 4 data pins to be induvidually set as input or output).

RS232 Terminal uses the GBA serial port for rs232 serial data, suitable for connection to the serial port of a PC via suitable level conversion logica PC serial port runs a +/-12V and direct connection to the GBA serial port will probably have regrettable results. That said, it is likely that the PC will be happy with the 0/+3.3V logic that the GBA uses. You can use HyperTerminal to send and recieve ASCII data on the serial port, but be warned that if you have ScrollLock on HyperTerminal will pause, and you will believe your system to be broken. I found out the hard way.

To make things easier for you I have extracted pre-compiled versions of the above, with their instructions, from my project report disc (which can be found on the Final Year Project page). Please note that RS232 Terminal is called UARTTest in this download.

Download GBA_Comms.zip (85.3KB)

Code

See Code.

Note that complete code is available on the project report disc (see Final Year Project), ready for compiling. The above links to only the “interesting” parts of the code.

Communications Port

Cutting up an offical GBA link cable (as the unofficial one didn't have all the pins necessary for serial / general-purpose IO connected to wires) so I can measure the voltages of the GBA and connect it to a circuit board.

Physical interface

gba-link-socket.jpg Pin out of the GBA connector plug (cable receeding into page) and socket.

Colour Pin# Pin Name UART Role Voltage (logic 1)
1 VCC
Red 2 SO SerialOut Tx 3.31V
Orange 3 SI SerialIn Rx 3.31V
Brown 4 SD SerialData RTS 3.31V
Green 5 SC SerialClock CTS1) 3.31V
Blue 6 GND

Observations:

  • Voltages are consistent to +/- 0.05V on both a GBA and a GBA:SP. It seems there are slight differences between the voltages on each pin. Actually it seems this is not so, perhaps the wires had different resistances on the unoffical cable?
  • Apparently when you use a GB/GBC2) the voltages are 0/5V
  • When the pins are set as input, but not connected to anything they float high, and the bits in the register are set to 1 accordingly.
1)
On GBA power-up this is an output, so a 1K Ohm resistor ought to be inserted between this and any voltage convertor logic to prevent to output from shorting each other out. See DevRS.com
2)
Game Boy / Game Boy Colour: The predecessor to the Game Boy Advance, which is backwards compatable with these formats
project/gba.txt · Last modified: 2007/04/27 01:21 (external edit)