OS/2 

Introduction 
This OS/2 device driver software documentation is for all of the communication 
boards in the DigiBoard PC/X and MC/X series.  The software is a fully 
interrupt-driven, OS/2 API call compatible device driver, and will support up
to 32 serial communication channels. 
 
Board Differences 
The DigiBoard PC/4 and PC/8 boards are nearly identical, the PC/4 merely having 
four fewer channels.  The DIP switch and jumper setting procedures are the same 
for these boards, as is the device driver software installation.   

The PC/16 has no DIP switches to set; its addresses are "burned" into PAL 
(Programmable Array Logic) chips. The device driver software installation
is the same as for the PC/4 and PC/8, with the exception that the Per-Card
parameters are required. (The default settings are for the PC/4 or PC/8,
and won't work with the PC/16.) 

Hardware Installation 
 
Before proceeding with the software installation instructions for OS/2, you
must first configure your board(s) for the correct I/O port addresses and
interrupt request (IRQ) line(s), and install the board(s) in your computer
system, according to the hardware installation instructions in the Installation
Guide for your board, and the instructions on the following pages.

The device driver allows you to specify I/O address and interrupt parameters
for each board installed; however, for single-board installations, the four
and eight-port boards may be installed with a set of pre-configured addresses
and interrupts, and the driver can be loaded without specifying these para-
meters. The I/O addresses and interrupt parameters must be specified for each
PC/16 board installed.


PC/X Boards 
PC/4 and PC/8 Boards 
The following page shows the correct DIP switch and jumper settings for the
PC/4 and PC/8 boards in single-board installations (if you have just taken
your board out of the box, it may already be correctly set_in this case, use
the following diagrams to verify the configuration). For configurations other
than the ones given here, refer to the Installation Guide for your board. 
Set PC/4 and PC/8 boards up according to the diagrams on the following page.  
 
DS1: Status port set to 140h:  Switch  1 2 3 4 5 6 7 8 9 10
                                   on: x - x - x x x x x x 
                                  off: - x - x - - - - - - 

DIP Switch Settings for I/O Port Addresses

                         Switch  1 2 3 4 5 6 7 8  
DS2: Port 1 set to 100h:     on: x - x x x x x x
                            off: - x - - - - - -

DS3: Port 2 set to 108h:     on: x - x x x x - x
                            off: - x - - - - x -

DS4: Port 3 set to 110h:     on: x - x x x - x x 
                            off: - x - - - x - -

DS5: Port 4 set to 118h:     on: x - x x x - - x
                            off: - x - - - x x -

DS6: Port 5 set to 120h:     on: x - x x - x x x
                            off: - x - - x - - -

DS7: Port 6 set to 128h:     on: x - x x - x - x 
                            off: - x - - x - x -

DS8: Port 7 set to 130h:     on: x - x x - - x x
                            off: - x - - x x - -

DS9: Port 8 set to 138h:     on: x - x x - - - x
                            off: - x - - x x x -

IRQ Selection for PC/4 & PC/8 Boards.

IRQ   |x| | | | | |   |x|x|x|x|x|x|x|x| | |      | X X |   | X X |
 3    |x| | | | | |   |x|x|x|x|x|x|x|x|x|x|        P2        P3 
       |              | | | | | | | | |x|x|     Jumper middle 2 pins       
       J85            J1      -->       J10   


PC/16 Boards 
The Status Port and I/O Port address selections are made in a different manner
for the PC/16 board.  Instead of DIP switches, the addresses are programmed
into special integrated circuits called PALs (for Programmable Array Logic). 
The PC/16 board has two PAL chips which determine its I/O Port and Status
Port addresses.   

The PC/16 must have PAL chips numbered 40000246 (in socket U58) and 4000247
(in socket U46) for the device driver software to work with OS/2.  If for 
some reason you have different PAL chips, call DigiBoard Customer Service at 
(612) 943-9020. 
 
  
    ---------------------------------------- __
    |                                      |-|
    |                                      | | 
    |            Pal Chips                 | |
    |              u46                     |-|
    |______________u58______             __| |
                            |____________|   |



Three jumpers must be installed on the PC/16 board to complete the hardware 
configuration.  To select IRQ3, place a jumper on J2, as shown below.  Other 
IRQs may be selected (see the PC/X and MC/X Installation Guide). 
 
  
IRQ   | |x| | | | | 
 3    | |x| | | | | 
         |         
        J2       
 
A jumper must also be installed across pins 2 & 3 (the bottom two pins) of J7.
See the figure below: 
      | |
      |x|
   J7 |x|

Finally, be sure that there is a jumper installed on the daisy-chain connector,
P3, located in the upper right-hand corner of the board. 
 
   P3 |XX| 
 

Custom Installation 
Choosing Your Own Addresses and Interrupts 
If you are installing multiple PC/X boards, or if you wish to use address and 
interrupt parameters other than the default selections, you can custom-
configure your board(s) with parameters of your choice. See the guidelines
below for setting up your own I/O Port and Status Port addresses. 
 
I/O Port and Status Port Address for 4 and 8-Port Boards 
Each PC/X board must have its own unique I/O Port and Status Port addresses, as 
well as a unique IRQ selection. Each range of addresses you choose must not be 
used by any other device in your computer.   

When loading the OS/2 device driver, only the Status Port address is specified.
The driver expects to find the I/O Ports in the 64 bytes (40 hex) preceding the 
Status Port (each I/O Port uses eight contiguous bytes). Thus, if the Status
Port address is set to 140h, the I/O Ports must begin at 100h. If the Status
Port is addressed at 2A0h, the I/O Ports must begin at 260h. See the Install-
ation and Reference Manual for your board for details on how to set I/O Port
and Status Port addresses. 

Here are some legal address combinations for the four and eight-port PC/X
boards. 
 
Status            Serial Port 
Port               (Channel)

      1    2    3    4    5*   6*   7*   8*
140h 100h 108h 110h 118h 120h 128h 130h 138h

188h 148h 150h 158h 160h 168h 170h 178h 180h 

250h 210h 218h 220h 228h 230h 238h 240h 248h

2A0h 260h 268h 270h 278h 280h 288h 290h 298h
 
*8-port boards only 
 
This manual shows the suggested DIP switch and jumper settings for installing
one board. A Status Port address of 140h is chosen, resulting in I/O Port 
addresses of 100h, 108h, 110h, 118h, 120h, 128h, 130h and 138h. If you choose 
to use these settings, set your DIP switches as shown in the figures. If you
are installing more than one board, you'll have to pick more addresses as de-
scribed above. 
 
When setting the DIP switches on the PC/4 and PC/8 boards, switches 8, 9 and
10 of switch bank DS1 and switch 8 of switch banks DS2_DS9 (DS2_DS5 for the
PC/4) must be set to "ON" to enable the ports.

Choosing an Interrupt 
Each PC/X board installed must have its own unique Interrupt Request line
(IRQ), and the IRQ you choose must not be used by any other device in your
computer. The IRQ choices are: 2, 3, 4, 5, 6, and 7.  Each board uses a single
IRQ for all of its channels. See the Installation Guide for your board for
information on selecting the IRQ. Note that while the PC/X board can support
two separate IRQ lines on one board, the OS/2 driver supports only one IRQ
per board. 
 
Remember which addresses and interrupts you choose for each board. You will
have to supply this information when loading the device driver.


MC/X Boards 
MC/X boards are configured through the POS (Programmable Option Select) 
feature of Micro Channel computers.  To install and configure your MC/X board, 
follow the instructions in the PC/X and MC/X Installation Guide. 
1.  Boot your system from the IBM Reference Diskette. 
2.  Make a working copy of the reference diskette by selecting the "Backup the 
    Reference Diskette" option. 
3.  Select the "Copy an Option Diskette" option, and follow the instructions on 
    the screen to copy the ADF (Adapter Description File) files from the 
    DigiWARE ADF Files diskette to the working copy of the reference diskette 
    just created. 
4.  Turn off the computer and install the MC/X board in an available slot in
    your computer. Follow the instructions in the MC/X Installation Guide. 
5.  Boot the system from the working copy of the IBM reference diskette made in 
    Step 3.  Run the Automatic Configuration. 
6.  Select "View Configuration".  You will see something like the following: 
 
View Configuration 
Slot 3 - DigiBoard MC/8 
	UART Address Range . . . . . . . . . . . . . 0xDB80 -> 0xDBC0 
	Com2 Status  . . . . . . . . . . . . . . . . Disabled 
	Interrupt Select . . . . . . . . . . . . . . INT 5
 
Make a note of the UART Address Range and the Interrupt Select.  This is the 
information you will need to set up the OS/2 Driver.  Also verify that "Com2 
Status" is set to "Disabled".  If it is not, you can change it by selecting
the "Set Configuration" menu. 

The UART Address Range provides only the address of the first port on the
board, and the address of the status port. The following list provides all
of the addresses needed to configure the OS/2 device driver: 
 
MC/4, MC/8: 
0xDB80 * 0xDBC0 
	DB80h, DB88h, DB90h, DB98h,  
	DBA0h, DBA8h, DBB0h, DBB8h. 
0xDC00 * 0xDC40 
	DC00h, DC08h, DC10h, DC18h, 
	DC20h, DC28h, DC30h, DC38h. 
0xBB80 * 0xBBC0 
	BB80h, BB88h, BB90h, BB98h, 
	BBA0h, BBA8h, BBB0h, BBB8h. 
0xBC00 * 0xBC40 
	BC00h, BC08h, BC10h, BC18h, 
	BC20h, BC28h, BC30h, BC38h. 
0xAB80 * 0xABC0 
	AB80h, AB88h, AB90h, AB98h, 
	ABA0h, ABA8h, ABB0h, ABB8h. 
0xAC00 * 0xAC40 
	AC00h, AC08h, AC10h, AC18h, 
	AC20h, AC28h, AC30h, AC38h. 
0xCB80 * 0xCBC0 
	CB80h, CB88h, CB90h, CB98h, 
	CBA0h, CBA8h, CBB0h, CBB8h. 
If you are installing an MC/4 board, only the first four addresses in each
list are pertinent. 

MC/16: 
0x3000 * 0x307F 
	3000h, 3008h, 3010h, 3018h, 3020h, 3028h, 3030h, 3038h, 
	3040h, 3048h, 3050h, 3058h, 3060h, 3068h, 3070h, 3078h. 
0x4000 * 0x407F 
	4000h, 4008h, 4010h, 4018h, 4020h, 4028h, 4030h, 4038h, 
	4040h, 4048h, 4050h, 4058h, 4060h, 4068h, 4070h, 4078h. 
0x4100 * 0x417F 
	4100h, 4108h, 4110h, 4118h, 4120h, 4128h, 4130h, 4138h, 
	4140h, 4148h, 4150h, 4158h, 4160h, 4168h, 4170h, 4178h. 
0x4200 * 0x427F 
	4200h, 4208h, 4210h, 4218h, 4220h, 4228h, 4230h, 4238h, 
	4240h, 4248h, 4250h, 4258h, 4260h, 4268h, 4270h, 4278h. 
0x4300 * 0x437F 
	4300h, 4308h, 4310h, 4318h, 4320h, 4328h, 4330h, 4338h, 
	4340h, 4348h, 4350h, 4358h, 4360h, 4368h, 4370h, 4378h. 
0x5000 * 0x507F 
	5000h, 5008h, 5010h, 5018h, 5020h, 5028h, 5030h, 5038h, 
	5040h, 5048h, 5050h, 5058h, 5060h, 5068h, 5070h, 5078h. 
0x6000 * 0x607F 
	6000h, 6008h, 6010h, 6018h, 6020h, 6028h, 6030h, 6038h, 
	6040h, 6048h, 6050h, 6058h, 6060h, 6068h, 6070h, 6078h. 
0x7000 * 0x707F 
	7000h, 7008h, 7010h, 7018h, 7020h, 7028h, 7030h, 7038h, 
	7040h, 7048h, 7050h, 7058h, 7060h, 7068h, 7070h, 7078h. 
 

Software Installation 
To install the OS/2 device driver, simply copy the file DGX.SYS from the OS/2 
device driver diskette onto your hard disk.  Then use a text editor to add the
line  DEVICE=DGX.SYS [parameters] 

to the CONFIG.SYS file. Note that if DGX.SYS is not in the root directory, you 
will have to give its full pathname. (e.g. DEVICE=C:\BIN\DGX.SYS). If you are
installing a single four or eight-port board with the default parameters, the
parameters portion may be omitted. 

For MC/X boards, address and IRQ information is taken directly from the
computer's POS (Programmable Option Select) registers, so the parameters 
portion may be omitted if you wish to use the default device names, baud
rate and data type. 
 
DigiBoard PC/16 users must enter the line above with Per-Card Parameters
as follows:

DEVICE=DGX.SYS /P:140 /C:16 /I:IRQ 

where IRQ is the Interrupt Request line you have selected for the board.
 
Default Device Names 
With one board in the system, the default names for the devices are COM3, 
COM4, COM5, COM6, COM7, COM8, COM9, COM10... 
Default modes for each of the channels follow the OS/2 standards of 1200 Baud,
7 data bits, 1 stop bit, even parity, and RTS control-mode.  

Command Line Arguments  
There are both global as well as per-card arguments that can be specified on
the device driver command line.  If any arguments are given, the defaults in
the data segment of the driver will be ignored.  Use a comma ( , ) to separate
sets of arguments for each card in your system.  Each card in your system must
be fully described by these arguments. 
 
Global Arguments (PC/X and MC/X Boards) 
The following Global Arguments set parameters for all channels on all boards 
controlled by the device driver. To change parameters for individual ports,
use the utility DMODE.EXE provided on the distribution diskette with the
driver. DMODE.EXE is discussed beginning on page 45 of this manual. 
 
/n:device_names 
Sets up the naming algorithm to be used to generate device names.  This con-
sists of an optional new stem followed by the starting device number. Without 
the new stem, the stem name "COM" will be used.  Quotes are mandatory to 
set a new stem.  Without a number, "3" is assumed. 
Examples: 
/n:"digi"0	DIGI0, DIGI1, DIGI2 ... 
/n:4 			COM4, COM5, COM6 ...  
/n:"digi"	DIGI3, DIGI4, DIGI5 ... 
 
/b:baud_rate 

OS/2 sets all serial devices to 1200 baud at initialization time.  Use this
option to set a different baud rate. 
Example: 
/b:9600		Set all channels to 9600 baud. 
 
/d:data_type 
OS/2 sets all serial devices to even parity, 7 data bits and 1 stop bit at 
initialization time.  Use this option to override those values.  The syntax is 
Parity Data Stop (without spaces), where Parity is E, O or N for "Even", 
"Odd" or "None"; Data is 8, 7, 6 or 5; and Stop is 1 or 2.  All three values 
MUST be provided. 
Example:  
/d:N81		Set all channels to no parity, 8 data bits, 1 stop bit. 

Per-Card Arguments (PC/X Boards Only) 
Per-Card arguments MUST be in complete sets identifying the Status Port address 
and IRQ number.  The preceding global arguments may be given without 
interfering with the default Per-Card settings in the driver file.   
 
Each board in your system must be fully described by these Per-Card arguments.
Use a comma to separate the board sets from one another.

Also note that the channel numbers (COM3, COM4, etc.) will be assigned to the 
boards in the same order in which the per-card arguments are given. 
 
/p:Status Port Address 
Set the Status Port address. This argument specifies the top of the range
of I/O Port addresses that will be used by a PC/X board.  This address should 
correspond to the dip-switch setting for the Status Port.  Individual channel 
port addresses should then begin 40 (hex) bytes below this address, occupying 
a contiguous block. 
Example: 
/p:280	(set Status Port address to 280h) 
I/O Port for Channel 1 = 240h 
. 
. 
. 
I/O Port for Channel 8 = 278h 
 
PC/16 users must specify a Status port address of 140h, as 
follows: 
/p:140
 
/i:IRQ 
Sets the IRQ line number to one of the legal options for the PC/X board. 
Example: 
/i:5		(set card to IRQ 5 decimal) 
 
/c:channels 
Sets the number of channels (either 4, 8 or 16). This is required for four and 
sixteen-port boards. If omitted, eight ports is assumed. 
Examples: 
/c:4		(PC/4) 
/c:16		(PC/16) 

Command Line Example 
This two-card example uses the preceding GLOBAL examples, and sets the two 
eight-channel boards to: 
Board 1:	Status Port=140 
		IRQ 4  
Board 2:	Status Port=188	 
		IRQ 3  
A command line for the above parameters would read: 
device=dgx.sys /n:"digi"0 /b:9600 /d:N81 /p:140 /i:4, /p:188 /i:3 


Troubleshooting 
If, after installation, the device driver software comes up with a problem
message, first check that your configuration matches the DIP switch settings
on the board. Next, try powering down the system and then bringing it back
up.  If it still fails, call DigiBoard Technical Support. 

In general, a good way to test the basic functionality of the driver is to
hook up a terminal to one of the ports (COM3 for example), set it up for the
correct Baud rate, Handshake, and Data type characteristics, and then simply
try to re-direct output to it from the command prompt.  For example: 

C:\>dir > com3  

If the terminal is set up correctly (the above defaults are typical) you
should get the directory listing coming out on it. If there is no output,
or if the above command hangs, then you may need some technical support.
It is possible that the board is not functioning properly.  


DMODE I/O Port Configuration Utility 
DMODE is DigiBoard's I/O channel configuration utility. DMODE functions like 
the OS/2 MODE command, but is more flexible, and provides some added features. 
*  Supports communications device names other than COM1-COM8 (e.g. 
   COM9, DIGI2, etc). 
*  Timeout, handshake modes, etc. can be specified without affecting baud rate, 
   data type, etc. 
*  Any single parameter may be changed without causing all others to be reset
   to default values. 
*  Maintains the familiar MODE syntax. 

DMODE arguments may be entered in any order, and in many cases may be 
abbreviated.  For example, a baud rate of 19,200 may be entered simply as "19", 
since within the context of the DMODE command, "19" cannot be interpreted as 
anything else. Arguments may be separated by spaces or commas, and unspecified 
parameters are left unchanged.  DMODE returns the settings of all parameters
after any requested changes have been made. If no parameters are given, DMODE 
simply returns the current settings. 
 
The syntax of DMODE is: dmode port_name [parameters] 

Port names and parameters are not case sensitive, so upper and lower case
letters may be freely mixed without effect on the operation of the DMODE
command. The following parameters are accepted:

Baud rates can be specified with 2 to 5 digit designations, according 
to the following table: 
 
Accepted Values           Baud Rate
11   110                    110
15   150                    150
30   300                    300
60   600                    600
12   120   1200            1200
24   240   2400            2400
48   480   4800            4800
96   960   9600            9600
19   192   1920   19200   19200

 
Character Length 
Characters may be 5, 6, 7 or 8 bits long. Enter the appropriate number in the
DMODE arguments. 
Parity	   Enter the desired parity checking method with a single letter E, O,
           N, M or S for Even, Odd, None, Mark or Space. 
Stop Bits  Enter the desired number of stop bits.  Recognized values are 1, 2 
           and 1.5. 
Flags	   DMODE supports the following flags in the same way as the OS/2 
           MODE command.  Refer to your OS/2 documentation for explanations
           of the flags. To set a flag, enter the mnemonic for the flag,
           followed by an equals sign (=), and the desired value (ON, OFF, 
           etc.). 
Read Timeout Flag 
TO=ON      Read timeout in effect 
TO=OFF     No timeout 

XON/XOFF Handshake Flag 
XON=ON	XON/XOFF handshaking enabled 
XON=OFF	XON/XOFF handshaking disabled 

Input DSR Sensitivity 
IDSR=ON	Enables Input DSR Sensitivity 
IDSR=OFF	Disables Input DSR Sensitivity 

Output DSR Sensitivity 
ODSR=ON	Enables Output DSR Sensitivity 
ODSR=OFF	Disables Output DSR Sensitivity 

Output Handshake on CTS 
OCTS=ON	Enables CTS output flow control 
OCTS=OFF	Disables CTS output flow control 

DTR Signal Control 
DTR=ON	Sets DTR to "ON" or HIGH 
DTR=OFF	Sets DTR to "OFF" or LOW 
DTR=HS	DTR used for output flow control 

RTS Signal Control 
RTS=ON	Sets RTS to "ON" or HIGH 
RTS=OFF	Sets RTS to "OFF" or LOW 
RTS=HS	RTS used for output flow control 
RTS=TOG	Toggles RTS from LOW to HIGH, or from HIGH to LOW 

Alt-Pin Processing 
ALT=ON	Internally "swaps" DSR and DCD signals (see 
explanation below) 
ALT=OFF	DSR and DCD are not swapped 

DigiBoard products use 10-pin RJ-45 connectors in order to support 
all of the signals normally available on a 9-wire RS-232 connection.  
However, many commercially available RJ-45 connectors have only 
8 pins.  8-pin RJ-45 plugs will fit in a 10-pin jack, but the first and 
last pins (numbers 1 and 10) are not connected.  DigiBoard uses 
these pins for the modem control signals RI (Ring Indicator, pin 1) 
and DCD (Data Carrier Detect, pin 10).  While Ring Indicator is 
rarely a concern (since most modems have auto-answer capability), 
Data Carrier Detect is often monitored to insure that the modem has 
established, and is maintaining, a valid connection with a remote 
modem.   

To facilitate the use of 8-pin RJ-45 connectors in modem 
applications, a special DMODE flag, ALT, has been provided.  ALT 
instructs the device driver to monitor pin 2 for DCD instead of pin 
10.  The DSR (Data Set Ready) signal, normally on pin 2 is switched 
to pin 10. Since most programs don't monitor DSR, this signal can 
be safely ignored. See the Installation Guide for your board for cabling
diagrams and pin assignment charts for DB-25 and RJ-45 connectors. 
 

Examples 
dmode digi12 
Returns the current settings of device digi12.  No changes are made. 
dmode com5 2 
Configures COM5 for 2 stop bits.  All other parameters remain unaffected. 
dmode com5:19 rts=ON 
Configures COM5 for a baud rate of 19,200 and sets RTS to "ON" or HIGH. 
dmode com5 8	 
Configures COM5 for 8 data bits.  No other parameters are affected. 
dmode comdev83 IDSR=OFF, TO=off e 7 12 
Sets COMDEV83 to disable Input DSR Sensitivity, disable input timeout,
select even parity, 7 data bits and a baud rate of 1200. 
dmode com5 19 ALT=ON 
Sets up COM5 for a baud rate of 19,200, and enables Alt-Pin Processing. 
dmode com5 e alt=off 
Sets COM5 for even parity checking and disables Alt-Pin processing. 
 

