Serial Ports and Windows 95
Windows 95 has overturned many of the serial communications
barriers of earlier operating systems. However, some of its
features may not be obvious to many users. This article will
expose these useful new features to the casual user.
Lots of ports
Gone are the two and four port serial port barriers. Windows
95 allows you to configure as many ports as you can find space
for. Step-by-step installation instructions are included in
this article.
Full 16550 UART support
The user finally has control over UART FIFO settings. The
popular 16550 UART (now standard on all B&B serial cards)
has a 16-byte transmit and receive FIFO buffer - the interrupt
trigger level of the receive buffer may be set to 1, 4, 8
or 14. These settings allow various levels of overflow buffering
before data is lost. Setting the FIFO trigger to a higher
level allows higher efficiencies, but multitasking environments
may not allow enough overflow space for incoming characters
if the machine is busy handling another task. In general,
set the trigger level to the highest level that doesn't generate
overrun errors. The transmit FIFO buffer can be set for a
level of 16 (default), 11, 6 or 1. In most cases the default
setting is the most efficient. If the receiving device is
unable to keep up with the transmission, lowering the transmit
FIFO buffer's trigger level may slow down the data stream.
Sharing IRQs!
Perhaps the most exciting news - with special hardware you
can share IRQ's among COM ports - conserving this precious
resource. There are some stipulations - the programs sharing
the IRQ's must be Windows applications, and the serial ports
sharing IRQ's must have special circuitry to allow sharing.
Do not attempt to share IRQ's without special hardware - at
best, spotty communications will result, at worst, the hardware
could be damaged. That said, sharing IRQ's in Windows 95 is
as easy as setting the two or more ports for the same IRQ.
No special setup required. B&B's models 3PXCC4A, 3PXSD4A and
3PXSD4B are four port serial cards that support shared IRQ's.
What about RS-485?
Despite all of the improvements, promptly raising and lowering
RTS to control the RS-485 driver enable remains a daunting
task. Fortunately, this problem is solved in hardware with
B&B's Automatic Send Data Control feature. By using an RS-485
serial port or converter with this feature, RS-485 programming
is greatly simplified.
Installing Serial Ports in Windows 95
Follow these instructions to add a serial port to a Windows
95 machine. This will configure the port for use with all
Windows applications.
Configure and install the hardware -
set the I/O address and IRQ of the serial port to the values
you would like to use. Note that unless your serial card has
special circuitry to support sharing IRQ's, you should set
the IRQ to one not used by another device.
Run the Windows 95 Add New Hardware
utility found in the control panel.
Click Next.
Select No, you do not want windows
to search for your new hardware.
Click Next.
Select Ports (COM & LPT). Click
Next.
Select (Standard port types) and Communications
Port. Click Next.
The next screen will show the address
and interrupt request of the port. These may not match your
configuration. For now, simply click Next, then click
Finish.
If the address and IRQ information shown
in the last step were incorrect, it needs to be corrected
in the Device Manager. To open the Device Manager,
double click the System icon in the Control Panel and
click on the Device Manager tab.
Double click on Ports (COM & LPT).
The last Communications Port shown should be the one that
was just added; select it and click the Properties
button.
Next select the Resources tab.
This is where the address and interrupt information can be
changed. A set of "Basic Configurations" for serial ports
is included with Windows 95 to help configure COM ports. Set
the Basic Configuration to one from the table on page 3 which
most closely matches your new hardware. To change the I/O
address (Basic Configuration 8 only), double click on Input/Output
Range and enter the correct I/O address. To set the IRQ,
double click on Interrupt Request and select the proper IRQ.
Note that the Use automatic settings checkbox must
be off to make these changes.
SERIAL PORTS AND WINDOWS 95
The following information on the Basic Configurations was
taken from the Microsoft Knowledge Base, article Q123992.
These Basic Configurations provide
the following:
- A default configuration for each
COM port.
You cannot change this default setting.
- Additional configurations for each
port that let you edit the IRQ setting. These configurations
don't let you change I/O addresses.
- Additional configurations for each
port that let you edit both IRQ and I/O range.
Basic Configurations are determined by
the following table:
Basic
Configuration |
IRQ Setting |
Editable? |
I/O Setting |
Editable? |
| 0 |
4 |
No |
03F8-03FF |
No |
| 1 |
4 |
Yes |
03F8-03FF |
No |
| 2 |
3 |
No |
02F8-02FF |
No |
| 3 |
3 |
Yes |
02F8-02FF |
No |
| 4 |
4 |
No |
03E8-03EF |
No |
| 5 |
4 |
Yes |
03E8-03EF |
No |
| 6 |
3 |
No |
02E8-02EF |
No |
| 7 |
3 |
Yes |
02E8-02EF |
No |
| 8 |
Variable |
Yes |
Variable |
Yes |
COM 1 defaults to Basic Configuration
0.
The IRQ can be changed by selecting Basic Configuration 1.
COM 2 defaults to Basic Configuration
2.
The IRQ can be changed by selecting Basic Configuration 3.
COM 3 defaults to Basic Configuration
4.
The IRQ can be changed by selecting Basic Configuration 5.
COM 4 defaults to Basic Configuration
6.
The IRQ can be changed by selecting Basic Configuration 7.
Basic Configuration 8 can be used
to configure additional COM ports because it lets you change
the IRQ and the I/O address.
For more information on serial ports, we recommend Serial
Port Complete and C
Programmer's Guide to Serial Communication.
|