2
\$\begingroup\$

I've decided to take some time to refresh my electronics knowledge after 30 years out of college. I've run into a small problem that I can't quite figure out and need a pointer.

TLDR: The Z80 initially starts (watching M1 strobing) but halts after just two or three, sometimes more, sometimes fewer, machine cycles.

I've built an ~ 5hz 555 astable circuit to drive the clock line of a Z80B. The Z80B has all of the data lines pulled down to ground. The INT, NMI, HALT, BUSRQ, and WAIT are all pulled high. I have the RESET on an RC circuit to go high after 1 second, plus a push-button to pull it low for a manual reset (pictured below... Ignore the crystal oscillator circuit; that isn't connected to anything). 556 wired as astable 555 @~5hz and Z80 wired for NOPs

The 555 is putting out a nice steady square pulse at about a 50% duty cycle. M1 will go high during reset and then cycle between one and five times, but then stops (seeming to indicate that the processor has stopped). With the data lines pulled to zero, I'm expecting it to continue to run, executing NOPs.

Can someone see anything obvious that I've done wrongly here? The thing that keeps running through my head (and that I can't seem to find any data on anywhere) is that the clock might be too slow if the Z80B uses dynamic registers internally. I can't seem to locate any authoritative datasheet for the Z80B.

\$\endgroup\$
  • \$\begingroup\$ Just gonna throw this out there: add ceramic decoupling caps for the Z80 and every other IC. Proximity matters. \$\endgroup\$ – DKNguyen Jul 29 at 15:07
  • \$\begingroup\$ Ah, yes.. I'll do that right now. I forgot that basic. :) \$\endgroup\$ – David Hoelzer Jul 29 at 15:17
  • \$\begingroup\$ David, went through a few data sheets for generic Z80. Seems that their CMOS version allows a very low frequency clock, so you should be OK. But their NMOS version looks to be dynamic as you suspect...a clock whose period is > 2us may balk. Don't know whether your Z80B is CMOS or NMOS. \$\endgroup\$ – glen_geek Jul 29 at 16:14
  • \$\begingroup\$ @glen_geek Thanks... I can't seem to find a good way to check, either. I'm assuming that since it is apparently functioning at 5 hz, it's CMOS.. though it is doing this odd thing when it gets to address greater than 0x01FF... It may get as high as 0x2FF, but then seems to halt.. Also, the 9th and 10th bits in the address might oscillate inverse to the M1 line. I have not yet worked out why those two lines are acting differently. \$\endgroup\$ – David Hoelzer Jul 29 at 17:22
3
\$\begingroup\$

Thanks to @DKNguyen for reminding me of a super basic standard "thing to do". I neglected to install decoupling capacitors between the power and ground of the 555 (556) and the Z80B.

With 1nF capacitors installed, it immediately begins to behave exactly as expected.

\$\endgroup\$
  • \$\begingroup\$ You can accept this answer to indicate that your question is solved. \$\endgroup\$ – Transistor Jul 29 at 16:56
  • \$\begingroup\$ I can't accept it for another 36 hours.. But thanks! @Transistor \$\endgroup\$ – David Hoelzer Jul 29 at 17:19

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.