Slave PIC not fireing

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
wndproc
Posts: 20
Joined: Sat Feb 02, 2008 3:02 pm
Location: Austria

Slave PIC not fireing

Post by wndproc »

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:

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
I've made a standard routine for interrupts 0 through 255.

And, for testing reasons, I've enabled every IRQ but the timer:

Code: Select all

	out(0x21, 0x01);
	out(0xA1, 0x00);
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]
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

do you even get an initial IRQ fire? because if you get one, and never get another, then you are not ACK'ing the PIC.
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Re: Slave PIC not fireing

Post by Korona »

wndproc wrote:no CGA vertical retrace, no CMOS Real time clock
Did you enable those devices? They don't fire interrupts until you tell them to do so.
wndproc
Posts: 20
Joined: Sat Feb 02, 2008 3:02 pm
Location: Austria

Post by wndproc »

my ISR is currently blanking the whole screen, so I would definitely recognize any interrupt.
Unfortunately, I don't get any.
wndproc
Posts: 20
Joined: Sat Feb 02, 2008 3:02 pm
Location: Austria

Post by wndproc »

Did you enable those devices? They don't fire interrupts until you tell them to do so.
You mean, the v-retrace aswell as the cmos clock need initialization?

If that's the case I feel pretty stupid about blaming the slave PIC.
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

=)
the RTC needs the (UI) bit set to enable update interrupts, there are other bits that do various interrupt routines, but their names elude me.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

The vsync interrupt is not present on standard VGA hardware. You need a really old machine to get it (and no, a 386 is *not* old enough)
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply