Pin connections of the ATmega128 MCU:

() = own extensions
[] = function on the PCB, but not used/not soldered

RW: Input and output
RO: input
WO: output
??: undefined/ default RO/ not connected

PortA: RW external RAM data wires
PortB:
    0: WO {Required for SPI master mode} [SPI SS]
    1: WO SPI SCK
    2: WO SPI MOSI
    3: RO SPI MISO
    4: ?? (unused)
    5: WO [MMC Card LED] (MP3 Decoder DCS wire)
    6: RO [MMC Card write protect] (MP3 Decoder DREQ wire)
    7: RO MMC Card insert
PortC: WO external RAM address wires
PortD: WO (Display data wires)
PortE:
    0: RO RS232 RXD
    1: WO RS232 TXD
    2: WO (Display E wire)
    3: WO (Display backlight brightness)
    4: RO RTL interrupt input 4
    5: WO [CAN interrupt input 5] (Display RS wire)
    6: WO [USB interrupt input 6] (Display CS1 wire)
    7: WO [USB interrupt input 7] (Display CS2 wire)
PortF: Analogue Inputs
    0: RO (Rotationencoder C, Push button)
    1: RO (Rotationencoder B)
    2: RO (Rotationencoder A)
    3: ?? (unused)
    4: ?? (unused)
    5: ?? (unused)
    6: ?? (unused)
    7: RO (IR receiver TSOP1738)
PortG:
    0: WO external RAM WR wire
    1: WO external RAM RD wire
    2: WO external RAM ALE wire
    3: ?? Crystal 32KHz
    4: ?? Crystal 32KHz
