top of page

 

2. 6502 / Z80 Computers (1978,1980)

Hardware: DIY MOS Technology 6502 cpu board / DIY Z80 based computer 

Software: Switch entry 6502 / Z80 machine code; Z80 Tiny Basic

Not long out of university and before the personal computer had even appeared, I built a small computer based on a MOS Technology 6502 CPU (details now sadly lost). This chip mimicked the earlier Motorola 6800 microprocessor with a very useful improvement - it had static registers. The original 6800 used Dynamic Random Access Memory (DRAM) which meant its registers needed a high speed clock signal permanently present to refresh the electrical charge in them in order to keep their content.

The advantage of static registers (SRAM) meant you no longer needed to keep the processor running at high speed to view register contents, and it made it a breeze to build a computer that could be single stepped in real time - ideal to learn from.

Amazingly, someone has now built a working 6502 CPU from over 4000 discrete transistors:
http://monster6502.com

 

I considered expanding my 6502 beyond just a CPU, memory and switches but then the superior Z80 CPU appeared, accompanied by its PIO and SIO peripheral chips. At the time the S-100 bus had been used in the USA as a general purpose computer bus and I decided to build my own Z-80 computer based on a standard S-100 bus motherboard but with my own custom pinout and pcbs.

 

In those days +5V logic chip power consumption was considerable and the S-100 bus ran off unregulated ±8V and ±18V supplies feeding into National Semiconductor LM78xx series IC regulators on the pcbs themselves, and my own pcbs adopted this concept.

I built my own UK mains powered unregulated dc power supply for the computer, which provided the requisite +8V at 10A (logic) and ±18V (I/O) at 5 amps.

http://en.wikipedia.org/wiki/S-100_bus

I had made pcbs at home using crude pcb etch resistant pens but it was difficult to apply this evenly, let alone in the fine widths needed for processor boards. This was before the days of etch resist spray cans or pre-prepared etch resistant pcbs. However by this time I was working in Industry and familiar with the technique of applying Brady sticky black tape and pads onto transparent plastic sheets to make outlines for pcbs. I created 1:1 layouts using this technique and sent them off to a UK pcb manufacturing company. Through hole plating was expensive as was hole drilling so I drilled all of the holes by hand and inserted wires in place of through hole plated vias, but I got the pcb company to chamfer and gold-plate the pcb edge connectors.

There were no prototypes. I designed the CPU on a single sheet of A3 paper drawn in pencil, and laid out the pcbs 1:1 on tracing paper. Mistakes are few, mostly unforseen timing issues, revealing themselves as odd chips attached on the pcb reverse.   

I had three boards made. The first was the processor board with the 8-bit Z80 CPU with a socket for up to a 2k byte ROM and a 1k byte static RAM for main memory, together with two Programmable I/O (PIO) chips providing 16 bits of I/O and a dual (CTC) 16-bit Counter Timer Circuit, each with 16-pin DIP sockets taking the signals off the board to various peripheral circuits I built. The second board was a 'front panel' from which to control it. The third board was an 8k byte dynamic RAM board using an array of 32 National Semiconductor MM5262 2k x 1 bit DRAM chips in 22-pin 0.4" wide DIPs.

Lacking any tools and unaware at that time of the concept of EMI, I got a local carpenter to knock up a wooden frame to hold the S-100 bus.

The 1k byte main SRAM memory is minuscule by today's standards, but with Tiny Basic blown into what I think was a 2716 2k byte UV-erasable EPROM, it didn't stop me programming my own 16 room adventure game complete with a random thief!

 

http://p112.sourceforge.net/tbp112.html

http://en.wikipedia.org/wiki/Tiny_BASIC

I also built an interface to an SC-01 phoneme speech synthesis chip and created plausible sentences. All of this code was laboriously entered using the front panel switches, and lost the moment power was removed. Eventually I fitted a 2k byte non-volatile EEPROM which made things a lot easier.

I would not dare power it up now, some 40 years after I built it, as I imagine a large quantity of the small blue and red tantalum capacitors I used (due to their convenient small size) will now be shorts!

