Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Z80 CPU test circuit

Status
Not open for further replies.

malloc

New Member
I'm trying to interpret a circuit diagram at http://www.z80.info/z80test0.htm in particular this one: http://www.z80.info/gfx/z80test0.gif

Purpose:

My goal is to one day build a very basic Z80 computer with keyboard input and serial output that I can view on a terminal emulator (or a real terminal, if I had one). The purpose of this is for its amusement (or frustration?) and as a learning experience. The software side should be the easy part for me, the hardware is what I will probably learn the most from as my electronics knowledge is pretty rudimentary. To start with I want to build the most basic test circuit I can find.

Question:

First question: What is "470 E"? Is this some other notation for ohm? Is it 470 ohm?

Second question: Why doesn't the picture match the circuit diagram? Is this some circuit diagram convention I'm not aware of? I mean, GND and VCC are perpendicular to the rest of the pins in the circuit diagrams, whereas the real Z80 is a DIP with no pins at all in these locations. I find that this makes the circuit diagram harder to read. I have to map between the real physical pins and the pins in the diagram.
 
Given that they are driving leds with these resistors it only makes sense for them to be 470 Ohm.

In regard to your second question. When we draw symbols for processors on schematics we often rearrange the pins to make the schematic easy to draw and read. You will soon get used to it.
 
hi,
The 470R resistors from D0 thru D7 are redundant, just connect the pins to 0V.

The LED's on the A0,A1,A2 are only indicating the Address the Z80 is outputting.

My advice would be not to waste your time and money building the 'Simplest Z80', it will teach you nothing about the practical application of a CPU.

E.

Whats your location.??
 
Hi,

Those 470 ohm resistors place a hex 0x00 on the data lines so that the uP always executes a 'NOP' instruction. They arent needed if you later connect an EPROM to the data and address lines, which you will have to do at some point.

A good memory mapping technique for a small computer (very small) like this is to use A15 for the RAM/ROM select bit. When A15 is low (a '0') it selects ROM, and when high (a '1') it selects RAM. This maps into 32k of ROM and 32k of RAM but you can use less of each and still use that bit.

You'll have to have some way to program a ROM of some kind, probably EEPROM or UVEPROM whatever you want to use. EEPROM is the more modern.

Once you get some code running in ROM you'll be able to program service calls for various devices like keypads and LEDs and whatever else you want to drive with it like relays, etc. You might find it easiest to interface with a Serial type LCD display rather than an actual monitor at first, as any display type you use should have it's own storage because the on board storage will be so small. You can also map more memory in as pages but that requires more hardware.

In the end you probably wont be able to use this for too much other than small stuff. You can build a small word processor or spreadsheet or whatever but it wont be as good as stuff on the modern PC. You'll probably end up putting it aside at some point but if all you want is some learning experience then it may not be a total loss. After all, the odds of building a modern system from the ground up designing your own motherboard are pretty much very slim because of the complexity of the modern computer.

If you are uncomfortable with the drawing shown, make a new drawing yourself. Put the pins all in a row the way you want to see them and then trace out what each pin has to connect to and draw it. As long as the right pin numbers connect to the required places you're ok.
I sometimes do this myself when i want to make a PC board layout. That way all the pins are in the same place as they are on the actual physical chip.

Back in the 1980's Tandy used the Z80 in their computer, called the TRS80. You can look it up on the web. It had two 5.25 inch floppy drives and a green monitor (green lettering only). You could get a hard drive for it for about 400 dollars and it stored 40 Megabytes of data (yes that is Megabytes not Gigabytes).

In the long run it is probably better to spend the experimenting time working with one of the microcontroller families like the PIC Flash type. You can do a lot with them these days and then you can use them for hardware projects once you become familiar with them.
 
Last edited:
In the long run it is probably better to spend the experimenting time working with one of the microcontroller families like the PIC Flash type. You can do a lot with them these days and then you can use them for hardware projects once you become familiar with them.

