Electronics » the Z80 project » main pcb and operating system
 The V2 Z80 Project in its entirety. |
All that remains to do is a run down of the bits I haven't already
described, namely the Z80 board itself and the Operating System
I made..
Hardware - The Z80 board consists of:
One 8MHz CMOS Zilog Z80 CPU
One 8KB EPROM (120ns) mapped in at $0000-$1FFF
One 8KB SRAM (70ns), mapped in at $4000
One 128KB SRAM (70ns), mapped into $8000-$FFFF as four switched banks of 32KB.
A 74HC139 dual demultiplexor IC used in conjunction with a 74HC32 (quad OR)
chip to create read/write enable signals for ports 0-3. All but the signals
for Port 0 are routed off board via external connectors.
A 74HC245 buffer to handle input from Port 0 (Such as the project's individual
IRQ status lines, serial data/clock in, onboard button status..)
A 74HC574 latch to hold bit settings for Port 0. (Such lines as the 32KB bank
select (ie: 128KB SRAM address lines A15 and A16), onboard LED indicator, piezo buzzer,
serial comms data/clock out.
A 74HC14 (hex inverter) and a 74HC32 (quad OR) to merge the incoming
interrupt lines into the Z80's single IRQ source and also to handle some
of the memory select decoding.
There's two small push buttons; one to reset the Z80 (via a resistor/capacitor
time delay driving a Schmitt inverter gate) and the other to act as simple input
line (which I used for testing before the keyboard interface was developed).
Finally, for general testing there's an LED and PCB-mounted piezo buzzer which
are driven by the 574 latch IC via resistors.
Notes:
The Z80's NMI line is just pulled high via a resistor. In the future
I may connect this to an unused output on the keyboard controller PIC
in order to enable a freeze-button type feature.
The Z80's /BUSREQ line is also pulled high as my project doesn't
need any DMA to the system bus.
The Z80's clock signal is derived externally from the 64Mhz video clock.
 The Operating System in 'action' |
Software - The OS...
The Operating System - such that it is - evolved from a rudimentary serial boot loader.
Originally all it would do was grab program data bytes from my laptop's parallel port,
dump it in RAM and execute the code. As the project developed, it became
more desirable to be able to load and save properly, view the Z80's
registers and address space, jump to various locations etc.. With such
routines in ROM, the natural thing to do was make a command line
"front end" to execute them, enter data/parameters etc.
My OS was styled on the C64/Amiga memory monitor/freezer cartridges (such
as Trilogic's "The Expert" and Datel's "Action Replay") - simple text editors
crossed with command line interfaces. Over the course of development all
the usual commands were added ("Show memory as hex", "Fill memory", "Jump to
location", "Copy", "Search", etc). When the IDE interface and File System
code were completed, disk access commands were included too. The latest revision
looks on the external disk for commands not present in ROM (so its now a bit
like DOS on the PC too.) Should you wish to peruse the code (bear in mind it
was only ever meant for my Z80 hardware, not some grandiose Linux competitor:)
the newest version will be on the files page
(I realize I could perhaps have adapted an existing Z80 OS like CP/M for the Z80
Project but that wouldn't have been in keeping with the spirit of the venture..:)
Links:
Honourable mentions to the PC freeware utils I used during development:
Digital Works - Allows you to create and emulate logic circuits on the
PC (the freeware version is old and a bit buggy, it was written for
Windows 95 after all but it still works on XP etc)
Pasmo - Great Z80 assembler, superior to the ubiquitous TASM in
many ways, most notably for the inclusion of the "incbin" directive
meaning it can import raw binary files when assembling.
SX-KEY - Parallax's Ubicom SX28 development system
SX-SIM - Guenther Daubach's SX28 emulator
MPLAB - Microchip's PIC development system
ICprog - To program PIC / SX microcontrollers
|