1
\$\begingroup\$

I'm having trouble getting my simple Z80 based project to work. I asked for help here last week, and received an excellent response on troubleshooting the Z80; here is the relevant part:

There could be many reasons for this malfunction, such as a wiring error, faulty chip etc. I would start by checking to see if the CPU can work by itself. To do that I would:-

  1. Remove the VIA and EEPROM. Check all wiring for shorts etc, and make sure the power supply and bypass capacitors are connected to the correct pins.
  2. Tie all 8 data lines to ground via resistors (~1k each), to create a NOP instruction.
  3. Power up the circuit and check that all input signals are correct (/INT, /NMI, /HALT, /BUSRQ, /WAIT, /RESET should all be high)

When I do this, only the /HALT pin is high; the other 5 pins don't read as high or low (as checked with a logic tester).

Does this indicate a bad chip, or could it be something else (e.g. I'm not supplying enough current)? Is there a general explanation when a control pin doesn't read as a stable logic level? I know some pins are tri-state; I don't think these are, although the datasheet states that the /INT and /NMI pins need pull-up resistors in normal operation.

Thanks in advance for any replies.

\$\endgroup\$
1
  • 3
    \$\begingroup\$ /INT, /NMI, /HALT, /BUSRQ, /WAIT, /RESET are all inputs to the Z80. It is your responsibility to pull them high, either with resistors or logic. \$\endgroup\$
    – Dave Tweed
    Apr 19 '15 at 0:40
2
\$\begingroup\$

You should pull the inputs /INT, /NMI, /BUSRQ, /WAIT and /RESET high with resistors.

/HALT is actually an output (including it in the list of inputs was my mistake) so it should be either high (usually) or low (only when the CPU is executing a HALT instruction).

Here is an example test circuit for the Z80. It connects all input lines except /RESET directly to +5V, which is OK if you don't ever want to use them (just make sure you connect the correct pins, as an output pin might not like being shorted to +5V!). When the CPU is running The LEDs should blink in a binary sequence, showing that the address is continually incrementing.

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ Bruce, thanks again for a great answer. I pulled those 5 control pins high and got the /IORQ pin to pull low with the OUT pin assignment from your previous answer. Then I hooked up the EEPROM, and it went low again in time with the program. So, either it wasn't hooked up correctly before, or there's something wrong with the VIA. Thanks again for your help! \$\endgroup\$
    – Nester
    Apr 19 '15 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.