Example: Z80 SIO Test

This example is a simple test program to check a Z80 SIO is working, at least in a basic way.

The setup shown below is a SC114 motherboard with two Z80 SIO cards installed. The card at the back (SC104 SIO/2) is providing a console for the Small Computer Monitor firmware. The card at the front (SC132 SIO/0) is being tested. SC104 is set to the default serial port address of 0x80, while the SC132 is set to address 0x84.

The serial port being tested must have loop-back connections:

  • SIO module’s RTS linked to CTS
  • SIO module’s TxD linked to RxD

The SIO is assumed to have the register order matching the official RC2014 SIO module: Control A, Data A, Control B, Data B

With loop-back connections on port A, but not on port B, the output should look like this:

*g8000
Z80 SIO test v1.0 by Stephen C Cousins
Loop-back connections required:
SIO module's RTS linked to CTS
SIO module's TxD linked to RxD
Port A txd/rxd test: Pass
Port B txd/rxd test: Fail
Port A rts/cts test: Pass
Port B rts/cts test: Fail
Test complete

Source code and executable code can be found here.

The program is in the form of a hex file which must be “sent” to the Small Computer Monitor. It can be “sent” by selecting “Send file” (or similar) in the terminal software or by Pasting the file into the terminal software. SCM should accept the file and report “Ready”. The program is run with the command “G 8000”.


Homebrew 8-bit retro computing