This is an actual computer, built completely from scratch. I began the project in the spring of 2006, while I was taking a course on microcomputers. My Z80 system will remain a work in progress as long as I can think of new things to add to it.The current specs are:
- 2MHz 8 bit Zilog Z80 processor
- 56 KB static RAM (7 x 8k x 8)
- 8 KB EEPROM
- 1 Mb Flash Memory "hard drive"
- Interrupt controller with 8 interrupt levels
- 20 character x 2 line backlit LCD with contrast control
- RS232 serial port
- 2 programmable timers
- Programmable beeper
- 8X DIP switch and 8X LED's for general purpose I/O
- Strobe button for clocked input from the DIP switches
- Parallel port programming interface with parity
I am often asked "what does it do." The answer I always give is, "Whatever I program it to." I've written a good number of different programs for it, mainly to test the various features.
I do all the programming on my PC, using Z80 assembly. I wrote a simple drag and drop utility in C++ that uploads the assembled code into the microcomputer's EEPROM chip.
The Z80 system has two modes, which I call "program mode" and "run mode." In program mode, the system bus is disabled, the wait line on the CPU is activated (prevents the CPU from doing anything), and the onboard parallel port interface is given control over the EEPROM.
The parallel port interface works with 3 registers, 2 to store an address and one to store a data byte. In program mode, the outputs of these registers are connected to the EEPROM. To program a byte into the EEPROM, the programming utility transmits the address and data into these three registers over the parallel port. It then activates the EEPROM's write line, which loads the byte into memory at the desired address. The programming utility reads through the assembled code and writes each byte using this method, incrementing the address on each step.
The parallel port interface also has a parity chip which sends the parity of each byte back over the parallel port to my PC. By reading back the parity after each write cycle, I am able to detect single bit errors.
In run mode, the parallel port interface is disabled, the wait line is deactivated, and the system bus is enabled. When the reset button is pressed, the address 0 is loaded into Z80's program counter register. As the EEPROM is located at address 0, this causes the Z80 to execute whatever code I have stored in the EEPROM.