Later I added a ready-made S-100 prototype board, onto which I put an 8251A UART to hook up a monitor. The first monitor I got was a huge proprietary ex-insurance company unit with a non-standard interface, and its memory was a very long coil of wire forming a delay line in the bottom of its case. It was full of logic gate ICs on lots of small boards.

Roll on to 2017 and I found the computer rather the worse for wear hidden in a box in my loft. It is doubtful I could now restore it, as I note several devices are missing from their sockets (the expensive latched decoder 7 segment displays ended up in the 'PSG' LF pulse generator). The only remaining documentation is the CPU board schematic, now a tatty, torn A3 sheet of paper.

P1150689

Left, the only remaining documentation is the schematic for the CPU board.

This was of course before the PC was invented, and was the one and only circuit diagram for the CPU pcb, drawn in pencil.

Once I had laid out the tracks by hand using self-adhesive black tape at a scale of 1:1, I checked them against the circuit, confirming each track by drawing over the original black pencil with a red pencil.

When I was happy it was correct, I sent it off to a UK pcb manufacturer who first produced the necessary negative mask of the layout to form the acid etch resist layer prior to etching in an acid bath. They cut the board to size, then bevelled and gold-plated the double-sided edge connector.

 

A front panel control pcb and 32k DRAM pcb then followed in similar fashion. 

Right, the complete computer mounted on an S-100 bus board in a wooden rack.

Front to back, the boards are:

Front Panel,

8k byte DRAM,

CPU board,

SIO board.

At the rear, 64-way DIN 41612 connectors carry signals from the computer to whatever experiment I was using it for.

http://en.wikipedia.org/wiki/DIN_41612

 

Front panel: The top row of switches is the 16-bit address and the bottom row is the 8-bit data.

Accompanying the switches are

coloured LEDs: top row red address LEDs and bottom right, orange data LEDs. Below left are 6 empty sockets that once held additional HP latched multi-LED hex displays for address and data.

The bottom row of switches selected Read/Write and the data to be displayed. Pressing the red button wrote the data to the selected address. 74161 4-bit binary counters incremented he address as the code was entered.

P1150587
P1150593

Left the CPU board with Reset, instruction Single Step and Run switches top left.

The CPU is central, the 40-pin DIPs each end are two PIOs, and the white ceramic DIP with a gold lid is the CTC Counter Timer Circuit. The empty DIP sockets adjacent to these chips carry their signals off-board for experimentation.

Two ubiquitous 2114 SRAMs near the 50-way PCB connector provide the 1k byte main memory and Tiny Basic V3.0 is blown into the labelled Eprom just above them.

+5V 1A regulators each side at the bottom power the board.

Below - the reverse with wires providing the third pcb layer (the black object is a SIL pull-up resistor pack):

P1150594
P1150595

Left the 8k byte DRAM board using 32 x National Semiconductor MM5262
2k x 1 DRAMs. These chips were a pig to drive, requiring a 3-phase clock running from +5V to -15V with nanosecond timing, and the output required MOS to TTL translators
that run down the centre of the board between the two DRAM banks.

The long white object running in parallel with the connector is a Rogers Corp busbar carrying power between voltage regulators.

 

The design is based on an Intel D3222 DRAM controller, the greyish chip at the bottom near the pcb connector, datasheet below:

Right, the rear of the 8k byte DRAM board. Because plated through holes were expensive, I opted instead for small pins pushed through the holes and soldered each side.

The black object on the back is a 74LS32 quad OR gate revision.

The green wires are additional connections that could not be made on just 2 layers.

 

Below are datasheets for the
National Semiconductor DS0036 / DS0056 5MHz dual clock driver and DS3625 dual MOS to TTL driver chips:

P1150596

Link to National Semiconductor 1979 Interface Databook:
http://media.searchelec.com//specshee/NATIONAL/Interface%20Databook%201979_text.pdf

P1150597

Left and below are photos of the standard S-100 prototype card I used for my SIO (Serial I/O) card, on which I installed an 8251A UART and associative RS-232 interface circuitry, and the usual 78xx series +5V 1A, ±12V 1A voltage regulator ICs.

http://en.wikipedia.org/wiki/RS-232

http://en.wikipedia.org/wiki/78xx

P1150602
bottom of page