I agree 100%. A good micorcontroller on on a breadboard is where I would start. It takes something like a 4"x6" board with the Z80, RAM, ROM, counters, and IO chips just to get what is now onboard a modern $2 micro controller.
 
hi,
The 470R resistors from D0 thru D7 are redundant, just connect the pins to 0V.

The LED's on the A0,A1,A2 are only indicating the Address the Z80 is outputting.

My advice would be not to waste your time and money building the 'Simplest Z80', it will teach you nothing about the practical application of a CPU.

E.

Whats your location.??

Hi, thanks, I'm in Norway.
 
Hi,

Those 470 ohm resistors place a hex 0x00 on the data lines so that the uP always executes a 'NOP' instruction. They arent needed if you later connect an EPROM to the data and address lines, which you will have to do at some point.

A good memory mapping technique for a small computer (very small) like this is to use A15 for the RAM/ROM select bit. When A15 is low (a '0') it selects ROM, and when high (a '1') it selects RAM. This maps into 32k of ROM and 32k of RAM but you can use less of each and still use that bit.

You'll have to have some way to program a ROM of some kind, probably EEPROM or UVEPROM whatever you want to use. EEPROM is the more modern.

Once you get some code running in ROM you'll be able to program service calls for various devices like keypads and LEDs and whatever else you want to drive with it like relays, etc. You might find it easiest to interface with a Serial type LCD display rather than an actual monitor at first, as any display type you use should have it's own storage because the on board storage will be so small. You can also map more memory in as pages but that requires more hardware.

In the end you probably wont be able to use this for too much other than small stuff. You can build a small word processor or spreadsheet or whatever but it wont be as good as stuff on the modern PC. You'll probably end up putting it aside at some point but if all you want is some learning experience then it may not be a total loss. After all, the odds of building a modern system from the ground up designing your own motherboard are pretty much very slim because of the complexity of the modern computer.

If you are uncomfortable with the drawing shown, make a new drawing yourself. Put the pins all in a row the way you want to see them and then trace out what each pin has to connect to and draw it. As long as the right pin numbers connect to the required places you're ok.
I sometimes do this myself when i want to make a PC board layout. That way all the pins are in the same place as they are on the actual physical chip.

Back in the 1980's Tandy used the Z80 in their computer, called the TRS80. You can look it up on the web. It had two 5.25 inch floppy drives and a green monitor (green lettering only). You could get a hard drive for it for about 400 dollars and it stored 40 Megabytes of data (yes that is Megabytes not Gigabytes).

In the long run it is probably better to spend the experimenting time working with one of the microcontroller families like the PIC Flash type. You can do a lot with them these days and then you can use them for hardware projects once you become familiar with them.

Hi,

thanks, I know that it simply will hard wire a NOP. I also know the limitations of a Z80 based computer even if I had a proper, working computer. I know that even a modern microcontroller would be vastly more powerful, but I like vintage computers. Building my own from scratch with actual soldering and designing the "motherboard" myself would be great.

My reason for wanting to implement the tester circuit at all is just to get a feel and a little experience with that sort of thing before I try a more elaborate design that actually interfaces with SRAM and ROM (I'm going to use EPROM). I feel that starting directly at the latter design is just too complicated with my limited experience. I have never done anything in this direction before.
 
That 68k resistor connected in parallel with the NAND gate, what kind of resist can I use for that? I tried searching around for a 68k resistor but there are different types, and I don't know which is applicable for something like this. Any suggestions?
 
That 68k resistor connected in parallel with the NAND gate, what kind of resist can I use for that? I tried searching around for a 68k resistor but there are different types, and I don't know which is applicable for something like this. Any suggestions?

hi,
I would suggest a 1% or 5% tolerance, the wattage could be anything from 0.125W or higher for the 68K, its only a simple oscillator circuit.

E.
 
Malloc: since you are in norway, I suggest you look at farnell.com, dunno about shipping to norway, but shipping to czech republic costs ~5 euro. But anyway, you don't have any local stores that supply electronic components?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top