Copyright: Copyright ©  Sealevel Systems, Inc. 1998


Adding COM Ports

Adding ISA COM Ports

Adding PCI COM Ports

Adding PCMCIA COM Ports


Adding ISA COM Ports

Advanced Ports allows the user to quickly and simply install from one to eight ISA COM ports under Windows NT 3.51 and 4.0.

I. Configuring the registry

1. 	Run the Advanced Ports utility found in the Start, Programs, Settings, Control Panel. Select the Add... button to launch the Add Ports dialog. This dialog only supports multiport adapters whose COM ports are located at consecutive I/O address locations (i.e. 300h, 308h, 310h, ...). To add adapters that do not use consecutive I/O addresses simply add one port each time the Add Ports dialog is run.

2. 	Enter the starting I/O address for the group of ports. Up to eight ports may be added using the Add Ports dialog. Select the number of ports by typing the new value in the Number of Ports to Add field or by adjusting the Spin Button control.  If the Share Interrupt check box is checked, a group of ports installed with the Add Ports dialog will share a single interrupt for all ports. Individual interrupts may be configured for a port by adding the port while the Share Interrupt check box is not checked.

II. Installing the adapter

1.	Refer to the SERIAL.TXT file (located in the root directory of drive C:) and the documentation accompanying this product and change the adapter settings to match those reported by Advanced Ports. SERIAL.TXT is generated each time you update the registry. It contains a summary of each port's configuration as well as jumper and switch settings for supported 4 and 8-port adapters. Print a copy of this file as a quick reference of your system's port settings and as a setup guide for your adapter.

2.	Install your adapter into the PC following the steps outlined in the accompanying manual.

3.	Restart Windows NT.

4.	Your adapter is now properly installed and configured. Refer to Verifying COM Port Settings, Windows Diagnostic Program (WinMSD) ,and Windows NT Event Viewer if problems occur.


Adding PCI COM Ports

PCI COM ports are configured automatically by the system BIOS and the included NT serial driver. After installing the included software, shut down the system and install PCI COM adapters according to the procedure located in your user's manual. The serial driver will automatically configure the adapters and assign COM identifiers during the next boot of NT. The Advanced Ports utility will display PCI resource assignments but will not allow them to be modified.


Adding PCMCIA COM Ports

PC Card (PCMCIA) COM ports are configured automatically by the NT PCMCIA service and the included NT serial driver. After installing the included software, shut down the system and install PCMCIA COM adapters according to the procedure located in your user's manual. The serial driver will automatically configure the adapters and assign COM identifiers during the next boot of NT. The Advanced Ports utility will display the PCMCIA devices as ISA ports because of the location of the devices in the NT registry. It will also display PCMCIA resource assignments but will not allow them to be modified. Resource assignments can also be viewed from the PCMCIA control panel applet.

NOTE: Windows NT currently supports only simple enabling of PCMCIA devices. Many advanced features of PCMCIA such as hot-swapping are not currently supported using the native NT Card and Socket Services.


Additional COM Port Information

Advanced Ports reports additional information about COM ports that it finds from the system registry.

Serial Mouse Port Check Box:

A check in this box indicates that a serial mouse is attached to this port. Do not adjust this port's parameters or your mouse may not function properly.

ISA, EISA, PCI Bus Port:

A check in one of these boxes indicates which bus in your PC contains the hardware for this port.

Other Port Information:

If you are sharing an interrupt on your adapter the Share Interrupt box will be checked.

If there is a conflict with another device in your system the Valid Port box will not be checked. Usually the problem is an

IRQ conflict. Try to determine how all resources are being used and choose a free IRQ for your adapter. If you are using

a PCI adapter you must remove the adapter from Advanced Ports, power the system down and reinsert the card in a

different slot.


Advanced FIFO Settings

FIFO are on-chip buffers used by the UART. They enable the port to communicate at higher data rates, and also reduce CPU overhead and the chances of communication errors.

The following table lists FIFO sizes, default trigger settings, and allowed trigger settings for each UART type supported by the enhanced NT serial driver. Please refer to the Advanced Ports Advanced Tab for more information on changing these settings.

