Z80 Assembly 63: Interfacing with the Z80 SIO (Serial I/O)

The Role of the Z80 SIO The Z80 SIO (Serial Input/Output) chip is a sophisticated peripheral that acts as a dual-channel UART (Universal Asynchronous Receiver/Transmitter). It handles all the complex timing, start/stop bit generation, and error checking for serial communication entirely in hardware. Advantage: The SIO makes robust serial communication (like RS-232, modem, or network) fast and reliable, saving the Z80 CPU thousands of cycles compared to software bit-banging (Part 40). ...

September 27, 2025

Z80 Assembly 41: Interrupt-Driven Serial Input (The Receiver)

The Challenge of Reliable Input In receiving serial data, the Z80 must wait for the exact moment the Start Bit arrives and then sample the input line precisely at the center of each of the next eight data bits. If the CPU misses the timing, the data is corrupted. The Solution: Interrupt-Driven Sampling The CPU cannot wait in a tight timing loop for data to arrive. Instead, we use a timer interrupt to tell the CPU exactly when to check the input line. ...

September 27, 2025

Z80 Assembly 40: Software Serial I/O (Bit-Banging Communication)

The Need for Bit-Banging The Z80 CPU does not have a built-in UART (Universal Asynchronous Receiver/Transmitter) for serial communication. To send data to a modem or another computer, we must bit-bang the signal: we use software and timing loops to manually control the state of an I/O pin. Key Components: I/O Port: A dedicated hardware output port (often the same as the beeper port) where one bit is wired to the serial output pin. Timing Loops: Precise timing loops (using T-states) to control the Baud Rate (bits per second). The Serial Data Format Serial communication sends one byte at a time, surrounded by fixed timing signals: ...

September 27, 2025