
Introduction
Chipset
Keyboard
Character Set
Switch Board
More photographs
Circuit Diagrams
The successor to the Great Z80 Computer project. The new Z80 computer is much simplified in comparison
to the original, but in many cases borrows ideas and circuits from it. When it is working I will be able to extend it as time permits.
Specifications:
o Processor: Z80B (4MHz 8-bit)
o Memory: 128 KBytes RAM + 32 KBytes Display RAM
o Graphics mode 1: 256 x 256 pixels, 16 colours (selectable from 256K colours)
o Graphics mode 2: 512 x 256 pizels, 4 colours (selectable from 256K colours)
o Text mode: 64 columns x 32 rows of ROM-generated characters
o Keyboard: 1980s Maplin experimenters keyboard
o Monitor: 12-inch Microvitec colour
|
A word about the IC's used in this project. Most of the logic gates are from old circuits or salvaged from old computer boards. The
larger chips are pictured to the right
(Medium photo, 640 x 517, 29K or Huge photo, 1457 x 1177, 119K),
in their static-proof plastic cases ready for insertion in the sockets on the circuit board.
Anticlockwise from the top left, they are: UM70C171 (18-bit colour pallette), 681000 (128K static RAM), Z80B microprocessor,
62256 (32K 15nS display RAM) and 28F101 (Flash memory).
The display memory is a 32K static memory. You may recall that in the great Z80 project I had to use dynamic RAM for the display memory.
At that time dynamic RAM offered a greater capacity and was faster, at least, for the memory available to me the poor hobbyist.
Now very fast static RAM are available. The 32K RAM I use here has an access time of 15 nS, well fast enough for this application.
In the text mode, the 64 columns by 32 rows use only 2K of the memory, so I divide the 32K up into 16 selectable screens. Alternatively
the CPU could use this memory for data storage if necessary.
As I want this project to be reasonably simple, I also use static RAM for the CPU, in this case a 128K device. For even greater
simplicity I should have restricted it to 32K. the 128K chips were the same price as the 32K ones. So like an idiot I got the 128K
chips. Later I remembered that since the Z80 can only address 64K of memory directly, I would have to mess around with memory
banking. Either that, or only use part of the memory capacity but that would be untolerably wasteful.
For the character-generator ROM I wanted to use a 28C64 device, which is an electrically erasable read only memory (EEPROM). I had previously
used the same chip in my viscometer project. The electrically erasable types
are very comfortable to use, as you don't need any ultraviolet lamps to erase the chip contents every time you make a mistake.
Unfortunately the only one I could get was in a tiny surface mount package.
To connect this chip, I cut a piece of plain (no copper
strips, I never use those) 0.1-inch pitch matrix board in the same size as a standard 28-pin DIL socket. Using 0.6mm solid-core wire
I created "pins" about 8mm in length along the edges. I took a piece of household flex and extracted some of the fine copper strands.
Some of them I threaded over the board, some under. Some I threaded through pieces of the insulation from the 0.6mm wire used
previously. This keeps them all apart so there are no short circuits. I glued the chip to the board using superglue. Then using my
very best Surface Mount Technology Assembly robot (ahem) I painstakingly soldered the wires to the tiny pins on the chip.
It took me about 4 hours to complete this assembly. Pictured to the right is the final result, stuck in foil-covered polystyrene
(Medium photo, 400 x 300, 15K). Believe me, it's a lot harder than it looks.
What about the FLASH memory? This is a 128K device, it functions like an EEPROM. Originally I had planned to use this as a
hard disk, for saving programs etc. 128K isn't a lot but when writing machine code, I suspected it may last a while. Later,
I found various interesting pages on the net concerning the connection of IDE hard drives to 8-bit machines. What I had until
then thought of as a huge task, using a hard drive, seemed a lot simpler than I expected. So I have now abandoned the FLASH
and will attach an IDE hard drive when the time comes. I have an old 110 MByte drive which should be plenty for now.
Finally, the UM70C171 colour pallette chip. This contains a pallette of 256 colours, each colour references an 18-bit register
which is fed to 3 6-bit Digital-to-Analog converters for the video display colours Red, Green and Blue. I had originally
intended to use it in the Great Z80 project. I have no idea where you can get this chip from, I got it from Maplin but
needless to say they don't sell things like that anymore. I scanned the UM70C171 datasheet, to view it visit my datasheets page.
The keyboard in use here is one I bought from Maplin Electronics long ago and used in my
previous Z80 computer. It is a basic frame containing the switches. Maplin don't do these keyboard anymore. To the lament of many
UK hobbyists they seem to have moved away from components and more towards the consumer electronics market.
I built the metal case from aluminium corner right-angled corner pieces which you can buy cheaply from a DIY store.
In the picture (Medium photo, 640 x 210, 11K or Large photo, 1561 x 513, 37K)
you can see the bar-code label still stuck to the front
of the case: that's because they use some disgustingly sticky glue which is hard to remove. While building this case, a considerable
amount of hacksawing and drilling, with numerous screws and much filing had already caused blisters on my hands and consumed
a whole Sunday. I had no further energy to battle with the DIY store's bar code label.
The next picture (Medium photo, 640 x 247, 7K or Large photo, 1513 x 585, 26K)
shows the underside of the case, which is made from a piece of aluminium sheet which I happened to have hanging
around. No, I don't have a picture of the inside, and unless I feel like blistering my hands again undoing everything it's unlikely
there'll ever be one.
I connected the keyboard switches in a matrix. 4 lines from the CPU drive a 74LS154 4-16 line decoder chip on a small board in the
keyboard, which drives 16 columns in the matrix.
Because I love the Sinclair ZX Spectrum home computer, I decided to use the Spectrum character set. This suits me very well
because each character is laid out on an 8 x 8 pixel grid, which is as required by my circuit. In fact, I planned to
use the ZX Spectrum character set before building the computer so really the circuit was designed around an 8 x 8 grid. Apart
from anything else, the 8 x 8 character grid is in any case easiest to design for.
Of course when a computer is first made its memory is empty. There are no programs and no operating system. The computer
just sits there and does nothing. It cannot write output to the monitor, nor can it accept input from the keyboard. All of these
things require small programs to accomplish and somehow, these programs have to get into the computer's ROM. One way of doing
Some of the circuit for the Z80 computer is taken from my previous
grand Z80 project. For the most
part it is new, and the emphasis was on combining the text and
graphics modes in the video driver with minimal unnecessary
circuits or fancy features. On this page I have carefully
explained the inner workings of this computer and its video
driver circuit.
Read more...
I obtained the picture shown here
(Medium sized, 288 x 352, 24K or Large sized, 576 x 704, 52K) by using
a ZX Spectrum emulator, and writing a few lines of BASIC to print the entire character set onto the screen. Then I screen
dumped the ZX Spectrum emulator window (Alt-Print Screen keys on a PC) and pasted the resulting image into Microsoft Photo Editor.
The ZX Spectrum character set uses the standard ASCII character codes, starting with the SPACE character (code 32) at top left
in the picture, to the Copyright character at bottom right. The codes below 32 are usually use for control characters. I may use
them as control characters too, but wanted to put some patterns in the ROM anyway. So I designed some graphics characters that
might be useful (Medium sized, 640 x 356, 23K or Large sized, 879 x 489, 39K),
particularly when creating programs requiring text windows, where they can be used as borders around the text. I created
this picture using an Excel 97 spreadsheet, which is in this zip file (4K).
Switch Board
this (the conventional way) is to build some kind of interface to the PC RS232 port and download programs from a development
system running on your PC into the memory of the Z80 computer. Not the way I wanted to do things.
Accordingly I built the switch board pictured to the right
(Medium sized, 640 x 245, 13K or Large sized, 1305 x 501, 63K). This has
13 switches connected to the address lines via 74LS245 octal bus tranceiver chips, which allow me to program any memory
location in the entire 8K of the character ROM. This ROM is also going to be used for the boot program. The character patterns
reside in the top 1K of the memory (128 characters x 8 bytes per character). The remaining 7K will be more than enough
to initialise the system and load a larger program from the hard disk (when I get that far).
8 more switches control every bit of the
Z80 databus. The two remaining switches are the program switch which when ON allows the switches to program the memory, but
when OFF starts the Z80 running at address 0000; and the STTS/WR switch for programming. Unlike the other switches which are just
ordinary 2-way switches, the STTS/WR switch rests in its central position. Pushing it down to the WR position writes the
byte specified by the data switches to the memory address specified by the address switches. Pushing it to the STTS position
writes the data byte into the display status register on the board.
The switches are mounted on a rough piece of copper-clad PCB material. I never use this stuff for etching real PCB's, instead
I occasionally use it to construct shielding or cases. Using these switches I painstakingly programmed the entire character set
from the pictures shown above, bit by bit into the character ROM. Later I will program a keyboard driver.
Then some kind of editor. That will definitely be the first task, to get away from having to program every bit of every byte
by hand on the switches which makes the fingers sore.
More Photographs
Early Construction
Along with the 12-inch steel ruler. At this stage only the timing generator circuit is complete (page 1 of the circuit diagram)
in the bottom right of the picture. I built and tested this first. Later, with the monitor synchronisation signals generated
by this circuit, I could then use the video input to visualise signals elsewhere on the board, which was useful for debugging.
Elsewhere on the board many of the chips are in place but unconnected. Parts of the chip placement were subsequently rearranged.
Medium photo, 640 x 429, 25K
Huge photo, 1253 x 841, 77K
Half Done
Showing the rear connector. Some way into the construction and much of the video circuit is complete.
By this time I could use the monitor to check that the row counter, column counter, address multiplexing and graphics data pathways
were functioning correctly. Of course, they weren't, but I fixed everything as it arose rather than wait to the end and have
to rebuild everything in one massive debugging operation. Note the Flash ROM socket at the top left of the photo. At this time
I had not yet decided to abandon it in favour of an IDE hard disk, to be added later.
Medium photo, 640 x 278, 24K
Large photo, 1545 x 673, 99K
Artistic View!
Taken at the same time as the above "Half Done" board, from a viewpoint down near the character ROM socket. The ROM and display RAM
chips are not yet in their sockets. The amount of wiring laid between the chips increased substantially before the board was
complete.
Medium photo, 640 x 409, 30K
Huge photo, 1581 x 1011, 107K
Completed Board
All socketed chips are now in place. The bundles of wires laid between the chips are tied at suitable intervals to make
everything tidy. Note the Surface-Mount ROM chip in its socket at the top left of the photo. Next to the 16 MHz quartz crystal at
the bottom left of the board is a small Red LED which lights when power is applied. The idea is that I wouldn't then start
soldering the board when it was still switched on and risk damaging something.
Medium photo, 640 x 250, 23K
Large photo, 1209 x 473, 99K
Underside of Completed Board
Showing the details of the construction. Unlike many builders I don't use copper-stipped matrix board. Mine is plain with holes
on the standard 0.1-inch matrix. I have always built on this kind of board and find the component density can be made high
resulting in a compact circuit. Sometimes if you put the chips too close together things can get a little crowded.
Medium photo, 640 x 248, 28K
Large photo, 1341 x 521, 145K
Circuit Diagrams