Go Down

Topic: Wiring a Z80 to Arduino... (Read 9 times) previous topic - next topic


It's very late, I've spent a lot of time trying to make that thing work,
but... it doesn't!
This is how I connected the whole thing: (sorry, didn't find time to draw
a schematic, and I have no dedicated software. Do you know good, open-source ones?)

- not connected:
A4-A15 (I only watch A0-A3)
- to Arduino 5V :
- to GND:
Vss, D0-D7
- to arduino:

When I power this on, without any resistor before GND, the CPU overheats
very fast (even if I clock the CPU at 1 Hz... it seems strange to me), and I unplug
it 'cause I'm not sure it won't break.
If I use a resistor, it takes time to heat, but enventually will. And it doesn't work the same.

My sketch is the following :
setup :
set arduino clk & reset to output, arduino A0-A3 to input
reset <- low
clock <- low
every 500 ms, switch the clock output from low to high or high to low
after 3 s, reset <- hi
read A0-A3. if result is different than previously read, display.

When I use a resistor, I've got a fixed 1111 result from A0-A3.
When I don't, it alternates very quickly between 1111 and 0111. (faster
than the clock). But I didn't think of MREQ, maybe I have to check its
value too before displaying A0-A3.

So, still I'm stucked... but I go on searching.
BTW, Rob, thanx for the http://www.z80.info website, I think I will try to
setup the minimum Z80 CPU test circuit (http://www.z80.info/z80test0.htm),
seems a good way to find if the CPU is still OK, and if there is any problem with
the heat...

Time to sleep, I will just try the MREQ thingy before (or I won't be able to sleep!). See ya.




You can't supply a clock signal to the Z80 from an IO port, you need a high frequency, about 2-4MHz.

You can generate upto 8MHz with any of  the timers on the ATmega  by directly programming them.  

The original Z80 should get hot, its NMOS!  Max current 150mA so nearly a watt of heat dissipation (at any clock frequency).  The datasheet says static by design but parts only tested down to 5kHz.  Have you measured the supply current - if its greater than 150mA you can be sure its fried or overloaded.

I suspect any replacement Z80 you can find these days is CMOS and much less power hungry.
[ I won't respond to messages, use the forum please ]


Well, MREQ is alway low (active), A0-A3 is always 1111...
Time to go to bed !



Hello !

So, I've tried a new circuit, the Z80 test circuit from z80.info (http://www.z80.info/z80test0.htm),
to be sure that the Z80 was working correctly by itself, before going on.
And the result is... the circuit is not working. But I can't tell right now if it's the Z80 that's not working
or a mistake of mine, during the assembly.
A lot of heat, no LED on.... (btw, I assume that the Z80 can overheat even if it's broken. Is it right ?)
I've made a few checks with my voltmeter, and found some weird results : the resistors next to D0-D4 (or D3, not
sure) show something around 1V, the next one (D5 or D4) is 2.5V, and the remaining ones (D6-D7 or D5-D7) are 0V.
It doesn't seem right, but what can it mean, I cannot tell...
I've orderded a few Z80s from Jameco, because I don't know french shops that sell Z80s. So I'll have to wait a few
weeks maybe... (btw, do you know european shops, where shipping might be quicker - and cheaper ?)

During this time, I will try to do the same thing with a 6502 I've just received from eBay. I have more confidence
in it, so maybe I'll be able to make it work (even if it works differently, the clock for instance...).

I'll tell you as soon as I have any interesting results (w/ the arduino, of course!).



Sorry I don't get the D0-7, there are only 3 diodes on that schematic and they are LEDs.

I assume that the Z80 can overheat even if it's broken. Is it right ?

Yep, it could go either way depending on what's cactus.
Rob Gray aka the GRAYnomad www.robgray.com

Go Up