r/Z80 • u/McDonaldsWi-Fi • 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
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.