Slave PIC not fireing
Posted: Fri Jun 06, 2008 11:35 am
Hi everyone,
I've stopped dev'ing for a certain period but now I'm back with the same trouble as before. I have absolutely no troubles with the timer or keyboard IRQs, but I simply don't get any respond from my slave PIC.
Here's where I stand:
I've initialized the PICs with the code that appears everywhere:
I've made a standard routine for interrupts 0 through 255.
And, for testing reasons, I've enabled every IRQ but the timer:
Result:
nothing...
no CGA vertical retrace, no CMOS Real time clock,...
I only get a response on key-down (cause it's a PIC1 IRQ).
Please help, I'm desperately trying to get my v-retrace routine to work.[/quote]
I've stopped dev'ing for a certain period but now I'm back with the same trouble as before. I have absolutely no troubles with the timer or keyboard IRQs, but I simply don't get any respond from my slave PIC.
Here's where I stand:
I've initialized the PICs with the code that appears everywhere:
Code: Select all
out(PIC1_CTRL, 0x11); // Setup PIC1 for initialization
out(PIC2_CTRL, 0x11); // Setup PIC2 for initialization
out(PIC1_DATA, 0x20); // Set interrupt number for IRQ0
out(PIC2_DATA, 0x28); // Set interrupt number for IRQ8
out(PIC1_DATA, 0x04); // Link PIC1 & PIC2 over IRQ2
out(PIC2_DATA, 0x02); // Link PIC1 & PIC2 over IRQ2
out(PIC1_DATA, 0x01); // Prepare for 8086 operation
out(PIC2_DATA, 0x01); // Prepare for 8086 operation
out(PIC1_DATA, 0x00); // Clear data register
out(PIC2_DATA, 0x00); // Clear data register
And, for testing reasons, I've enabled every IRQ but the timer:
Code: Select all
out(0x21, 0x01);
out(0xA1, 0x00);
nothing...
no CGA vertical retrace, no CMOS Real time clock,...
I only get a response on key-down (cause it's a PIC1 IRQ).
Please help, I'm desperately trying to get my v-retrace routine to work.[/quote]