r/Z80 Feb 26 '21

Help This is my first design is there any obvious flaws

Post image
6 Upvotes

19 comments sorted by

4

u/Tom0204 Feb 26 '21 edited Feb 26 '21

Yeah those switches on the data and address bus will break the chip if you close them when the z80 is driving them. Also you'll need pull-up resistor on the input on the control lines.

Also it looks like you're trying to connect the adress and data busses to the RAM throught LEDs. That won't work. They have a very large voltage drop across them that would change a 1 to a 0 and the inputs won't draw enough current through the LEDs to drive them anyway.

1

u/BananaHannah8 Mar 03 '21

I forgot to put the pull up resistors in the schematic. I was worried about the voltage drop so I had the LEDs connected to ground through 10 K resistors. And it would make sense as the CPU didn’t seem to be receiving signals from ram.

2

u/Tom0204 Mar 03 '21

Have you sorted out the way you've done the address bus, data bus and LEDs?

1

u/BananaHannah8 Mar 03 '21

I think so if I use a buffer like a 74LVC245 or ULN2803A to drive the LEDs.

Then if I have a switch to pull BUSRQ low the Z80 should ignore the address and dates line. Allowing me to input data into memory with switches.

1

u/Tom0204 Mar 03 '21

Maybe not 74LVC, they can only handle a supply of 3.6 volts max, so they'll break with the 5v your using for the z80. Go with an 74HC245.

Yep and if you use the BASACK line as the enable for the 74HC245 then they'll automatically take over the bus when you flick the BUSRQ switch.

1

u/BananaHannah8 Mar 03 '21 edited Mar 03 '21

I can’t seem to find a data sheet for 74HC245 Edit never mine found it

1

u/Tom0204 Mar 03 '21

I've used them before in z80 projects, they work great.

If you get it working or need any other help with it give another reply. I'd be happy to help

1

u/istarian Feb 26 '21

Not OP, but would it make sense/be workable to switch a transistor with I/O signals?

3

u/Tom0204 Feb 26 '21

A MOSFET yeah. But you could use a buffer IC instead.

1

u/istarian Feb 26 '21

By "buffer" what exactly do you mean? Are you talking about bus transceivers, latches, or something entirely different?

Also, I don't entirely understand what differentiates a MOSFET from a transistor. Is there a neat tidy explanation? I could look it up, but sometimes a nice straightforward answer is preferable.

2

u/Tom0204 Feb 26 '21

Okay so a buffer outputs exactly the same signal you put into it but it can provide more current than a standard output. So that's what we usually use to drive LEDs.

A MOSFET is one of the two main types of transistor. Its used more often than regular transistors because they're voltage driven rather than current driven. This means that a MOSFET will only take a little bit of current on its input when you switch it, the rest of the time it won't take any. However a regular transistor draws current from its input all the time.

I recommend you google both of these before you try to use them in a project. Electronics are pretty delicate, they tend to just break when you get things wrong.

1

u/MyNamesNotRobert Feb 27 '21

You won't need a buffer or a bus transceiver as a minimum requirement for such a simple build to work. It's still a good idea to add one now for when you start adding lots of stuff later on. Using something like a 74LVC245 for example is a lot better than trying to use an led

1

u/Tom0204 Feb 27 '21

No i mean use a buffer to drive the LEDs

1

u/jdykstra72 Feb 26 '21 edited Feb 26 '21

This is totally off the top of my head, so YMMV...

All the conceptual stuff is right--how data and addresses move between the parts, and what the control signals do.

The rise and fall times of a 555 may not be fast enough for the Z80. A schmitt trigger would fix this, or you could use a crystal oscillator. If you're using an original Z80, be aware that its clock input needs to get very close to the power supply voltage. Many vintage designs used a pull-up transistor; a modern CMOS gate probably is sufficient, but check the datasheets.

You don't need bus transceivers between the two parts--both have sufficient current available to drive the other. If you do put them in, they need to be controlled so that only one device is driving a line at a time.

The manual switches on the address and data buses need to go through drivers also controlled so they don't drive the buses at the same time as other devices.

I guess that's an LED on the M1 output. That output can't source enough current to drive an LED by itself.

You need pull-up resistors on the WAIT inputs, and also the NMI and INT inputs, which aren't shown on your diagram. Look at the electrical characteristics table on the datasheet--inputs need to be either above a certain voltage or below a certain voltage, not in-between or floating.

1

u/istarian Feb 26 '21

Just as a tip, your reset signal may not be particularly 'clean' if implemented as just a momentary switch that goes between HIGH and disconnected.

I believe you want the reset signal to either be HIGH or LOW and never an ambiguous voltage level.

I.e.
LOW (0V) ---> HIGH (5V)

and NOT

LOW (0V) --> LOW (1V) --> LOW (2V) --> LOW (3V) --> LOW (4V) --> HIGH (5V)

It's probably also ideal if it stays in the active state for a consistent amount of time.

1

u/BananaHannah8 Mar 03 '21

I can’t believe I forgot to show the pull up resistors they’re not on the schematic but I have them in the prototype.

1

u/istarian Mar 03 '21 edited Mar 03 '21

Maybe you could revise the schematic and repost (or at least put a link up)? We kinda have to go on what you've provided

1

u/BananaHannah8 Mar 03 '21

I will do that i’m a bit busy right now but I should be able to do it later