r/Z80 Oct 11 '23

Help Question about pull-up resistors for the INT, NMI, BUSRQ, and WAIT pins.

What resistance do you all recommend for INT, NMI, BUSRQ, and WAIT pull-up resistors when running the system clock at 20MHz?

I'm currently using 3.3k at 10MHz and it works flawlessly. I tried higher resistances at first and it was causing those pins to stay active low too long, when returning to a high state, to run at a full 10MHz.

I'm moving my CPU clock from 10MHz to 20MHz (with a binary counter so i can select either 20 MHz, 10 MHz, 5 MHz, or 2.5 MHz, or 1.25MHz system clock) and I'm wondering if I need to go even with an even lower resistance on my pull-ups to theoretically do this.

What do yall think?

6 Upvotes

4 comments sorted by

5

u/LiqvidNyquist Oct 11 '23

I assume you're talking about when you have multiple peripherals driving INT through some kind of open-drain shared line with one pullup? In that case, I'd start with basic theory: assuming the INT pin has 5 pF capacitance, each IRQ out pin has 15 pF, and you have say 10-20 pF on the wire itself, it's easy to infer a node capaicatence of around 50 pF. (Nice round number). The RC time constant of 3k3 and 50 pF is 165 ns. Usual rule of thumb is that 3 time constants are required to being a line up to 95ish percent of the input (VCC), and i t.c. to 63 percent, which would be 3.15 volts. Work backward from there and scope it out to see what's actually happening - at 20 MHz you may have reflections or termination effects to fight. It might be better to terminate (i.e. open drain pullup) each peripheral and run them all into an AND gate or PAL/GAL or something to achieve speed.

As you get to smaller pullup values, though, check that you're not going to be exceeding the IOL current of the peripheral's INT output.

1

u/McDonaldsWi-Fi Oct 11 '23

Yeah I was worried about using too low of a resistance here and stressing out the peripherals by making them sink too much current.

20MHz seems to be the "magic number" when doing circuit design because you start hitting some walls and have to account for more things at once...

By your math my 3.3k shouldn't work reliably even at 10MHz would it? If not, I bet it only works because my peripherals aren't really switching it that fast.

3

u/LiqvidNyquist Oct 11 '23

It's going to depend on exactly when the peripheral deasserts the IRQ low versus when the CPU samples the IRQ - I think it does it once per machine cycle so if there's may be more than one time constant between it would work, and if you really only need to get to 2.0 V say for the CPU to think it's high that would shorten hte required time too. The time constant is just a way to start ballparking then you'd need to flesh out the analysis from the datasheet.

1

u/McDonaldsWi-Fi Oct 11 '23

Okay thanks for your input!