Anthony Ortiz wrote:
> I've read it and I'm still confused. For example, "the interrupt is
>acknowledged and IRQ goes high". Huh? How is it acknowledged? Who
>acknowledges it? What does that mean? Who pulls IRQ high?
Ah, ok. There is a pullup resistor which pulls up the IRQ line, another
the NMI line. Any device which wants to attract attention pulls this
signal to low.
For example: you have several Super Serial Cards in your Apple, means
several 6551. They are configured to generate IRQs when transmitter
buffer is empty and receiver buffer is full. One 6551 has received one
byte: your IRQ service will ask the first 6551 if this is the source of
the interrupt (bit 7 of the status register), if not your IRQ service
will ask the next, ... The first device which is a source of an
interrupt must be serviced. Your IRQ service reads the whole status
register of that 6551 and sees bit 3 is set. The next step is reading
the data from that receiver data register so the IRQ source is
automatically cleared. If there is no more source for an interrupt of
that 6551 bit 7 of the status register is automatically cleared.
The IRQ line is an open drain output, means that several devices can
signal an interrupt condition. After clearing the last IRQ source the
IRQ signal will go high again because of the pullup.
There are a lot of different devices and there a lot of different ways
to clear their IRQ request. The 6551 is easy to understand. Read the