Tuesday, 21 February 2017

My Z80 Computer Version 2

My Z80 Computer

V2



Continuing on from the last project. I have modified the circuit. Now ridding the system of the (E)EPROM and introducing a AVR microcontroller. Before going into detail, the AVR essentially halts the Z80 CPU and writes a bootloader into the first block of RAM, it then releases the control of the bus to the Z80 CPU and starts executing from $0000. The AVR microcontroller then becomes an I/O decoder, I2C bus and USB I/O.

The start of the schematic, showing the Z80, AVR and SRAM. Not yet complete


To start, the AVR will hold the Z80 in a tri-state bus and in Reset, during this time it will load a small 'bootloader' program into the first 512-bytes of RAM. Once this is done, The Z80 will be brought out of reset and the AVR will start generating Clock pulses on the Clock line though a timer on the AVR (which can be halted upon request). During this time now, the Z80 will essentially think it's the Bus Master, with 32k of RAM, a small bootloader program and a collection of I/O through Serial and I2C bus to start with, it will then begin "loading" via an I/O port and filling up the RAM with what ever O/S or programming the initial boot loader is designed to load.
The AVR can also serve as a non-volatile storage (via it's EEPROM) and serve as a permanent program space with a seperate area for the 'ROM' to be loaded into RAM.
Latest schematic. 

The Serial port can be used for communication with the computer, the I2C bus can be used for added permanent storage as well as adpating to a preprogrammed FPGA Gameduino device for video and sound output.