T
Tim Williams
- Jan 1, 1970
- 0
I'm moving on to interrupt driven timing, so I set up a simple shift,
display and delay interrupt handler on my Z80 deal. I have a pullup
resistor on /INT and a jumper momentary to ground (unfortunately, I
don't have any pushbuttons with me, nor anything reasonable to
debounce it) to trigger.
The problem is, once I power up and reset the circuit and it enters
its infinite do-nothing loop (that much is working okay), I hit
interrupt and it works, yes, but then it keeps on working. It's not
returning. What's more, I can interrupt the handler in the middle of
its delay, right in the middle between a DI and an EI. That should be
impossible!
I'm not mistakenly using the NMI; I have RETN at 66h, and the /NMI pin
does nothing (as well it should). (I'm running IM 1 and the handler
is at 38h, and if it weren't getting there, it wouldn't respond very
well at all, so I know that is correct.) INT is supposed to be level
triggered, only when interrupts are enabled, and either interrupts are
disabled after an INT (I'm not clear on that) or I disable them
immediately (I have DI just in case). Even if it is firing multiple
interrupts (IFF1 remains set after INT response?), it should still pop
them off, one by one, as each completes, eventually stopping. But it
doesn't!
Tim
display and delay interrupt handler on my Z80 deal. I have a pullup
resistor on /INT and a jumper momentary to ground (unfortunately, I
don't have any pushbuttons with me, nor anything reasonable to
debounce it) to trigger.
The problem is, once I power up and reset the circuit and it enters
its infinite do-nothing loop (that much is working okay), I hit
interrupt and it works, yes, but then it keeps on working. It's not
returning. What's more, I can interrupt the handler in the middle of
its delay, right in the middle between a DI and an EI. That should be
impossible!
I'm not mistakenly using the NMI; I have RETN at 66h, and the /NMI pin
does nothing (as well it should). (I'm running IM 1 and the handler
is at 38h, and if it weren't getting there, it wouldn't respond very
well at all, so I know that is correct.) INT is supposed to be level
triggered, only when interrupts are enabled, and either interrupts are
disabled after an INT (I'm not clear on that) or I disable them
immediately (I have DI just in case). Even if it is firing multiple
interrupts (IFF1 remains set after INT response?), it should still pop
them off, one by one, as each completes, eventually stopping. But it
doesn't!
Tim