Path: utzoo!attcan!uunet!munnari.oz.au!bruce!monu1!vaxc!phs207k From: phs207k@vaxc.cc.monash.edu.au Newsgroups: comp.sys.ibm.pc.hardware Subject: HELP NEEDED WITH IBM AT (286) INTERRUPTS!!! Message-ID: <46762.26f56b86@vaxc.cc.monash.edu.au> Date: 17 Sep 90 14:34:14 GMT Organization: Computer Centre, Monash University, Australia Lines: 39 I've been trying to build some hardware external to an AT and I need this hardware to interrupt the pc at a fairly high frequency (approx 3000Hz). Now looking at the mother board manual for the 80286 I found interrupt lines 10, 11 and 12 are free on the slave 8259A PIC (pins 3,4 and 5 on the D side of the 16 bit expansion slot, although I only need two). So I stuck a wire in pin 4 (IRQ11) that is active high when interrupting and wrote a masm routine that is jumped to when the interrupt is accepted by the 8259A programmable interrupt controller (that is contained within the 82c206 Integrated Peripheral Controller). Ok, I have set up an interrupt vector at 0:1ccH in memory (the table for the slave 8259A) and I have sent commands to the 8259A slave via ports A0H and A1H to unmask the interrupt lines I want to use (OCW1). Do I need to send anything to OCW2 for end-of-interrupt ? or is the default mode ok. Now my outside hardware sends a pulse (that stays high because I haven't worked out a way yet for the computer to kill it once it has recognized the interrupt so I have to do it manually) and sure enough the pc stops executing the main program and jumps off and executes the interrupt routine and even returns to the main program. PROBLEM : After the interrupt has finished the computer refuses to accept any more interrupts from my hardware. Even if the main program terminates successfully, on going back into DOS and trying to use the hard disk (which uses IRQ 14 on the same 8259) the computer crashes. Now multiple interrupts from my stuff shouldn't really be a problem because the interrupt enable flag is cleared automatically in the interrupt routine. I'm basically trying to understand what has been affected to stuff things up when the interrupt has been executed and comes back to the main program. The setting up of the actual int. vectors and the int. mask and checking IS and IR registers in the 8259 do not worry it (ie. I can run the setup program and not crash anything as long as I do not do an actual interrupt). So what is the trick? I have followed all the instructions I can find and tried everything I can think of. What is so hard about getting something outside the PC to interrupt it, run a little program, and then go on with what it was doing? I you need more information then just mail me and I'll be happy to pour out my troubles to you but for me time is running out. HELP!