Searching \ for 'Serial port IRQ clashes' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/serials.htm?key=serial
Search entire site for: 'Serial port IRQ clashes'.

Truncated match.
PICList Thread
'Serial port IRQ clashes'
1997\01\20@110140 by Jan van der Watt

flavicon
face
Sorry for being a little slow.....

I vaguely remember a request for (decent) PC based serial comms programs and
the reason for the request was something to do with Windows being
intermittent...

(In all cases the OS is Lose95, I mean Win95, and I used both Hyperterminal
and a VC++ 4.0 demo TTY program to test this with)

Well, I've just spent the whole day staring at RS232 signals wondering why
the hell the PIC wasn't getting its message throught to the PC. Then I tried
it on my uncomplicated LAPTOP.  It seems that when there is more than one
COM port on the same IRQ, you really require the flow control signals to
operate in accordance with the RS232 standard (am I making sense?).

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
[I came, I saw, and what a party we had!]

1997\01\20@115930 by Christopher Zguris

picon face
At 06:01 PM 1/20/97 +0200, you wrote:
[stuff on 4 com ports deleted]

From memory, Com1 & Com3 share an IRQ, and Com2 and Com4 share an IRQ. So,
two devices that are always active (or - at least - require handshaking?)
won't work on the same IRQs (modem and mouse on com1 and com3 won't work,
for example). However, under Win 3.1 the IRQ is _settable_ for each com port
(under ports, click on the port, then click on Advanced). Doing that, you
should be able to move the conflicting Com ports to another IRQ (I know the
modem I installed supports IRQs in addition to the standard ones). I haven't
tried it (much), but doing that should allow for 4 working Com ports. The
only potential problem is an IRQ conflict, but that's easy to troubleshoot
(time-consuming, but not difficult). Once you've figured out what IRQs and
base addr's go with what _write_it_down_. I upgraded a motherboard and had
to move all sorts of stuff around for the ethernet card, modem, etc. Royal
pain in the butt, but us PC-users _like_ pain.

>Jan van der Watt
>[I came, I saw, and what a party we had!]
>
>

Chris

   ======================================================================
         Christopher Zguris  -  spam_OUTczgurisTakeThisOuTspaminterport.net  -  Uhhh, Ear?
                     1991 VFR 750 (with aspalt detailing)
                             IVFROC, HSTA, HRCA
      Lord, grant me the serenity to accept the things I cannot change,
       the courage to change the things I can, and the wisdom to hide
     the bodies of those people I had to kill because they p***ed me off.
   ======================================================================

1997\01\20@121714 by Kalle Pihlajasaari

flavicon
face
Hi Jan,

> 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

Sharing interrupts is not well supported in hadware on standard periferals.
Usually when they 'share' the same interrupt they cannot do this at the same
time and one of the ports has to be inactive.

There might be ways of moving the IRQs to non standard values on W95
if you hack an INI file or something.  I know on NT this is possible even
thought it also suggests the default values.

Obviously this has nothing to do with PICs directly.

Cheers
--
Kalle Pihlajasaari   .....kalleKILLspamspam@spam@ip.co.za   http://www.ip.co.za/ip
Interface Products   P O Box 15775, DOORNFONTEIN, 2028, South Africa
+ 27 (11) 402-7750   Fax: 402-7751    http://www.ip.co.za/people/kalle

DonTronics, Silicon Studio and Wirz Electronics uP Product Dealer

1997\01\20@121920 by myke predko

flavicon
face
>At 06:01 PM 1/20/97 +0200, you wrote:
>[stuff on 4 com ports deleted]
>
>>From memory, Com1 & Com3 share an IRQ, and Com2 and Com4 share an IRQ. So,
>two devices that are always active (or - at least - require handshaking?)
>won't work on the same IRQs (modem and mouse on com1 and com3 won't work,
>for example).

