[comp.unix.microport] Using AST 4port or clone on uPort

makela@tukki.jyu.fi (Otto J. Makela) (05/15/89)

In article <701@tukki.jyu.fi>, makela@tukki.jyu.fi (Otto J. Makela) says:
>I recently got a (supposedly accurate) clone of a AST 4port card. [...]
>The uPort manual says to use for example
>	ttypatch -t6 -i7 -a416 -n4 -v0x1bf -m0
>and to take care that the card is in the enhanced (enchanted ?)
>mode and that "shared interrupts are disabled (SW 3-3)".
>The enhanced mode is easy, the opposite is that the card is COM1,
>COM2 and two non-standard ports.  But I'm not sure about the
>shared interrupt stuff (disturbingly, the card I have has only one
>DIP switch) ?
>[...] (the machine has both COM1 and COM2 on the mother board).
[plus what happened, how it didn't work...]

I now know why it does not work.  The small print on the release document
states that IRQ's cannot be shared by different cards.  When I disabled
the motherboard COM2 and used IRQ3, all worked ok.  The big question now
is, how does one define "different cards" ?

I have a card which has 8 RS-232 ports.  All these ports are identical with
the basic PC RS ports.  This 8fold monster can be configured to be COM1, COM2,
COM3, COM4 + 4 nonstandard ports, or as 8 nonstandard ports with a few
variations.  Each port can be set to produce IRQ3 or IRQ4.  I guess they are
logically on "different cards", since they are totally independent ?

The question about shared interrupts still stands.  What do the card settings
have to do with the interrupt mechanism ?

Otto J. Makela (with poetic license to kill), University of Jyvaskyla

InterNet: makela@tukki.jyu.fi, BitNet: MAKELA_OTTO_@FINJYU.BITNET
BBS: +358 41 211 562 (V.22bis/V.22/V.21, 24h/d), Phone: +358 41 613 847
Mail: Kauppakatu 1 B 18, SF-40100 Jyvaskyla, Finland, EUROPE

plocher%sally@Sun.COM (John Plocher) (05/16/89)

In article <705@tukki.jyu.fi> makela@tukki.jyu.fi (Otto J. Makela) writes:
>the motherboard COM2 and used IRQ3, all worked ok.  The big question now
>is, how does one define "different cards" ?

The answer requires a bit of understanding as to how interrupts work on
the PC/AT/386 bus.


First, lets look at the circuit that IBM used to drive the BUS level
IRQ lines:

      (+5v) -------+
                   |
	      [Transistor]
             /     |
  <control> <	   +-------------> IRQ
             \     |
	      [Transistor]
                   |
      (gnd) -------+

The "control" is used to make sure that only one of the transistors
(switches) is on at a time. i.e.,

      (+5v) -------+
                   |
             	   +-------------> IRQ

      (gnd) -------+

    -or-

      (+5v) -------+

  		   +-------------> IRQ
                   |
      (gnd) -------+


This works well when only ONE circuit is used on a single line.
When you try to use more than one, though, you get:

      (+5v) -------+-------+
                   |       |
             	   +-------+-----> IRQ

      (gnd) -------+-------+

(Both in the same state - no problem)

      (+5v) -------+-------+
                   |
             	   +-------+-----> IRQ
                           |
      (gnd) -------+-------+

(each in a different state - a big mess.  Note the "short" between
the +5v line and gnd? - the IRQ is at an indeterminate state - it even
could be smoking :-)


Normally, each CARD will have ONE of these circuits on it, so the
directions say "one card per IRQ".  Cards that have several
ports on them usually have one driver circuit per IRQ line,
and the on-board electronics takes care of gating the "I want to
generate an interrupt" signals from the ports together before 
the driver circuit sees them.  This means that you could have
an 8 port card with 4 ports using IRQ3; the BUS level IRQ signal
is generated by only ONE IRQ driver circuit.


  -John Plocher 

sl@unifax.UUCP (Stuart Lynne) (05/16/89)

In article <104933@sun.Eng.Sun.COM> plocher@sun.UUCP (John Plocher) writes:
>In article <705@tukki.jyu.fi> makela@tukki.jyu.fi (Otto J. Makela) writes:
>>the motherboard COM2 and used IRQ3, all worked ok.  The big question now
>>is, how does one define "different cards" ?

>Normally, each CARD will have ONE of these circuits on it, so the
>directions say "one card per IRQ".  Cards that have several
>ports on them usually have one driver circuit per IRQ line,
>and the on-board electronics takes care of gating the "I want to
>generate an interrupt" signals from the ports together before 
>the driver circuit sees them.  This means that you could have
>an 8 port card with 4 ports using IRQ3; the BUS level IRQ signal
>is generated by only ONE IRQ driver circuit.

Generally this is correct. 

Notwithstanding some manufacturers still get it wrong. For example with the
AST Advantage. It has two serial ports, COM1 and COM2. This can be enabled
as none, one or two. Also with some options on where to send the interrupts.
But you must send them to separate IRQ lines. You can't double them up!!!

So be careful. While you can usually assume that multiple ports on a
single card can be mapped to a single IRQ, you sometimes can be screwed up.

On the other hand if the manufacture takes care he can allow you to have
multiple cards on one IRQ. For example the Bell Tech Hub 6 allows up to four
boards all using one IRQ. Each card has a switch to tell it whether to
ground the signal. Only one should be turned on. 

The only problem with high number of serial ports on a single interrupt is
that it takes significant amounts of time to check all of the ports to
verify that they didn't generate the interrupt.


-- 
Stuart.Lynne@wimsey.bc.ca uunet!van-bc!sl 604-937-7532(voice) 604-939-4768(fax)

zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) (05/18/89)