UART	FIFO Size	Def. Tx Trig	Tx Trigs.	Def. Rx Trig	Rx Trigs
8250	1	1	N/A	1	1
16450	2	1	N/A	1	1
16550	16	1	N/A	1	1,4,8,14
16554	16	1	N/A	1	1,4,8,14
16650	32	16	16,8,24,30	8	8,16,24,28
16654	64	8	8,16,32,56	16	8,16,56,60
16750	64	16	N/A	16	1,16,32,56
16850	128	16	1-128	16	1-128
16854	128	16	1-128	16	1-128
16950	128	1	1	16	1-128
16954	128	1	1	16	1-128


Advanced Ports Adapter Tab

Adding COM Ports

Removing COM Ports

Reconfiguring COM Ports

Sharing Interrupts on 4 and 8 Port Adapters

Verifying COM Port Settings

Additional COM Port Information

Model and Port Information


Advanced Ports Advanced Tab

Advanced UART Options

The UART type installed on the serial adapter will be displayed along with the FIFO size. Here the FIFO can be enabled or disabled and you can set the trigger level. If there is a 16550 UART installed and the FIFO is enabled the valid options for the FIFO settings will be highlighted for selection. If the Receive FIFO is set to 8 this means that after 8 characters are received an interrupt will be generated. The Transmit FIFO may or may not be grayed out depending on the UART installed. Some UARTS do not allow this setting to be modified.

Under this heading is also an option for suppressing modem control interrupts. This is very handy if no modem control signals are used. In the past it was recommended to tie complementary modem control signals together if not used. Example of this would be tying RTS to CTS to RI and DCD to DSR to DTR. By checking this option it is no longer necessary to do this. This can increase performance greatly and is recommended when modem control signals are not used.

RS-422/485 Control Options

Most serial RS-422/485 adapters have the Auto 485 feature. Consult your user's manual to learn about this option if available on your adapter. This enables the adapter to handle trisating of the transmitter and receiver at the board level without software intervention. However, there are some cases where Auto RTS RS-485 is either necessary or a better option. On some older adapters RTS control is the only option for two wire RS-485. If you have an adapter that does not support Auto 485 and plan on using two wire RS-485 choose the Auto RTS RS-485 option. On adapters that do have the Auto feature they also support RTS control. This may be a benefit when very fast turn around times are needed. Otherwise, it is best to leave all options unchecked and use the Auto feature of the adapter. If your Adapter is fitted with a 16C950 the driver supports the use of the UARTS' ability to control the tristating. This, again, would be benificial if very fast turn around times are needed. Otherwise, use the adapter's Auto feature.

If a PCMCIA card is installed the driver options apply only to that card and the other check boxes will be grayed out. Under PCMCIA Hardware Control choose RS-422 if RS-422 or four wire RS-485 is to be used. If two wire RS-485 is to be used the options are RS-485 Mode and RS-485 Echo Off. Most applications do not like echo and therefore both check boxes would need to be checked.

16950 ISOSynchronous

If your adapter is fitted with a 16C950 UART and Isosynchronous communications is desired check the Enable Isosynchronous Mode. If 9 bit protocol is desired choose 9 Bit Protocol.

Oscillator Options

A number of serial adapters use a divide by circuit to determine the data rate. Consult your user's manual to learn about this option if available on your adapter. If the Divide jumper on your adapter is set to1 and  the Effective Frequency is set to match the oscillator on the adapter then the data rate chosen will be the actual data rate. The software will handle the division for you. Please consult your user's manual to determine the oscillator on your adapter. If the Divide by 4 option is chosen on the adapter this software feature is not valid. You will need to consult your user's manual to help in determining your data rate. An example of this is many  serial adapters ship with a 7.3728Mhz oscillator. This frequency is four times the normal COM port oscillator frequency and allows data rates up to 460.8Kbps. In the Divide by 4 option on the adapter the frequency is dropped to the standard 1.8432Mhz which allows data rates up to 115.2Kbps. By setting the Divide by jumper to 1 and setting the Effective Frequency to 7.3728 then when you choose 9600Bps you get 9600bps. Without the software option you would get 4 times 9600 in the above case. Which would be 38.4Kbps


Advanced Ports UART Settings Tab

This tab is used to configure initial communication parameters for each COM port:

-baud rate

-parity

-number of data bits

-number of stop bits

-flow control

These are the defaults for the port but may be changed dynamically by the application after the port is opened.


Contents

SeaCOM version 2.4.10