COM1/COM3 - IRQ4 (But, note that it's actually Vector 0x00C)
COM2/COM4 - IRQ3 Not 5 as originally put - Actually Vector 0x00B

>However, under Win 3.1 the IRQ is _settable_ for each com port
>(under ports, click on the port, then click on Advanced). Doing that, you
>should be able to move the conflicting Com ports to another IRQ (I know the
>modem I installed supports IRQs in addition to the standard ones).

I think this is more of a hardware feature unique to your PC that allows
software configuration.  I haven't seen too many PCs (some laptops) that
allow you to change Serial Port Configurations (although in the laptop cases
you have to reboot). I have seen many PCs that allow the user to change the
Port Configuration, but this has to be done from a power-up screen.

>I haven't
>tried it (much), but doing that should allow for 4 working Com ports.

Actually, most (if not all) modern PCs will only allow THREE working COM
ports.  The address space for COM4 (0x02E8-0x02EF) is used for IBM 8514A
compatiblity that's available in most SVGA graphics cards.

This one bit me on the butt big time a few weeks ago.

I'm really surprised at the compatiblity issues you're having (most programs
are pretty good at sorting out/passing along interrupts) and I suspect the
original problem is with where the IRQs were originally set (ie IRQ3 for
COM1) - if they don't follow conventions, typically the software doesn't
know what's going on.

To fix the problem, make sure everything is "Standard" - right now, I am
running my PICSTART Plus on COM1 and Tek 'scope Control Software on COM3.
No problems running them both.

Good luck,

myke

"I don't do anything that anybody else in good physical condition and
unlimited funds couldn't do"

Bruce Wayne

1997\01\20@145019 by Christopher Zguris

picon face
At 12:15 PM 1/20/97 EST, you wrote:
[snip]
>>However, under Win 3.1 the IRQ is _settable_ for each com port
>>(under ports, click on the port, then click on Advanced). Doing that, you
>>should be able to move the conflicting Com ports to another IRQ (I know the
>>modem I installed supports IRQs in addition to the standard ones).
>
>I think this is more of a hardware feature unique to your PC that allows
>software configuration.  I haven't seen too many PCs (some laptops) that
>allow you to change Serial Port Configurations (although in the laptop cases
>you have to reboot). I have seen many PCs that allow the user to change the
>Port Configuration, but this has to be done from a power-up screen.

I installed an internal modem in a friends' 486 a few days ago. I set it as
Com3, then changed the IRQ to one other than the default. On the modem,
there was a jumper. Under Windows 3.1, as I said, under "ports", under
"advanced" I changed the IRQ to match the (non-default) I had set on the
modem. The configuration was changed _under_ Windows and _not_ the powerup
screen. The problem was the motherboard had Com1 & Com2 installed already,
and a PS/2 mouse running from another port (no idea how). I could _not_
control/disable the built-in ports, so I decided to work around them to get
at the modem, and it worked fine. If Win 3.1 can do this, I can't imagine
Win'95 _not_ doing it (possible, I suppose).

Chris

   ======================================================================
         Christopher Zguris  -  czgurisspamKILLspaminterport.net  -  Uhhh, Ear?
                     1991 VFR 750 (with aspalt detailing)
                             IVFROC, HSTA, HRCA
                   "WARNING! System has become unstable!"
                                - Windows 3.1
   ======================================================================

1997\01\20@155144 by John Dammeyer

flavicon
face
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 softare 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 ont the edge.  Then any
interrupting device just has to use an open collector transistor to
activiate the interrupt.  Software then 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.

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).

As you can imagine, this makes for a difficult interrupt sharing arrangement
because 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 sensitive
and the polarity of the PC doesn't allow that and so most COM and Modem
cards don't support it.

That is why IBM-PC always stould for "Itsy Bitsy Micro Piece of Crap"

Wonderful eh?

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

1997\01\20@160014 by John Verberkmoes

flavicon
face
The info from Myke Predko seems to be the most accurate I've seen so far.
Here is some practical info.

------------------------------------------------------
Typically (but not necessarily)
Comm1 and Comm3 ---> Int 4
Comm2 and Comm4 ---> Int 3
------------------------------------------------------
but...
You can set it up differently if you want to.

You set it usually in the CMOS/BIOS setup screen on your PC's or via
jumpers/DIPS on a Comm board.

Now Comm1 and Comm3 "share" an interrupt but "share" is really being
optimistic. For most purposes you really can only use (Comm1 OR Comm3) and
(Comm2 OR Comm4).

Next, you can change interrupts in Windows control panel but it only tells
Windows what interrupt to expect. The hardware will continue to use what it
was set to.

Windoze 95 takes this away but it didn't set the interrupt anyway so we
didn't lose much.

There is a problem with PC's and the allocation of interrupts( there aren't
really enough). They designed the PC so that every stupid device needs its
own interrupt. If you have a Sound card, Network Card and your 2 comm ports
are full you are pretty much done adding hardware (unless you want to get
funky). PS/2 mice help as they use a higher interrupt that is usually free.

To add more serial devices you can use a multiport serial card. These allow
multiple comm ports to use one IRQ ( the hardware in the card makes this
possible).

Bottom line....PC's kinda suck. I don't think IBM was thinking ahead to
Pentium/sound blasters/networks/64MB mem/trackballs/hand scanners/etc...
when they designed the PC. There is help on the way with USB and Firewire
(I hope these work better than Plug and Pray).

1997\01\20@172936 by John Dammeyer

flavicon
face
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

1997\01\21@044205 by John Payson

picon face
> 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.

There are two things that may help those who have a modem and a mouse, and
wish to hook up a PIC as well:

