When use two cascading PIC 8259-A, to which one should an IRQ be acknowledged ?
The master only ? The Slave only ? (According to the IRQ #)
Slave first then master (if IRQ # >8) ??
Does somebody got the correct answer ???
PIC 8259-A
Re:PIC 8259-A
If IRQ <7 then just the first will do, otherwise both need the EOI. For simplicity just do both every time. The order doesn't matter and it also doesn't matter if you send an EOI even when there hasn't been an IRQ.
ie at the end of all Hardware ISRs:-
mov ax, 0x20
out 0x20, ax
out 0xA0, ax
Pete
ie at the end of all Hardware ISRs:-
mov ax, 0x20
out 0x20, ax
out 0xA0, ax
Pete
Re:PIC 8259-A
I put this at the end of my ISRs:
Code: Select all
// Re-enable the IRQ line (master channel) //
outportb(PORT_8259_M, EOI);
if ( IRQ >= 8 )
// Re-enable also the IRQ slave channel //
outportb(PORT_8259_S, EOI);