The Advanced Ports Control Panel utility displays information about all COM ports currently installed in your Windows NT 3.51 or 4.0 system. Ports may be reconfigured, added and removed using this utility. Advanced Ports is specifically designed to work with multi-port COM adapters using our enhanced NT serial driver. These adapters are capable of sharing a single interrupt request (IRQ) for all ports on the adapter. They feature an interrupt status port that enables the Windows NT serial driver to efficiently service multiple COM ports sharing a single IRQ. Advanced Ports can also be used to configure single and multi-port adapters to a unique interrupt for each port as well. Once Advanced Ports has configured the Windows 3.51 and 4.0 serial ports, the communication parameters can be printed out along with a description of how to set the card’s jumpers and DIP-switches to match the Windows NT settings.

Advanced Ports Adapter Tab

Advanced Ports UART Settings Tab

Advanced Ports Advanced Tab

Enhanced NT Serial Driver

Windows Diagnostic Program (WinMSD)

Windows NT Event Viewer

Sample Code

Technical Support


Enhanced NT Serial Driver

Features:

Advanced UARTS

Supports 8250, 16450, 16550, 16554, 16650, 16654, 16750, 16850, 16854, 16950, and 16954 UARTS

Auto detection of UART type

Deeper  FIFO sizes support higher data rates

Selectable Transmit Trigger levels

Selectable Receive Trigger levels

Modem control interrupt suppression

16950 Isynchronous suppport

Software support for non standard data rates

PCI Support

Automatically detects and configures PCI cards

Detects card slot changes

Detects card removal and deletes ports

RS-485

 	Automatically controls the RTS RS-485 line driver enable signal

Optionally suppresses the receiver echo of transmitted data

Selectable control of RTS turn-off response time (Real Time RTS)

16950 UART real time RS-485 control

User Interface

Works in conjunction with the Advanced Ports Control Panel Applet

Ease of sharing interrupts through interrupt status port

Add and delete multiport cards in a single step

Displays port validity and conflict information

Identifies serial mouse ports

Identifies COM port host bus (ISA, PCI, etc.)

Configure RTS and Echo RS-485 options

Context sensitive help


Model and Port Information

Advanced Ports will display the Model and Port number for each port on a PCI adapter. Since PCI ports are installed and assigned COM identifiers automatically, this information is helpful in pairing COM identifiers with physical connectors on the PCI cards.


Reconfiguring COM Ports

Reconfigure any installed ISA COM port using Advanced Ports and the following steps. PCI and PCMCIA COM resources cannot be changed.

I. Reconfiguring the registry

1.	The Installed Ports field lists all COM ports stored in the system registry. Select a port in this list to display the COM port's base I/O address, interrupt, adapter type (4-port, 8-port, or other), interrupt sharing status, validity, conflict status, mouse support, and parent bus.

2.	The I/O address, interrupt, adapter type, and interrupt sharing status can be modified For more details on interrupt sharing please refer to Sharing Interrupts on 4 and 8 Port Adapters.

II. Reinstalling the adapter

1.	Remove the adapter from the system.

2.	Refer to the SERIAL.TXT file (located in the root directory of drive C:) and the documentation accompanying this product and change the adapter settings to match those reported by Advanced Ports. SERIAL.TXT is generated each time you update the registry. It contains a summary of each port's configuration as well as jumper and switch settings for supported 4 and 8-port adapters. Print a copy of this file as a quick reference of your system's port settings and as a setup guide for your adapter.

2.	Reinstall your adapter into the PC following the steps outlined in the accompanying manual.

3.	Restart Windows NT.

4.	Your adapter is now properly installed and configured. Refer to Verifying COM Port Settings, Windows Diagnostic Program (WinMSD) ,and Windows NT Event Viewer if problems occur.


Removing COM Ports

Removing ISA COM Ports

Removing PCI COM Ports

Removing PCMCIA COM Ports


Removing ISA COM Ports

Advanced Ports supports quickly removing single or multiple COM ports in Windows NT.

I. Removing Ports

1.	Select a single COM port or multiple ports for deletion. Holding the control key while selecting ports will add individual ports to the deletion list. Selecting a port and then holding the shift key while selecting a second port will add all ports listed between the two selections to the deletion list.

2.	After making selections, choose the Delete button to remove the ports. A dialog box will confirm that you wish to delete the ports from your system. Selecting Yes removes these ports from the registry immediately. Selecting No cancels this operation.

II. Removing the adapter

1.	Remove or disable the above port so its resources are available for use by other devices.

