SC103, v1.0, User Guide

The Z80 PIO module (SC103) provides two 8-bit parallel ports with handshaking and flexible input and output connectivity, as well as support for Z80 mode 2 interrupt daisy chaining.

Each port has eight bidirectional data lines and two handshaking lines. The PIO has flexible interrupt generation and fully supports Z80 mode 2 interrupts.

For full details of the Z80 PIO see the Zilog data sheet.

Printed Circuit Board

The printed circuit board is a standard footprint RC2014 board.

SC103 v1.0 printed circuit board, top/component size

SC103 v1.0 printed circuit board, bottom/solder side


SC103 v1.0 schematic


Version 1.0 of the PCB has the RC2014 IEI (pin 38) and IEO (pin 39) incorrectly labelled. The labels are incorrectly shown next to pins 37 and 38, not 38 and 39.

Version 1.0 of the PCB has port A I/O lines incorrectly labelled on the back of the board. The labels on the front of the board are correct though.

Configuring the Module

The only jumpers on the PIO board are for interrupt daisy chain signals IEI and IEO. If your system has more than one device using interrupt mode 2, it will be necessary to set up an interrupt daisy chain.

This is fully described in the Z80 peripherals data sheet, but essentially it requires linking the output (IEO) of one interrupt generating device to the input (IEI) of the next, and so on. The position in the chain determines the device’s interrupt priority.

The illustration shows the connections required when using external Dupont wires on P4 (shown in red) and the RC2014 bus USER pins (shown in yellow). To connect the IEI and IEO signals to the RC2014 bus fit shunts to jumpers J1 and J2 (shown in green).

Configuration: Interrupt Daisy Chain

Note that v1.0 of the PCB has the IEI and IEO bus pins incorrectly labelled. It indicates the use of pins 37 and 38, not 38 and 39.

Setting up a mode 2 interrupt system is not trivial so requires study of the data sheets rather than following any simple example I could write here.

Address Selection

The module’s address can be set to any address that is a multiple of 4, such as address 0, 4, 8, 12, 16, … , 252. This address is known as the base address, with the module occupying this address plus the next three addresses. Thus if the base address is 0, then the module occupies the address range 0 to 3.

The address is set with the 6 way DIP switch SW1.

The six address switches, 1 to 6, represent addresses 128, 64, 32, 16, 8 and 4 respectively. The base address is the sum of all the switches in the Off position. For a piano style DIP switch, as illustrated below, Up is Off and Down is On.

In the illustration below the switches are:
Down Up Up Down Up   Down

This represents the address:
0 +  64 + 32 + 0 + 8 + 0
= 64 + 32 + 8
= 104 (or 0x68 in hexadecimal).

103 Address Selection Switch

In order to provide some certainty for software it is recommended you set the base address of your first PIO module to 0x68, so that the module occupies I/O addresses 0x68 to 0x6B. This is done by setting the switches as illustrated above.

If you have a second PIO module the recommended base address is 0x6C.

If everybody follows theses recommendations then software written for the PIO module will know where to find the PIO hardware.

The following table shows examples of address switch settings.



Recommended 1st PIO

Base address 0x68

Range 0x68 to 0x6B
(104 to 107 decimal)

Recommended 2nd PIO

Base address 0x6C

Range 0x6C to 0x6F
(108 to 111 decimal)

Base address 0x00

Range 0x00 to 0x03
(0 to 3 decimal)

Base address 0x04

Range 0x04 to 0x07
(4 to 7 decimal)

Base address 0x08

Range 0x08 to 0x0B
(8 to 11 decimal)

Base address 0x40

Range 0x40 to 0x43
(64 to 67 decimal)

Base address 0x44

Range 0x44 to 0x47
(68 to 71 decimal)

Base address 0x48

Range 0x48 to 0x4B
(72 to 75 decimal)

Base address 0x4C

Range 0x4C to 0x4F
(76 to 79 decimal)

Base address 0x50

Range 0x50 to 0x53
(80 to 83 decimal)

Base address 0xF0

Range 0xF0 to 0xF3
(240 to 243 decimal)

Base address 0xF4

Range 0xF4 to 0xF7
(244 to 247 decimal)

Base address 0xF8

Range 0xF8 to 0xFB
(248 to 251 decimal)

Base address 0xFC

Range 0xFC to 0xFF
(252 to 255 decimal)


Thanks to all those who provided encouragement, feedback and contributed ideas to the design. Specifically: Mark T, Jon L, Jay C, and anyone else I forgot!

See RC2014 google group for full details:!topic/rc2014-z80/JJ2JKAIehck

Homebrew 8-bit retro computing