SC126, v1.0, User Guide

SC126 is a Z180 based motherboard. It can be used on its own as a Single Board Computer or it can be expanded using the built in module sockets. The Expansion sockets allow use of many modules designed for RC2014 and can be further expanded with a modular backplane, such as SC113.

SC126 normally has the Small Computer Monitor (SCM) in one Flash chip and RomWBW in the other.

Documentation for the Small Computer Monitor can be found here.

Documentation for RomWBW can be found here.

A short guide to getting started with RomWBW on SC126 can be found here.

SC126 Printed Circuit Board Layout

Quick Guide to Jumpers

As a quick guide to getting started: Fit jumper shunts in the positions shown below and supply 5 volts to J1 or J2.

Quick guide to recommended jumper shunt positions

And for those who are sensible enough to read User Guides…

Power

The power required for this board is 5 V D.C. at 100 mA without SD cards or other accessories. With accessories and expansion boards fitted the current requirement could easily rise to 300 mA.

The motherboard can be powered in a number of ways. The illustration below shows three places where 5 volts can be connected. When powered from any of these places the board can be turned on and off with the ON/OFF switch.

Power Input (5 Volt D.C.)

The board can also be powered from the serial ports, or even the SPI and I2C ports. Powering from any of these sources does not allow the board to be turn on and off with the ON/OFF switch.

The motherboard is typically connected to a computer or terminal with an FTDI style serial adapter. This can, optionally, also provide power for the motherboard. However, some USB sockets and some FTDI style adapters will not provide adequate power if accessories and expansion cards are connected.

Each serial port, highlighted below in red, can supply power to the system. To connect power from a serial port, fit a jumper shunt in the appropriate location, indicated below in yellow. The left jumper is for port A and the right jumper is for port B.

Serial Ports and Power Jumpers

WARNING: You should normally only connect one power source to the system, at any time.

As power can flow either way, these jumpers also enable serial devices to be powered from the motherboard. If such devices are used, fit a jumper shunt in the appropriate position, indicated above in yellow.

Firmware Selection

The motherboard has two Flash ROM sockets, allowing two different firmware options to be installed at the same time.

The required firmware is selected with JP3 or P9.

Flash ROM Chip Selection

If a jumper shunt or a closed external switch is fitted to P9, then socket U1 is selected. If there is no jumer shunt present or an external switch is open, the socket U2 is selected.

JP3 provides an alternative connection point for a jumper shunt or switch. In addition, it allows a jumper shunt to be fitted in the upper position to allow software control of the socket selection. Socket selection by software is not currently supported.

An external switch connected to P9 carries only a simple D.C. level, so cable length should not normally be a problem.

Write Protect Flash

Jumpers, JP1 and JP2, shown below in yellow, enable each Flash chip to be independently write protected. It is unlikely the Flash chip will be corrupted in normal operation, due to the software requirements to write to it. However, for peace of mind you can disable writing with jumper shunts.

Flash Write Protect

Each Flash chip has its own write protection jumper. Fit the shunt in the position shown below in green to disable writing. Alternatively, fit the shunt in the position shown below in red to enable writing.

Write Enable/Disable Jumpers

Serial Ports

The motherboard has two asynchronous serial ports, with software selectable baud rate. These are 5 volt FTDI style ports.

Serial Ports

The pin-out, below, describes signals with respect to the motherboard, so an output is a signal from the motherboard to a computer or terminal.

PinFunction
1Ground (GND)
2Request To Send (RTS) output
3Vcc (5V)
4Recieve Data (RxD) input
5Transmit Data (TxD) output
6Clear To Send (CTS) input (not connected)

The ground terminal is marked with a small down arrow to help with cable orientation.

A typical FTDI style serial adapter is illustrated to the right.

This may be fitted directly to the motherboard or by a 6-way cable.

The default serial ports settings are as follows:

SettingSCMRomWBW
Baud rate115200115200 (v3.0)
38400 (pre-v3.0)
Data bits88
Paritynonenone
Stop bits11
Flow controlHardware
(recommended)
Hardware
(recommended)

The default serial port is P5, Serial Port A.

SPI Ports

The motherboard has two SPI ports, primarily for connection to SD card adapters.

SPI Ports

The signals are 5 volt levels, with the following pin-out.

PinFunction
1Chip select (active low)
2Clock
3Master out, slave in
4Master in, slave out
5Vcc (5V)
6Ground (GND)

The ground terminal is marked with a small down arrow to help with cable orientation.

A typical micro SD card adapter is illustrated to the right.

This may be fitted directly to the motherboard or by a 6-way cable.

Using the micro SD card adapter illustrated above, only one SPI device may be connected to the motherboard. This is because the adapter does not have a tri-state data output.

The default SD card position is P2, SPI SD Card 1.

I2C Port

The motherboard has a bit-bang I2C bus port. This is a very nice interface for connecting a whole range of slow to modest speed devices, such as digital I/O ports.

This port can only act as an I2C bus master and does not support other bus masters being connected to it.

I2C Port

The signals are 5 volt levels, with the following pin-out.

PinFunction
1Ground (GND)
2Vcc (5v)
3Clock (SCL)
4Data (SDA)
5Vcc (5V)
6Ground (GND)

The I2C signals, SCL and SDA, can be connected to the expansion bus, pins 78 and 79, via two jumpers, JP5 (shown below in yellow).

