At 06:01 PM 20/01/1997 +0200, you wrote: [snip] > >On my PC I have 4 COM ports, and I can set the IO card to what I want, but >95 insist that COM3 stay on IRQ4, and COM4 on IRQ5. (Useless info : When I >stick a modem on COM4 it talks to it, but the modem response isn't seen.) If >however, I stick it on COM3, the same IRQ as COM1, my mouse, using the modem >makes the mouse hang up. If I stick PIC comms there, the mouse hangs up, but >the PIC talk isn't received unless you move the mouse ! > >On my laptop, there is only a COM1 (trackball is COM2). Sticking the PIC >there works all the time without fail. > >Has anyone got any comments on how/why/whether my deductions are incorrect ? > >Jan van der Watt It goes like this. By default (in software and therefore to some extent hardware), COM1 is always on IRQ4, COM2 is always on IRQ3. Then if you add a COM3 it piggybacks onto IRQ4 and COM4 piggybacks onto IRQ3. Many of the Com and modem boards cannot accept any other assignment for IRQs. There are however four default address groups assigned for the four COM ports. So why won't it work? History and Intel method of handling Interrupts. Conventionally and ideally, an interupt should be active low and pulled high with a resistor and triggered on the level not the edge. Then any interrupting device just has to use an open collector transistor to activiate the interrupt. Software polls each device attached to an IRQ # and handles it all. That is as it _should_ be. On PCs the interrupt is active high, edge triggered, and some cards leave it high and then pulse it low. When pulsed it returns to the dormant high state which causes the interrupt. The PIC (Programmable Interrupt Controller) then ignores that edge (yes edge triggered, not level triggered) until the next pulse to low and then high again. Some cards use an active device to pull the line high and others tri-state the IRQ output and then un-tri-state it to cause the int. (the input to the tri-state driver is hardwired to the appropriate logic level - inverting or non-inverting tristate driver). As you can imagine, this makes for a difficult interrupt sharing arrangement because if one device causes an interrupt and then another from a different device comes along, only the first will be recognized due to the fact that the edge of the second is masked by the level of the first. In other words, to properly share interrupt lines you need level sensitivity and the polarity of the interrupts on the PC doesn't allow that and so most COM and Modem cards don't support it. reagrdless of WIN-NT, WIN95, WIN3.1, WIN286 or DOS x.xx it just doesn't matter. And you can't expand the interrupts using a third PIC because not all of the signals needed to support one are on the bus. That is why IBM-PC always stood for "Itsy Bitsy Micro - Piece of Crap" Wonderful eh? Best bet is to do what I did and buy a DigiBoard with 4 or 8 extra ports. Takes up one slot but now I can have my external modem on the Digiboard and leave teh two interna ports free for old software that doesn't know about COM3, COM4 ... John Pioneers are the ones, face down in the mud, with arrows in their backs. Automation Artisans Inc. Ph. 1-250-544-4950 PO Box 20002 Fax 1-250-544-4954 Sidney, BC CANADA V8L 5C9