2.	Restart Windows NT.


Removing PCI COM Ports

PCI ports are automatically detected and configured by the included NT Serial Driver. To remove a PCI port(s) highlight all the PCI ports in Advanced Ports and choose Remove Port. Once this is done power down and remove the card.


Removing PCMCIA COM Ports

PCMCIA ports are automatically detected by the NT Serial Driver. To remove a PCMCIA port highlight the  port in Advanced Ports and choose Remove Port. Once this is done power down and remove the card.


Sharing Interrupts on 4 and 8 Port Adapters

The Share Interrupt check box controls interrupt sharing options for the current COM port selection in the Installed Ports field. Interrupt sharing is currently available only on certain four and eight port communication adapters that have interrupt status ports. An interrupt status port requires additional values be added to the system registry. These ports allow NT to quickly determine the source of an interrupt request and service the port more efficiently. Refer to the documentation included with this product to determine if the adapter has an interrupt status port. Adapters that do not have interrupt status ports require separate interrupts not in use by other system devices. Refer to Windows Diagnostic Program (WinMSD) for assistance in locating conflict free interrupts.


Technical Support

Please refer to your user's manual for contacting technical support.


Verifying COM Port Settings

Valid Port Check Box:

Advanced Ports analyzes the system registry to determine additional information about installed ports. The serial driver tests each port found in the registry for validity as it loads. If the specified I/O location fails this test, the Valid Port check box will not be checked. The failure is normally caused by an invalid I/O address that does not match the board's switch or jumper settings, or by an I/O address that conflicts with another device in your system. NT provides several tools for to assist in configuring port settings. Windows Diagnostic Program (WinMSD) lists currently assigned system resources and Windows NT Event Viewer displays messages posted by drivers that encounter hardware problems during system boot. Note that some 4 and 8-port adapters require a block of consecutive I/O addresses. This means that a conflict-free region of 32 or 64 consecutive I/O addresses must be located using Windows Diagnostic Program (WinMSD).

Port has Conflict Check Box

The Port has Conflict check box indicates that NTDETECT (an automatic hardware detection program which runs during boot) has located a port at one of the standard addresses for COM1 to COM4 and that you have configured another COM port to this same COMx identifier. NTDETECT will locate ports at these addresses even if the port has not been added using the Ports Control Panel applet. NTDETECT will also determine the interrupt used by the port. The port found by NTDETECT will prevent the offending COM1 through COM4 from being used even though its resources may not be at standard COM1 to COM4 values. This problem can be resolved in two ways. 1.) Remove or disable the port found by NTDETECT (its I/O address will be 3F8, 2F8, 3E8, or 2E8 and it will not be listed in the Installed Ports list ). 2.) Use Windows Diagnostic Program (WinMSD) or Windows NT Event Viewer to locate the port found by NTDETECT. Use Advanced Ports or the Ports Control Panel applet to setup this port. Note that you may have to temporarily remove the offending COM1 to COM4. Now setup the offending port at a different COMx identifier.


Windows Diagnostic Program (WinMSD)

WinMSD is a utility that summarizes all currently used system resources (I/O addresses, interrupts, DMA channels, memory, etc.). This file is located in the Windows system32 directory. Use this utility to locate available resources and resolve conflicts. Also use Windows NT Event Viewer in addition to WinMSD to resolve setup problems.


Windows NT Event Viewer

Event Viewer is an NT tool for monitoring system events. Drivers often post events to this log describing problems encountered during initialization. This program is located in the Administrative Tools folder. Locate any events listing the Serial driver in the Source column. These events will provide details on any problems encountered by driver and should identify the offending serial port. Run Advanced Ports to correct any port settings causing problems for the serial driver. Also use Windows Diagnostic Program (WinMSD) in addition to Event Viewer to resolve setup problems.


Sample Code

SeaCOM ports are accessed through standard Win32 calls, such as WriteFile(), ReadFile, CloseHandle or CreateFile().  Three examples, with source and executables, are included in the Samples subdirectory under the main SeaCOM directory.  (defaults to C:\Program Files\SeaCOM\Samples)

A number of programmers need to write applications that have to access COM ports above COM9. There is a different line of code necessary to do this. In the UARTtst program we have an example of opening any COM number. When the source is viewed pay attention to the open statement. It is written like:

"\\\\.\\COM12" The 12 can be any COM number up to the maximum on your system.