RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » Z80 interrupt management (is there a better way to do this?)
Z80 interrupt management [message #8788] Wed, 07 July 2021 04:07 Go to next message
lynchaj is currently offline  lynchaj
Messages: 1080
Registered: June 2016
Senior Member
Hi
Has any adapted an Intel 8259 PIC circuit to work with a Z80? It seems to me that adding a PIC would make interrupt management a lot easier. Implement per data sheet and I think it supports up to 256 unique interrupts or something like that if I recall correctly. I know the IBM PC implementation was not the best but maybe it's enough? Even handling 8 unique interrupts would probably be sufficient for most Z80 type systems. How many interrupts do we need? The current approach of daisy-chain interrupts on the backplane is less-than-great and I am not aware of anyone who has actually implemented it even though the original Z80 SBC ECB backplane supported it from day it was first released.

Like to hear others thoughts on this topic

Thanks, Andrew Lynch

[Updated on: Wed, 07 July 2021 04:08]

Report message to a moderator

Re: Z80 interrupt management [message #8789 is a reply to message #8788] Wed, 07 July 2021 05:30 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
You can simply run the interrupts into a Z80 PIO. That gives you bit level masking and interrupt control as well as telling you what interrupts are present with a single IN. See "mode 3" and the interrupt control word - you can mask/unmask each line individually. If you have 8 lines used for that I think you've still got enough to add a bitbang SD card (even in QSPI mode) or a printer port as well ;-)

You can use a Z80 and 8259 together but you have to add a lot of glue or use the 8259 in poll mode (so you get an interrupt and then read the PIC to find out what is going on), as it can't cope with the Z80 interrupt pattern. There's a modern S100 card that does it here:

http://www.s100computers.com/My%20System%20Pages/PIC&RTC %20Board/My%20PIC%20Board.htm

One other thing I was looking at was your banking model. You are going to need to disable interrupts around your ROM/RAM switching so you don't get an IRQ mid switch when there is nothing mapped low.

Alan
Re: Z80 interrupt management [message #8790 is a reply to message #8789] Wed, 07 July 2021 05:42 Go to previous messageGo to next message
wsm is currently offline  wsm
Messages: 232
Registered: February 2017
Location: AB, Canada
Senior Member
Back in the era, I implemented a Mode 2 interrupt controller based on a 74LS148. I no longer have the schematic but I'm thinking it was probably feeding D3..D1 of an 8-bit tri-state latch used to freeze the highest priority during the acknowledge cycle and form the vector. Obviously there also needed to be some M1#+IORQ# logic.
Re: Z80 interrupt management [message #8791 is a reply to message #8789] Wed, 07 July 2021 06:23 Go to previous messageGo to next message
lynchaj is currently offline  lynchaj
Messages: 1080
Registered: June 2016
Senior Member
etchedpixels wrote on Wed, 07 July 2021 08:30
You can simply run the interrupts into a Z80 PIO. That gives you bit level masking and interrupt control as well as telling you what interrupts are present with a single IN. See "mode 3" and the interrupt control word - you can mask/unmask each line individually. If you have 8 lines used for that I think you've still got enough to add a bitbang SD card (even in QSPI mode) or a printer port as well ;-)

You can use a Z80 and 8259 together but you have to add a lot of glue or use the 8259 in poll mode (so you get an interrupt and then read the PIC to find out what is going on), as it can't cope with the Z80 interrupt pattern. There's a modern S100 card that does it here:

http://www.s100computers.com/My%20System%20Pages/PIC&RTC %20Board/My%20PIC%20Board.htm

One other thing I was looking at was your banking model. You are going to need to disable interrupts around your ROM/RAM switching so you don't get an IRQ mid switch when there is nothing mapped low.

Alan
Thanks! Great insight. It sounds like the PIO is the way to go for multiple interrupt sources. I am hoping to make a dual PIO board down the road sometime so maybe it should be part of that design. Basically split the old Zilog Peripherals board up into two boards; CTC+DART and Dual PIO

Regarding the interrupt disable, fortunately the ROMWBW team thought of that issue on the bank switching and implemented code in the MBC unique section to deal with the scenario.

I think the original Z80 SBC V1 also had that issue and I just did a crude DI/EI around bank switching but the ROMWBW approach is more sophisticated.

Kudos to Wayne & team!

Thanks, Andrew Lynch


Re: Z80 interrupt management [message #8794 is a reply to message #8789] Wed, 07 July 2021 12:06 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 385
Registered: October 2015
Location: Fallbrook, California, US...
Senior Member
etchedpixels wrote on Wed, 07 July 2021 05:30
You can simply run the interrupts into a Z80 PIO. That gives you bit level masking and interrupt control as well as telling you what interrupts are present with a single IN. See "mode 3" and the interrupt control word - you can mask/unmask each line individually. If you have 8 lines used for that I think you've still got enough to add a bitbang SD card (even in QSPI mode) or a printer port as well ;-)

You can use a Z80 and 8259 together but you have to add a lot of glue or use the 8259 in poll mode (so you get an interrupt and then read the PIC to find out what is going on), as it can't cope with the Z80 interrupt pattern. There's a modern S100 card that does it here:

http://www.s100computers.com/My%20System%20Pages/PIC&RTC %20Board/My%20PIC%20Board.htm

One other thing I was looking at was your banking model. You are going to need to disable interrupts around your ROM/RAM switching so you don't get an IRQ mid switch when there is nothing mapped low.

Alan

Interesting. I want to check my understanding of this approach. The Z80 PIO would be the one and only driver of the /INT signal into the Z80, right? So, no IEI or IEO chain, right? Additionally, the Z80 PIO could invoke a Z80 mode 2 interrupt, right? The PIO interrupt handler would then use the PIO channel bits to determine what is causing the actual interrupt, right?

If I have understood correctly, this would work nicely. It does mean that there would need to be individual interrupt lines for the modules (fly wires or dedicated interrupt lines on the bus). But an 8259 would have the same requirement.

Thanks,

Wayne


Re: Z80 interrupt management [message #8795 is a reply to message #8794] Wed, 07 July 2021 13:02 Go to previous messageGo to next message
lynchaj is currently offline  lynchaj
Messages: 1080
Registered: June 2016
Senior Member
Hi
We could do a PIO test board for the Z80 MBC to prove this concept out. Nothing like real hardware to verify if a concept works.

Something to consider

Thanks, Andrew Lynch
Re: Z80 interrupt management [message #8796 is a reply to message #8795] Wed, 07 July 2021 18:48 Go to previous messageGo to next message
Sergey is currently offline  Sergey
Messages: 236
Registered: October 2015
Location: Portland, OR
Senior Member
Intel 8259 PIC, depending on the mode, needs three cycles to issue either a CALL instruction (8080) or two cycle to issue INT instruction (8086/88). Z80 CPU issues only one INTA cycle. So you can't simply interface one to another.
This page https://lkesteloot.github.io/alice/alice2/cpu_board.html has a description of a circuit that generates INTA instead of the usual RD, until either a write (likely to save PC on the stack) or a reset happen.
Also to implement 256 interrupts, you are going to need 9 PICs. But this is probably an overkill anyway. You could use 2 PICs in a cascade configuration as IBM AT does for 15 interrupts.

If you need only up to 4 interrupts, you can use Z80 CTC, as I've done in Zeta SBC V2. See "Programming CTC as an Interrupt Controller" here: http://www.malinov.com/Home/sergeys-projects/zeta-sbc-v2

[Updated on: Wed, 07 July 2021 18:54]

Report message to a moderator

Re: Z80 interrupt management [message #8797 is a reply to message #8794] Wed, 07 July 2021 19:14 Go to previous messageGo to next message
Sergey is currently offline  Sergey
Messages: 236
Registered: October 2015
Location: Portland, OR
Senior Member
Wayne W wrote on Wed, 07 July 2021 12:06


Interesting. I want to check my understanding of this approach. The Z80 PIO would be the one and only driver of the /INT signal into the Z80, right? So, no IEI or IEO chain, right? Additionally, the Z80 PIO could invoke a Z80 mode 2 interrupt, right? The PIO interrupt handler would then use the PIO channel bits to determine what is causing the actual interrupt, right?
In this case (interrupt mode 2) you can chain multiple Z80 peripherals together using IEI/IEO. All of the peripheral chips will be wire-ORed to /INT signal. /INT pins are open drain/open collector, so all that's needed is a pull up resistor, which is likely already present on CPU's /INT pin.

PIO has only one interrupt vector, and as you stated, the interrupt handler will need to read PIO ports to figure out the source.

This approach of using PIO has several drawbacks:
1. Additional operations required to figure out the interrupt source, and jump to the interrupt service routine accordingly. This adds interrupt latency and increases software complexity
2. No priority handling between different interrupts by PIO. The prioritization theoretically can be done in software, but again, increases the complexity
3. PIO doesn't latch the inputs. If an interrupt pulse had occurred, but the input went back to inactive state before Z80 CPU was able to read PIO port, it wouldn't be possible to determine the source

As I've described in my previous reply, if 4 or less interrupts are needed, Z80 CTC can be used as simple interrupt mode 2 controller. It wouldn't have any of these drawbacks

Re: Z80 interrupt management [message #8804 is a reply to message #8797] Thu, 08 July 2021 08:08 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
I agree it's a trade off. A CTC gives you only four interrupt lines (and that's assuming you don't need some of them for timers). A PIO gives you 16 and requires a few extra cycles to check the source but you can do software priority handling and nesting properly and cheaply, an 8259 needs either lots of glue or you have to ask it like the PIO, but it does some proper priority handling and has minimal help for proper software priority and nesting.

3 is not usually a problem - in fact it's usually a win because you don't then end up executing all the code to query the device and figure out it changed it's mind.

I don't usually bother with IM2 at all - but then if I wanted to run interrupt response critical code I'd use a 68xx/65xx processor Cool

Alan
Re: Z80 interrupt management [message #8807 is a reply to message #8804] Thu, 08 July 2021 09:34 Go to previous messageGo to next message
wsm is currently offline  wsm
Messages: 232
Registered: February 2017
Location: AB, Canada
Senior Member
I think the simplest solution is to just have a hardware IM2 vector generator and there's no need for any software except for the vector table and interrupt handlers. There's also no need for IEI / IEO chains and their associated delays.

/forum/index.php?t=getfile&id=2230&private=0

The '148 generates the INT* signal and during the response the M1* sugnal latches the highest priority interrupt since it occurs before IORQ*. The actual vector is placed on the data bus during the interrupt acknowledge read.

INT7* is the highest priority and if there is any chance of spurious interrupt signals then the INT0* handler needs to verify it's processing a real interrupt. Just to be safe, even if various INT inputs are not used, their vector should probably point to an EI / RETI sequence.
  • Attachment: Capture.PNG
    (Size: 15.92KB, Downloaded 2039 times)
Re: Z80 interrupt management [message #8810 is a reply to message #8807] Thu, 08 July 2021 15:08 Go to previous messageGo to next message
Sergey is currently offline  Sergey
Messages: 236
Registered: October 2015
Location: Portland, OR
Senior Member
wsm wrote on Thu, 08 July 2021 09:34
I think the simplest solution is to just have a hardware IM2 vector generator and there's no need for any software except for the vector table and interrupt handlers. There's also no need for IEI / IEO chains and their associated delays.

/forum/index.php?t=getfile&id=2230&private=0

The '148 generates the INT* signal and during the response the M1* sugnal latches the highest priority interrupt since it occurs before IORQ*. The actual vector is placed on the data bus during the interrupt acknowledge read.

INT7* is the highest priority and if there is any chance of spurious interrupt signals then the INT0* handler needs to verify it's processing a real interrupt. Just to be safe, even if various INT inputs are not used, their vector should probably point to an EI / RETI sequence.
That's quite a simple approach... It appeared to me that it might be possible to implement something like this (or even better) with single SPLD or CPLD. I can give that a try...
Re: Z80 interrupt management [message #8811 is a reply to message #8807] Thu, 08 July 2021 16:06 Go to previous messageGo to next message
lynchaj is currently offline  lynchaj
Messages: 1080
Registered: June 2016
Senior Member
wsm wrote on Thu, 08 July 2021 12:34
I think the simplest solution is to just have a hardware IM2 vector generator and there's no need for any software except for the vector table and interrupt handlers. There's also no need for IEI / IEO chains and their associated delays.

/forum/index.php?t=getfile&id=2230&private=0

The '148 generates the INT* signal and during the response the M1* sugnal latches the highest priority interrupt since it occurs before IORQ*. The actual vector is placed on the data bus during the interrupt acknowledge read.

INT7* is the highest priority and if there is any chance of spurious interrupt signals then the INT0* handler needs to verify it's processing a real interrupt. Just to be safe, even if various INT inputs are not used, their vector should probably point to an EI / RETI sequence.
Of the solutions offered so far, I think this is the most elegant. Very nice. Are there any working examples available? Maybe rig up on an ECB prototyping board? Certainly seems simple enough.

Thanks, Andrew Lynch
Re: Z80 interrupt management [message #8812 is a reply to message #8811] Thu, 08 July 2021 16:45 Go to previous messageGo to next message
wsm is currently offline  wsm
Messages: 232
Registered: February 2017
Location: AB, Canada
Senior Member
I used this successfully on an S100 system in the 70's and a unique multi-processor design in the 80's. However the S100 system (including schematics) has been sold and the MP system and it's documentation no longer exists. More recently I've been including IM2 vectoring similar to this within most of my CPLDs.

This is a quick reconstruction from my grey matter cobwebs and needs to be double checked for pin numbers, polarities etc. as I grabbed components from a CAD library that I rarely use. Likewise it should be pretty easy to breadboard up a prototype to prove it out. Note that this is based on level triggered interrupt conditions versus edge triggering which would require additional logic.
Re: Z80 interrupt management [message #8813 is a reply to message #8812] Thu, 08 July 2021 17:21 Go to previous messageGo to next message
Sergey is currently offline  Sergey
Messages: 236
Registered: October 2015
Location: Portland, OR
Senior Member
Another example of using 8259 + a bit of glue logic here on page 4 of Zilog Z80 Q&A (interesting reading, by the way): http://www.z80.info/zip/ZilogProductSpecsDatabook129-143.pdf
Re: Z80 interrupt management [message #8814 is a reply to message #8813] Thu, 08 July 2021 19:07 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
If you have the system CPLD that controls bank registers and RAM/EPROM decode, it may be possible to map interrupt acknowledge cycle to RAM or EPROM read access thus providing vector number from RAM or EPROM. This may be a low cost way of doing mode 2 interrupt. This is just a thought, I have not done much interrupt designs--CP/M works just fine without interrupt.
Bill
Re: Z80 interrupt management [message #8815 is a reply to message #8814] Fri, 09 July 2021 03:31 Go to previous messageGo to next message
little_john is currently offline  little_john
Messages: 4
Registered: October 2019
Junior Member
This is from the 1983 ETI Project 'Marvin' - it uses a '373 and '30. Cap is 1nF, R's are 1K.

https://images2.imgbox.com/bb/d1/38apr5je_o.jpg
Re: Z80 interrupt management [message #8824 is a reply to message #8815] Fri, 09 July 2021 21:51 Go to previous messageGo to next message
b1ackmai1er is currently offline  b1ackmai1er
Messages: 396
Registered: November 2017
Senior Member
@Sergey

This is exactly the information I was looking for, to solve a puzzle with my DMA board. Thank you!

/forum/index.php?t=getfile&id=2236&private=0



  • Attachment: dmanotes.png
    (Size: 401.21KB, Downloaded 1888 times)
Re: Z80 interrupt management [message #8827 is a reply to message #8811] Sat, 10 July 2021 06:45 Go to previous messageGo to next message
coredump is currently offline  coredump
Messages: 33
Registered: January 2020
Location: Germany
Member
lynchaj wrote on Fri, 09 July 2021 01:06

Of the solutions offered so far, I think this is the most elegant. Very nice. [...]

Thanks, Andrew Lynch
Indeed!
If You want to use it in Your Z80 Multi Board design with this circuit on a different board than the CPU board You may want to address a minor glitch I probably found in the schematic first:

The A->B input (Pin 1) of the data bus driver U6 is driven by the /RD line of the processor.
Since the Z80 seems not to assert his /RD line during an IACK cycle IM0 & IM2 might not work as expected.

Just in case it comes to a redesign of the processor board You might find the '541 a useful replacement to the '244 to have a more simple layout job.

Best Regards
Detlef
Re: Z80 interrupt management [message #8832 is a reply to message #8827] Sat, 10 July 2021 12:44 Go to previous messageGo to next message
lynchaj is currently offline  lynchaj
Messages: 1080
Registered: June 2016
Senior Member
Hi,
OK, great catch. I did not know that. What I am thinking is to add the hardware IM2 interrupt vector to a respin of the Z80 processor board. Originally I was thinking to add a local CPU oscillator but if there is limited space available I think the interrupt circuit would be more useful. Tie the interrupt handler hardware directly to the CPU and skip routing interrupts through the backplane.

Thanks, Andrew Lynch

Re: Z80 interrupt management [message #9122 is a reply to message #8807] Mon, 13 September 2021 15:22 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 385
Registered: October 2015
Location: Fallbrook, California, US...
Senior Member
Hi Folks,

Andrew has implemented Bill's IM2 circuit below in his latest version of the MBC CPU board. I am now trying to get it to work and I seem to be stumped. The /INT signal is firing just fine (I can run the whole thing in IM1 with no trouble). However, under IM2, my system seems to jump to an unexpected location. The code handles the first 16 IM2 vectors and is known to work well on several other platforms.

I have attached a logic analyzer snapshot below. S0-S2 correspond to A0-A2 in the schematic (inputs to '373). D1-D3 are the outputs of the '373. During /INTA, D1-D3 do not seem to follow S0-S2 as I would expect. Hard to tell with a logic analyzer, but I suspect the outputs are floating and causing the vector read by the CPU to be something totally unexpected.

Anyone have any ideas on this?

Thanks!

Wayne

/forum/index.php?t=getfile&id=2407&private=0


wsm wrote on Thu, 08 July 2021 09:34
I think the simplest solution is to just have a hardware IM2 vector generator and there's no need for any software except for the vector table and interrupt handlers. There's also no need for IEI / IEO chains and their associated delays.

/forum/index.php?t=getfile&id=2230&private=0

The '148 generates the INT* signal and during the response the M1* sugnal latches the highest priority interrupt since it occurs before IORQ*. The actual vector is placed on the data bus during the interrupt acknowledge read.

INT7* is the highest priority and if there is any chance of spurious interrupt signals then the INT0* handler needs to verify it's processing a real interrupt. Just to be safe, even if various INT inputs are not used, their vector should probably point to an EI / RETI sequence.
  • Attachment: Capture.PNG
    (Size: 37.90KB, Downloaded 1735 times)
Re: Z80 interrupt management [message #9123 is a reply to message #9122] Mon, 13 September 2021 16:27 Go to previous messageGo to next message
wsm is currently offline  wsm
Messages: 232
Registered: February 2017
Location: AB, Canada
Senior Member
I should probably duck on this one as I previously said that circuit was reconstructed from the cobwebs in my grey matter. For layout convenience I probably should have shown a '573.

My real question would be why D3 remains low versus the expected high from S2. Some thoughts:
- Possibly a bad '373 chip
- Another circuit driving D3 plus ? during /M1 or /IORQ. Note that all I/O in the system must be qualified by /IORQ AND NOT /M1.

It's also kind of weird to me that S1 is following D1. S1 hould be based on the interrupt request inputs to the '148 and I would not expect to see that kind of cyclic change.

I find my oscilloscope can be handy when looking at this kind of thing. If there's signal contention it should be pretty obvious as a midrange value between high and low and possibly as spikes on the supply rail.
Re: Z80 interrupt management [message #9124 is a reply to message #9123] Mon, 13 September 2021 16:45 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 385
Registered: October 2015
Location: Fallbrook, California, US...
Senior Member
Thank you for the fast response Bill!

wsm wrote on Mon, 13 September 2021 16:27

My real question would be why D3 remains low versus the expected high from S2. Some thoughts:
- Possibly a bad '373 chip
- Another circuit driving D3 plus ? during /M1 or /IORQ. Note that all I/O in the system must be qualified by /IORQ AND NOT /M1.

I was wondering about a bad chip. I didn't think I had a spare '373, but it turns out that I do. I will try swapping.

Good point about contention with other I/O in the system. I will review that.


wsm wrote on Mon, 13 September 2021 16:27
It's also kind of weird to me that S1 is following D1. S1 should be based on the interrupt request inputs to the '148 and I would not expect to see that kind of cyclic change.

Hmmm... yes, I didn't notice that. Makes no sense.

wsm wrote on Mon, 13 September 2021 16:27
I find my oscilloscope can be handy when looking at this kind of thing. If there's signal contention it should be pretty obvious as a midrange value between high and low and possibly as spikes on the supply rail.

Maybe this is the excuse I need to finally get one of those... 🙂

-Wayne
Re: Z80 interrupt management [message #9125 is a reply to message #9123] Mon, 13 September 2021 16:57 Go to previous messageGo to next message
lynchaj is currently offline  lynchaj
Messages: 1080
Registered: June 2016
Senior Member
Hi

This is the circuit I implemented in Z80 processor V2 for IM2. Hopefully I did this right. I have gone over it many times looking for errors. Also the datasheets for 74ls148 and 74ls373. I qualify all IO with IORQ# OR (NOT M1#) to filter out interrupt acknowledges (only enabled during non-INTA# IO requests).

Thanks, Andrew Lynch

/forum/index.php?t=getfile&id=2408&private=0
Re: Z80 interrupt management [message #9126 is a reply to message #9124] Mon, 13 September 2021 17:27 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 385
Registered: October 2015
Location: Fallbrook, California, US...
Senior Member
So, I bent the legs of '373 D1-3 outputs out of the socket and tried again. Now, D1-D3 follow S0-S2 perfectly. So... sounds like there is indeed signal conflict on the data lines.

Thanks for pointing me in the right direction Bill. I briefly reviewed the schematics of the boards and they all appear to use both /IORQ and ~/M1 as appropriate. I will work with Andrew on this.

-Wayne
Re: Z80 interrupt management [message #9127 is a reply to message #9126] Mon, 13 September 2021 19:13 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 385
Registered: October 2015
Location: Fallbrook, California, US...
Senior Member
The problem is resolved. The output of the '373 was on the bus side of a '245. The '245 was not passing data in the right direction during interrupt acknowledgement. Andrew had me bypass the '245 and everything worked.

Thanks for all the help!

-Wayne
Re: Z80 interrupt management [message #9128 is a reply to message #9127] Wed, 15 September 2021 08:35 Go to previous messageGo to next message
lynchaj is currently offline  lynchaj
Messages: 1080
Registered: June 2016
Senior Member
Hi

Based on our testing of the IM2 circuit on the updated Z80 processor V2 board, I'm making some improvements to the design to better accommodate interrupts. Please see the attached schematic. There are two main changes; first, an update to the data bus transceiver (74ls245) to change direction based on either RD# or INTA# to bring backplane data bus info into the CPU. Second, a further qualification to the 74ls373 output enable to only respond to INTA# and INT-IM2# (IM2 interrupts from the 74ls148).

The purpose of these changes is to place all the IM2 vectors (or IM0 op codes) on the backplane data bus and so the bus transceiver gate to allow those into the CPU. Also eliminate bus contention from the 74ls373 by limiting it's output to only respond to interrupts it receives through the external connector and 74ls148.

One thing I am concerned about is to prevent the IM2 circuit from interfering with DMA cycles. I added a pull up resistor to IORQ# to keep it high during it's tristate phase while DMA is active. M1# does not tristate so it *should* be either high or low at all times and high during DMA cycles. Regardless, INTA# should not be active during DMA cycles but if you detect any interference with the interrupt during DMA please let me know.

Comments, questions, all appreciated. Thanks, Andrew Lynch

PS, one thing I really like about the IM2 circuit is it gives non-Zilog peripherals like the 16C550 UART to use IM2 mode. That's really handy because you can have multiple devices using interrupts without the post-interrupt polling you'd need if using multiple devices in IM1 mode. A much simpler and quicker interrupt response since when it arrives you know what sent it immediately.

[Updated on: Wed, 15 September 2021 08:39]

Report message to a moderator

Re: Z80 interrupt management [message #9129 is a reply to message #9128] Thu, 16 September 2021 11:56 Go to previous message
lynchaj is currently offline  lynchaj
Messages: 1080
Registered: June 2016
Senior Member
Hi, regarding the above schematic, the plan is to support IM1 and IM2 for certain but is there anything else needed to support IM0? IM0 = Interrupt along with instruction op code pushed onto the data bus. Since the Z80 processor V3 won't support IM0 intrinsically although in theory a board on the backplane bus could use IM0 and I would like this board to also keep that possibility open. Thanks, Andrew Lynch
Previous Topic: Building a Z80 MBC system
Next Topic: upd7220 CPLD/FPGA project


Current Time: Mon Mar 24 22:32:13 PDT 2025

Total time taken to generate the page: 0.05381 seconds