home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 36 Tips / 36-Tips.zip / INITER.FAX < prev    next >
Text File  |  1994-12-11  |  13KB  |  275 lines

  1. Interrupt Settings, AT BUS Machines      8/12/94
  2.  
  3.   OSINITER.FAX
  4.  
  5. INFORMATION REGARDING INTERRUPTS AND OS/2 2.0 IN AT BUS SYSTEMS
  6. ---------------------------------------------------------------
  7.  
  8.   INTERRUPT PROBLEMS ON AN ISA SYSTEM
  9.  
  10.   On an ISA system, having a shared interrupt-request line can cause problems.
  11.   ISA systems have what are called "edge triggered" interrupts whereas Micro
  12.   Channel and EISA systems use "level sensitive" interrupts.  "Edge triggered"
  13.   interrupts can only be sensed for a very short period of time.  If a second
  14.   interrupt arrives from another adapter while the first interrupt is still
  15.   being processed, the second interrupt will be lost.  In your computer system,
  16.   this situation can lead to various difficulties such as printers that do not
  17.   seem to print smoothly or reliably, or communications sessions where some
  18.   characters are getting lost.
  19.  
  20.   However, with single-tasking systems such as DOS, the two adapters that are
  21.   sharing the interrupt might never cause any real problems because they might
  22.   never be in use at the same time.  OS/2 2.0, however, presents a different
  23.   set of problems.  If you have multiple serial communications adapters, there
  24.   is a greater probability that you might try to use two or more of them at the
  25.   same time.  If some of them have previously been set up using shared
  26.   interrupts, problems can occur that probably didn't happen in DOS.
  27.  
  28.   OS/2 2.0 can detect that an interrupt line is shared and will not allow
  29.   simultaneous use.  Assume that COM1 and COM3 are sharing Interrupt Request
  30.   line 4 (IRQ4).  If you try to use both COM ports at the same time, the OS/2
  31.   operating system will not allow the second one to start.  A well-written OS/2
  32.   communications program will recognize that the port cannot be opened and an
  33.   error message will be displayed.  A DOS application, however, is unprepared
  34.   to respond to this unfamiliar situation.  It will probably suspend, waiting
  35.   for the port that will not open.
  36.  
  37.   Another potential source of trouble is having multiple hardware adapters that
  38.   are sharing the same I/O address.  The various hardware adapters in your
  39.   computer must have their own addresses.  Consider what might happen, for
  40.   example, if the commands that were meant for your printer were instead routed
  41.   to your disk drive.
  42.  
  43.   The solution for all of these problems is to ensure that all your hardware
  44.   adapters have their own unique I/O addresses and IRQ assignments.
  45.  
  46.  
  47.   COM3 OR COM4 SUPPORT ON AN ISA SYSTEM
  48.  
  49.   The original ISA machine (the IBM PC-AT) allowed for the definition of up to
  50.   four serial communication ports.  However, there has never been any hardware
  51.   architectural standard that defined the I/O port addresses or Interrupt
  52.   Request (IRQ) lines associated with communication ports 3 or 4.
  53.  
  54.   Over the years, a convention has developed that places the port addresses for
  55.   COM3 and COM4 at 03E8 and 02E8 respectively.  This is a generally accepted
  56.   convention, but not a standard.  Check the documentation and the settings of
  57.   the adapters in your system to verify your hardware environment.
  58.  
  59.   After you have checked and set the I/O and IRQ values on your COM ports or
  60.   internal modems, you must add this information to the communications
  61.   device-driver (COM.SYS) statement in the CONFIG.SYS file.
  62.  
  63.   You might also need to tell your communications application software where
  64.   the COM ports are.  ProComm software, for example, has a configuration screen
  65.   that enables you to specify these settings.  If the application, operating
  66.   system, and hardware are not in agreement, then the application will not run.
  67.  
  68.   OS/2 COM ports do not need to be defined in sequence.  It is acceptable to
  69.   have a COM4 without having a COM3.  DOS, however, might have difficulty if
  70.   there is a gap in the port definition.  To avoid confusion for DOS, you can
  71.   define COM ports that do not have any physical adapters attached in the
  72.   COM.SYS statement.  These substitute definitions will serve as placeholders.
  73.   COM1 and COM2 are assumed to have standard values and do not need to be
  74.   explicitly set up unless you want to set some non-standard values to
  75.   accommodate your particular configuration.
  76.  
  77.   To enable COM3 or COM4 on an ISA system, place the following in the
  78.   CONFIG.SYS file:
  79.  
  80.     DEVICE=X:\OS2\COM.SYS (n,a,i) (n,a,i)
  81.  
  82.   where
  83.  
  84.    X = the drive where OS/2 is installed
  85.    n = the COM port that you are attempting to access
  86.    a = communications port I/O address (03E8, 02E8, for example)
  87.    i = IRQ level, which is usually a jumper setting on the I/O adapter
  88.  
  89.   For example, to specify that COM3 is at address 03E8 on IRQ5 and that COM4 is
  90.   at address 02E8 on IRQ10, use the following statement (assuming that OS/2 is
  91.   installed on drive C):
  92.  
  93.           DEVICE=C:\OS2\COM.SYS (3,03E8,5) (4,02E8,10)
  94.  
  95.   The I/O address and IRQ level should be noted in the documentation that came
  96.   with your adapter.  Either or both might be fixed values or can be set to a
  97.   range of values via jumpers or switches.  In some cases you might find that
  98.   the values are fixed or that the range of settings available to you is
  99.   insufficient to avoid the sharing conflict.  In that case, you must purchase
  100.   a different, more versatile adapter or accept that you cannot use both
  101.   adapters at the same time.
  102.  
  103.  
  104.   SETTING THE INTERRUPT REQUEST (IRQ) LEVEL ON AN ISA SYSTEM
  105.  
  106.   The following information will help you determine what IRQ settings you can
  107.   use for COM3 or COM4 port adapters to avoid shared interrupts.
  108.  
  109.   On an ISA machine there are a total of 15 IRQ levels available.  Many of
  110.   these are already being used.  Most are already in use because they are the
  111.   the standard settings for the more common devices.  These standard settings
  112.   are as follows:
  113.  
  114.   IRQ LEVEL      DEVICE ASSOCIATED
  115.  
  116.   0              System Timer
  117.  
  118.   1              Keyboard
  119.  
  120.   2              Secondary Interrupt Controller  (see note)
  121.  
  122.   3              COM2 (Serial Communications Port 2)
  123.  
  124.   4              COM1 (Serial Communications Port 1)
  125.  
  126.   5              LPT2 (Parallel Port 2)
  127.  
  128.   6              Diskette
  129.  
  130.   7              LPT1 (Parallel Port 1)
  131.  
  132.   8              Realtime Clock
  133.  
  134.   9              open
  135.  
  136.   10             open
  137.  
  138.   11             open
  139.  
  140.   12             open
  141.  
  142.   13             Math Coprocessor
  143.  
  144.   14             Hard Disk
  145.  
  146.   15             open
  147.  
  148.   NOTE:  On the IBM-AT (ISA bus), the IRQ9 pin is identical with the IRQ2 pin
  149.          on the original IBM-PC.  If you have an older, 8-bit adapter whose
  150.          documentation states that it uses IRQ2, be aware that this will
  151.          actually be interpreted as IRQ9 when plugged into the 16-bit ISA bus.
  152.  
  153.   The IRQ levels shown as "open" have no established, standardized use.  When
  154.   setting the IRQ values on your COM3 or COM4 ports, you are likely to find
  155.   these levels available to use without conflict with some other adapter.
  156.   Furthermore, if you don't have two parallel ports installed, IRQ5 might be
  157.   usable for some other purpose, such as COM3 or COM4.  Be cautious about doing
  158.   this because it might cause a problem later if you decide to install a second
  159.   parallel port.  In addition, some other non-standard device might already be
  160.   using IRQ5.
  161.  
  162.   When trying to manage the IRQ levels of your various hardware adapters to
  163.   avoid conflicts, you may find that your 8-bit adapters cause problems.
  164.   Except for IRQ9, only 16-bit adapters are configurable to use IRQ levels
  165.   higher than 7.  A glance at the IRQ table will also show that the
  166.   low-numbered IRQ lines already have some standard function assigned.  It
  167.  
  168.   might be that your only alternative for avoiding some IRQ conflicts is to
  169.   purchase a more versatile 16-bit adapter.
  170.  
  171.   If you have non-standard 8-bit adapters, be especially careful of interrupt
  172.   conflicts.  For example, the SoundBlaster adapter is configured at the
  173.   factory to use IRQ7.  IRQ7, however, is the standard assignment for LPT1, the
  174.   first printer port.  This conflict might not be apparent with DOS because DOS
  175.   printing typically does not use the interrupt line.  OS/2 2.0, however,
  176.   requires it, and the hidden conflict can become the source of printing
  177.   problems.  It is also fairly common to discover that the interrupt feature on
  178.   your parallel port adapter does not work.  In DOS, this might not have any
  179.   effect.  In OS/2 2.0, however, your printer might be very erratic or not work
  180.   at all.
  181.  
  182.   Under OS/2 interrupts can not be shared.  Results are unpredictable if
  183.   interrupts are shared.  Sharing interrupts is not a problem under DOS.  It is
  184.   possible for devices that are sharing interrupts to work perfectly under DOS
  185.   and have problems under OS/2.
  186.  
  187.   (Note:  On the IBM-AT (ISA bus) the IRQ9 pin is identical with the IRQ22 pin
  188.   on the original IBM-PC.  If you have an older, 8-bit adapter whose
  189.   documentation states that it uses IRQ2 then be aware that this will actually
  190.   be seen as IRQ9 when plugged into the 16-bit ISA bus.)
  191.  
  192.   If multiple hardware adapters of any kind (not just communications) are using
  193.   the same IRQ level then the effect on your computer will be unpredictable.
  194.   However, with single tasking systems like DOS, the two adapters which are
  195.   sharing the interrupt may never cause any problems since they may never be in
  196.   use at the same time.
  197.  
  198.   OS/2, however, presents a different set of problems.  If we have two, three or
  199.   four adapters, the probability is now high that they are used at the same
  200.   time.  If some of adapters had been set up using shared interrupts then the
  201.   scene is set for mysterious things to occur in OS/2.
  202.  
  203.   OS/2 can, however, detect that an interrupt line is shared and will disallow
  204.   the simultaneous use.  Assume that COM1 and COM3 were sharing IRQ4 (a fairly
  205.   common real situation).  If we tried to use both COM ports at the same time
  206.   OS/2 would refuse to allow the second one to start.  A well written OS/2
  207.   communications program would see and report the error from OS/2 that the port
  208.   could not be opened.  A DOS application, however, will likely be unprepared to
  209.   respond to this strange situation and it may simply hang there waiting forever
  210.   for the port that will never open.
  211.  
  212.   The solution for all of this is to make sure that all of your hardware
  213.   adapters have their own unique I/O addresses and IRQ assignments.
  214.   Unfortunately, on an ISA machine, OS/2 has no way to query the computer to
  215.   find out what these settings are.  Therefore, after checking and setting the
  216.   adapters according to the instruction manuals you must also tell OS/2 what
  217.   you've done by placing explicit information into the CONFIG.SYS file.
  218.  
  219. TO SUMMERIZE
  220. ------------
  221.  
  222.         *) Even though there is some flexibility for Printer &
  223.            Comm. port assignment try to stick to the standard
  224.            assignment as shown in IRQ table at the beginning
  225.            of document.
  226.  
  227.         *) Available interrupts, in order of priority, are:
  228.            IRQ10, IRQ11, IRQ12, IRQ15, IRQ3 (if not used
  229.            for COM2), and IRQ5 (if not used for LPT2).
  230.  
  231.         *) Addresses and interrupts can be assigned in OS2
  232.            to comm ports as described in info apar II06069.
  233.            Standard assigment is as follows:
  234.                 COM1 - 3F8 - IRQ 4 (default)
  235.                 COM2 - 2F8 - IRQ 3 (default)
  236.                 COM3 - 3E8
  237.                 COM4 - 2E8
  238.            There is no OS/2 default setting for COM3 and
  239.            COM4. It must be specified by the device=com.sys
  240.            statement in config.sys.
  241.  
  242.         *) Printer port addresses and IRQ levels are hardcoded
  243.            in OS/2 as follows:
  244.                 3BC and 378     ==> IRQ7 (LPT1)
  245.                 278             ==> IRQ5 (LPT2)
  246.            Unlike the the comm ports, where the addresses
  247.            and the interrupts can be modified by the
  248.            device=com.sys in config.sys, the printer port
  249.            addresses and IRQ shown above are fixed.
  250.            OS2 assigns LPT1 to the highest printer port address
  251.            being used. The printer address is specified in the
  252.            printer adapter board.
  253.            With OS/2 you can not use both addresses 3BC and 378
  254.            as printer port addresses. Both LPTs would be sharing
  255.            IRQ7.
  256.            Unlike DOS, OS/2 uses interrupts for printing.
  257.            The interrupt is triggered by a signal line from
  258.            the printer, ACK. If the IRQs are not configured
  259.            correctly, or the printer cable is missing the ACK
  260.            line the printer may work under DOS and
  261.            have problems under OS/2.
  262.  
  263.            An example of address and interrupt assignment is
  264.            follows:
  265.                    COM1 - 3F8,IRQ4
  266.                    COM2 - 2F8,IRQ3
  267.                    COM3 - 3E8,IRQ5 (IRQ5 not being used by lpt2)
  268.                    COM4 - 2E8,IRQ10
  269.  
  270.                    LPT1 - 378,IRQ7
  271.  
  272.         *) If interrupt devices are occasionally losing data,
  273.            try moving to a higher priority unused interrupt.
  274. 12/31/99
  275.