I2C Jumpers

Expansion Bus Sockets

This is an unofficial variant of the RC2014 Bus. It is essentially an RC2014 Bus with extra pins.

Row 2
Pin #s
Signal NameRow 1
Pin #
Signal Name
41Not yet assigned1A15
42Not yet assigned2A14
43Not yet assigned3A13
44Not yet assigned4A12
45Not yet assigned5A11
46Not yet assigned6A10
47Not yet assigned7A9
48Not yet assigned8A8
49A23 (not used) 9A7
50A22 (not used) 10A6
51A21 (not used) 11A5
52A20 (not used) 12A4
53A1913A3
54A1814A2
55A1715A1
56A1616A0
57GND17GND
585V185V
59/RFSH19/M1
60PAGE (not used)20/RESET
61CLK2 (not used)21CLK
62/BUSAK22/INT
63/HALT23/MREQ
64/BUSRQ24/WR
65/WAIT25/RD
66/NMI26/IORQ
67D8 (not used)27D0
68D9 (not used) 28D1
69D10 (not used) 29D2
70D11 (not used) 30D3
71D12 (not used) 31D4
72D13 (not used) 32D5
73D14 (not used) 33D6
74D15 (not used) 34D7
75TX235TX
76RX236RX
77USER5 (not used)37USER1 (not used)
78USER6 (I2C SCL)38USER2 (not used)
79USER7 (I2C SDA)39USER3 (not used)
80USER8 (IEI)40USER4 (IEO)

The I2C signals, SCL and SDA, can be connected to USER6 (pin 78) and USER7 (pin 79) by fitting jumper shunts to JP5.

Bus pins USER8 and USER4 are used as a Z80 mode 2 interrupt daisy chain, so are not wired straight through link the other signals. Instead USER4 of one socket is connected to USER8 of the next, forming a daisy chain.

DCD0 and DREQ1 Inputs

Header JP4 provides access to the DCD0 input and the DREQ1 input.

With some Z180 processors the DCD0 input must be pulled low (fit jumper shunt) to enable the serial port to receive data. With other Z180 processors this input can be read by suitable software.

Fit a shunt in the DCD0 position to pull the DCD0 input low.

DCD0 and DREQ1 Jumpers

This header should normally have a jumper shunt fitted in the DCD0 position.

Memory Map

The physical memory map is simply 512k byte of Flash ROM at the bottom of memory and 512k bytes of RAM at the top of memory.

The Z180’s memory management unit deals with mapping chunks of this memory into the logical 64k memory map supported by the Z80/Z180 instruction set.

AddressFunction
0x80000 to 0xFFFFFRAM (512k bytes)
0x00000 to 0x7FFFF Flash ROM (512k bytes)

Input / Output Ports

The motherboard’s I/O port addresses are as follows.

AddressFunction
0xC0 to 0xFFZ180’s internal I/O registers
0x0DLED output port
0x0CSystem I/O port (RTC, SPI and I2C)

All other I/O addresses are available for use by expansion modules.

The LED port has 8 LEDs which are free for use. These can be written to with simple input and output statements or instructions.

  • From BASIC:
    • OUT 13, <byte-to-be-output>
  • From the Small Computer Monitor
    • O D <byte-to-to-output>
  • From assembler:
    • LD A, <byte-to-be-output>
    • OUT ($D), A

The system I/O port can be accessed but care must be taken as the port is shared by several system devices.

Warning: The I2C SDA signal is bi-directional. It has a pull up resistor and can be pulled low by the open collector output on port 0x0C, bit 7. To use I2C SDA as an input the port 0x0C bit 7 output must be set high.

Port 0x0COutput function
Bit 0I2C SCL
Connector P1 pin 3
Idle state = high
Bit 1Optional flash bank select
Not normally used for bank select
Connector JP3 pin 1
Idle state = not critical
Bit 2SPI/SD port 1 chip select
Connector P2 pin 1
Idle state = high
Bit 3SPI/SD port 2 chip select
Connector P3 pin 1
Idle state = high
Bit 4Real time clock chip select
Not accessible
Idle state = high
Bit 5Real time clock write enable
Not accessible
Idle state = not critical
Bit 6Real time clock serial clock
Not accessible
Idle state = not critical
Bit 7Real time clock serial data, and
I2C SDA serial data output
Connector P1 pin 4
Idle state = high
Port 0x0CInput function
Bit 0Real time clock serial data
Not accessible
Idle state = not specified
Bit 1Not used
Bit 2Not used
Bit 3Not used
Bit 4Not used
Bit 5Not used
Bit 6Not used
Bit 7I2C SDA serial data input
Connector P1 pin 4

To write to the system I/O port use the following.

  • From BASIC:
    • OUT 12, <byte-to-be-output>
  • From the Small Computer Monitor
    • O C <byte-to-to-output>
  • From assembler:
    • LD A, <byte-to-be-output>
    • OUT ($C), A

To read from the system I/O port use the following.

  • From BASIC:
    • X = INP(12)
  • From the Small Computer Monitor
    • I C <byte-to-to-output>
  • From assembler:
    • IN A,($C)

Warning: The I2C SDA signal is bi-directional. It has a pull up resistor and can be pulled low by the open collector output on port 0x0C, bit 7. To use I2C SDA as an input the port 0x0C bit 7 output must be set high.

Homebrew 8-bit retro computing