>
>On the other hand if the manufacture takes care he can allow you to have
>multiple cards on one IRQ. For example the Bell Tech Hub 6 allows up to four

While this is nice to have, I've found that the AT bus usually has 
enough extra interrupts to make sharing unnecessary.  Look into 
running a wire wrap wire from your serial card over to a 16 bit cards 
interrupt lines (perhaps int 10 and 15).  Then use software that 
allows you to use any free interrupt for the asy ports (like Jim Murray 
posted).  

-- 
  Jon Zeeff			zeeff@b-tech.ann-arbor.mi.us
  Ann Arbor, MI			sharkey!b-tech!zeeff

dpgerdes@osiris.cso.uiuc.edu (05/19/89)

/* Written 10:12 am  May 12, 1989 by makela@tukki.jyu.fi in osiris.cso.uiuc.edu:comp.unix.microport */
/* ---------- "Using AST 4port or clone on uPort" ---------- */
I recently got a (supposedly accurate) clone of a AST 4port card.
As the uPort manuals claimed that this "dumb" card was supported
by uPort (using special parameters of ttypatch), I assumed that
installing it would be a breeze :-)  No such luck.

The uPort manual says to use for example
	ttypatch -t6 -i7 -a416 -n4 -v0x1bf -m0
and to take care that the card is in the enhanced (enchanted ?)
mode and that "shared interrupts are disabled (SW 3-3)".
The enhanced mode is easy, the opposite is that the card is COM1,
COM2 and two non-standard ports.  But I'm not sure about the
shared interrupt stuff (disturbingly, the card I have has only one
DIP switch) ?  Also, I (stupidly ?) assume that there is no magic
connected with using tty06, so I specified -t2 in place of -t6, so
as to not have missing tty numbers in-between (the machine has
both COM1 and COM2 on the mother board).

However, I bravely plugged the card in and ttypatched and rebooted.
The classic "cp /etc/passwd /dev/tty02" test did not work.  When
connecting a terminal to the port, I got a response to the FIRST
return key, nothing after that.
I tried several other IRQ lines after that, including IRQ2...IRQ5,
but none worked any better.

From the ttypatch manual page I understand that the 4port needs to
have it's status port read after every interrupt, this is what the
-v0x1bf means.  Could this mean that the system is not actually
doing that (I checked with ttypatch -t# -d, I did key the command in
correctly) ?

Anyone have ideas ?
Otto J. Makela (with poetic license to kill), University of Jyvaskyla

InterNet: makela@tukki.jyu.fi, BitNet: MAKELA_OTTO_@FINJYU.BITNET
BBS: +358 41 211 562 (V.22bis/V.22/V.21, 24h/d), Phone: +358 41 613 847
Mail: Kauppakatu 1 B 18, SF-40100 Jyvaskyla, Finland, EUROPE
/* End of text from osiris.cso.uiuc.edu:comp.unix.microport */

dpgerdes@osiris.cso.uiuc.edu (05/19/89)

  Sorry for the previous blunder.  I have been hitting the wrong keys
lately.