[1] For serial transmission, and for low-speed reception, interrupts are
   not needed.  Note that if you do not use interrupts you must be sure
   to poll the FIFO often enough that you do not miss any characters; on
   a 16C550 this may not be much of an issue, but on the single-FIFO
   units it often helps if your transmitting device doesn't send the data
   too fast [a high baud rate is okay if there is space between the char-
   acters or if it's running in a character-by-character handshaking mode].

[2] On many older multi-I/O cards, it's possible to configure the serial
   port as IRQ5 even if the board was not particularly designed for such.
   In particular, a lot of the older boards have two sets of jumpers that
   look like this:

          3 IRQ 4
 COM-A :  *  *  *
 COM-B :  *  *  *

    and this:

          5 IRQ 7
 LPT:     *  *  *

   On many of these boards, running a wire from the top center pin on the
 former connector to the left pin on the latter will assign COM port A to
 IRQ5.  Unfortunately, many of the newer "high-integration" boards don't
 work with this technique, but I've used 3 com ports on a number of PC's
 without particular difficulty.

1997\01\21@122710 by Derrick Slopey

flavicon
face
At 06:01 PM 1/20/97 +0200, you wrote:
>Sorry for being a little slow.....
>
>I vaguely remember a request for (decent) PC based serial comms programs and
>the reason for the request was something to do with Windows being
>intermittent...

I have been using Qmodem for serial testing with the PIC16C84. It is a DOS
program, but it runs fine under win95. It also has a Hex Debug emulation,
this is a nice feature in a comm program if you're sending non-acsii chars.


Derrick Slopey
Undergraduate
University of Maine
Computer Engineering
.....dslope51KILLspamspam.....maine.maine.edu

1997\01\22@205342 by Wynn Rostek

flavicon
face
At 06:01 PM 1/20/97 +0200, you wrote:


>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 !


I bought a serail add in card (ISA) with two serial ports on it.  I set the card
to use COM3 and COM4 for the I/O addresses and IRQ 11 and IRQ 12 for the
interrupts.  Stuffed the board in, and let windows 95 find the new hard
ware.  It got both the I/O and IRQ settings correct, even though it was not
a plug
and play card.  Port's are up and running.  Do no try to set two UARTS on
the same IRQ, because the 8259 in the PC is set for edge detection, you're sure
to drop one and hang the system.


If you know what you're doing, you can modify the UART board IRQ lines for wired
OR operation, but I suspect this still requires special code in the driver.

Another thing to watch out for is providing stack space for the interrupt
handler.  DOS and the BIOS code don't always have a lot of stack space
availible, so it's best to install a small stack for each UART.  Set aside
the space in the code segment, and you'll have it availible as soon as the
interrupt handler starts running.

I've got a lot of serial code written in C for handling a single serial
port.  After looking at the problems I've started working on a package to
support 4 serial ports written in Turbo Assembler.  Everybody should have
some Serial code in their back pocket to carry around, it's very useful stuff.

EraseMEWB4ZUYspam_OUTspamTakeThisOuTamsat.org

1997\01\24@011727 by jcp

flavicon
face
Heres my 5c worth...
> 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 !
I assume from the behaviour above that you do not have all 4 comm
ports on 1 card.
If they are on different cards, then each port must be on a
different interrupt, so as not to interfere with each other (see
previous mailings on subject)
You can change the Interrupt settings for COM3 and COM4 (and COM1&2
for that matter) from....
Control Panel -> System -> Device Manager -> Ports ->  COMx ->
Properties -> Resources.   (Phew)

I have a Tiawanese miltiport card that works fine, with all ports on
the card sharing the same interrupt (5).
One thing that puzzles me is that all ports have the "Settings Based
On" scroll box set to "Basic Configuration 8", which is different to
all other serial port settings.  Could it be that this is how Win95
works out how to share the interrupt with multiple devices.

HTH
Regards
John

1997\01\24@011727 by jcp

flavicon
face
Heres my 5c worth...
> 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 !
I assume from the behaviour above that you do not have all 4 comm
ports on 1 card.
If they are on different cards, then each port must be on a
different interrupt, so as not to interfere with each other (see
previous mailings on subject)
You can change the Interrupt settings for COM3 and COM4 (and COM1&2
for that matter) from....
Control Panel -> System -> Device Manager -> Ports ->  COMx ->
Properties -> Resources.   (Phew)

I have a Tiawanese miltiport card that works fine, with all ports on
the card sharing the same interrupt (5).
One thing that puzzles me is that all ports have the "Settings Based
On" scroll box set to "Basic Configuration 8", which is different to
all other serial port settings.  Could it be that this is how Win95
works out how to share the interrupt with multiple devices.

HTH
Regards
John

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...