All products manufactured by ICP DAS are warranted
against defective materials for a period of one year from the
date of delivery to the original purchaser.
Warning
ICP DAS assumes no liability for damages consequent
to the use of this product. ICP DAS reserves the right to
change this manual at any time without notice. The
information furnished by ICP DAS is believed to be accurate
and reliable. However, ICP DAS assumes no responsibility
for its use, or for any infringements of patents or other rights
of third parties resulting from its use.
Copyright
Copyright 2004 by ICP DAS. All rights are reserved.
Trademark
The names used for identification only may be
registered trademarks of their respective companies.
The VXC series multi-port serial card enables user to install additional
communication ports on the PC. It’s the best choice for time-critical and reliably
communications and controls on the industrial environment. For example:
Communicates to PLC, FAB machine, meter, console management of devices,
laboratory instruments and Modem link, etc. In harsh industrial environments,
the onboard surge protection protects the computer and other equipment from
being damaged by high potential voltages.
COM-Selector:
The VXC series cards equip a COM-Selector (dip switch) for the COM port
number selection (automatically or manually). It’s an important and innovative
feature of the VXC cards. It has the following advantages:
• Simplifies the COM port number selection without using configuration utility programs.
• Users specify the COM port number exactly what they want, no matter which PCI slot
is using.
• Automatically select an available COM port number is supported by setting the COMSelector (dip switch) to 0 (default).
• Needn’t to install configuration utility for different OS, and needn’t to study operations
of the utility.
• Prevents confusion. Other PnP COM port devices always confusing users by using a
dynamic COM port number.
• Replacing an existing card is very easy, just setting the COM-Selector (dip switches)
to the same.
• It’s great for mass system installation, just setting the COM-Selector (dip switches) to
use the same COM port number in systems.
Up To 128KB Software FIFO:
The VXC card driver for Windows features a maximums 128KB software
FIFO for each port (default is 4KB). It’s practical for large file transmission.
Self-Tuner:
The RS-485 ports of VXC cards equip a “Self-Tuner” chip, which controls the
sending/receiving direction, baud rate and data format automatically and
reduces the software loading for such controls.
In addition to this manual, the package includes the following items:
• One VXC-112A, VXC-142/142i or VXC-182i card
• One ICP DAS floppy diskette or CD
• One copy of the release notes
Before continuing, it is recommended that you read the release notes,
which contain the following important information:
1. The location of the software driver & utility
2. How to install the software & utility
3. The location of the diagnostic program
Attention! If any of these items are missing or damaged, contact the
dealer from whom you purchased the product. Save all shipping
materials and the carton in case you need to ship or store the product
in the future.
1.4 Ordering Information
VXC-112A: 2-port RS-232 Communication Board
VXC-142: 2-port RS-422/485 Communication Board
VXC-142i: 2-port Isolated RS-422/485 Communication Board
VXC-182i: 1-port isolated RS-422/485 and 1-port RS-232 Communication
The Board ID and COM port mapping are the same, which is set by the S1
DIP switch. The S1 DIP switch has different functions under different OS.
For DOS users, the S1 DIP switch acts as Board ID. When there are two or
more multi-port serial cards in a single system, it is difficult to identify individual
card number. For easier identification, the VXC series card includes a Board ID
function.
For Windows users, the S1 DIP switch acts as COM port number selector
and the COM port number is depending on the Board ID. If the Board ID is 0,
then the driver finds a valid number for each port. If the Board ID is not 0, then
the driver uses the “Board ID” to be the first COM port number and uses the
“Board ID +1” to be the next COM port number and so on.
Note: It’s recommended to select a unique COM port number (Board
ID) by users. This helps users to identify and fix these cards and ports
in a system without confuses.
Note: The port will not work if the COM port number is conflicted under
Windows or Linux system. In that case, users should try other COM port
numbers.
number selector.
Usually, the COM1 and COM2 are reserved by systems. And it’s
recommended to reserve the COM3 and COM4 if you will have othe
Plug&Play serial ports in the future. This prevents confliction.
For Linux users, it’s the same as Windows users but for TTY device
ICP DAS provides following device drivers for most operation systems such
as MS-DOS, Windows NT 4.0 and Windows 2000/XP/2003. These Windows
drivers provide full interrupt-driven, buffered I/O for each COM ports. And also
supports the Plug & Play mechanism for easy installation.
VxCard DOS Lib: Programming library files and sample programs for DOS.
VxCard Driver NT: COM port driver for Windows NT 4.0.
VxCard Driver 2K: COM port driver for Windows 2000/XP/2003.
VxCard Driver Linux: tty driver for Linux.
Note: VxCard Driver 2K also supports Windows XP and Windows
Server 2003.
For Windows users to access COM ports, please refer to the “Serial Communications in Win32” article for programming information. Which can be
found by searching on the
This chapter shows you the detail steps to install these drivers.
Note: For more information about COM port number selection,
please refer to Section 2.2 “COM Port Mapping & Board ID”.
Microsoft provides standard Win32 APIs for Windows 9x/NT/2K/XP/2003
users to access the COM ports. But DOS did not have such standard APIs, thus
ICP DAS provides library functions under DOS for the VXC cards. Which
provides easy programming interfaces and sample programs (include source
code) that written in Turbo C.
These sample programs (include source code) show you …
1. To find out all VXC cards.
2. To get the I/O address and IRQ number of the card.
3. To get the Board ID of the card.
4. To Send/receive data to/from the COM ports.
5. To control the LED On/Off of the card.
3.1.1 Installation
Please refer to the “Release Note” paper that shows you the location of the
software on the CD. Run the “install.bat” batch file to install the software into
your c: disk.
If you like to install the software into a different location, you can specify the
parameter after the “install.bat” file. For example:
Install d:\MyProj <Enter>
Or, you can copy the folder into your project directory manually.
Please refer to the “Release Note” paper to see the software location and
refer to the following steps to complete it.
1. Launch the “VxCardNT.exe” setup program, and then click the “Next >”
2. When prompted, click the “Next >” button to start installation. Or click the
3. After the driver is installed, click the “Finish” button.
4. When prompted, select the “Yes, I want to restart my computer now.”
Note: It’s recommended to install the software first, and then the
hardware. This reduces the reboot times of your computer.
button.
“Change…” button to select a new folder first for the installation.
option, and then click the “Finish” button to reboot the computer.
Note: After the installation is completed, users must restart the
computer to start the driver.
3.2.2 Verification
ICP DAS provides a ”VxCard Utility” program (VxCardUtil.exe) for users to
see all the COM ports on the system. It shows COM ports in two gorups, one for
VXC Card and one for others. So, users can check if any confliction occurred
between COM ports.
To launch the utility, just double-click on the ”VxCard Utility” short-cut on
your desktop.
Note: When the hardware and software are well installed, the driver turns
off the LED on the card. If there is something error, such as driver not
work or COM port number conflicted, the LED keeps lighting.
3.2.3 Configuration
If need, users can change the input buffer size (default is 4KB for each port,
up to 128KB) by setting the “SW FIFO” scroll-bar on the VxCard Utility.
To change the COM port mappings, users should restart the driver by
rebooting the computer, or launch a DOS box and run …
“Net Stop VxCarSer” command to stop the driver, then run
“Net Start VxCarSer” command to start the driver again.
3.2.4 Uninstallation
1. Select the “Start / Settings / Control Panel” and double-click the
“Add/Remove Programs” icon.
2. Select the “VxCard Driver NT” and click the “Add/Remove” button.
1. Launch the VxCard2K.exe to install the driver and register the related
2. Power off the computer and install the VxCard into the PC.
3. Power on your computer, Windows 2000 should find the new card and load
Note: It’s recommended to install the software first, and then the
hardware. This reduces the configuration procedures.
information onto the system.
the driver automatically. (Sometimes Win2K pops up few confirm dialog box,
just click “next” or “OK” to finish it.)
3.3.2 Verification
To verify the installation, please complete the following steps:
1. Select ”Start/Settings/Control Panel” and double-click the ”System” icon.
2. Click the ”Hardware” tab and then click the ”Device Manager” button.
The VXC Card is listed under the ”VXC Multi-port serial Card” class, and
each Communications Port is listed under the ”Ports (VxCard – RS-232/422/485)” class.
Note: When the hardware and software are well installed, the
driver turns off the LED on the card. If there is something error,
such as driver not work or COM port number conflicted, the LED
keeps lighting.
3.3.3 Configuration
If need, users can change the input buffer size (default is 4KB for each port,
up to 128KB) by setting the “SW FIFO” scroll-bar on the VxCard Utility. The
utility’s short cut is placed on the desktop after installation.
To change the COM port mappings, users should restart the driver by
rebooting the computer, or re-install the “VXC Card” hardware in the “Device
Manager” by un-install card and then scan new hardware.
3.3.4 Uninstallation
Before removing the card from your computer, it’s recommended to uninstall
the device from the ”Device Manager”. This removes unused hardware
information from the database (registry) of Windows.
1. Launch the VxCard2K.exe to install the driver and register the related
2. Power off the computer and install the VxCard into the PC.
3. Power on your computer, Windows XP/2003 should find the new card and
Note: It’s recommended to install the software first, and then the
hardware. This reduces the configuration procedures.
information onto the system. (Win2K driver also works on XP/Server 2003.)
load the driver automatically. (WinXP/2003 may pop up few confirm dialog
box, just click “next” or “OK” to finish it.)
3.4.2 Verification
To verify the installation, please complete the following steps:
1. Select ”Start/Settings/Control Panel” and double-click the ”System” icon.
2. Click the ”Hardware” tab and then click the ”Device Manager” button.
The VXC Card is listed under the ”VXC Multi-port serial Card” class, and
each Communications Port is listed under the ”Ports (VxCard – RS-232/422/485)” class.
Note: When the hardware and software are well installed, the driver turns
off the LED on the card. If there is something error, such as driver not
work or COM port number conflicted, the LED keeps lighting.
3.4.3 Configuration
If need, users can change the input buffer size (default is 4KB for each port,
up to 128KB) by setting the “SW FIFO” scroll-bar on the VxCard Utility. The
utility’s short cut is placed on the desktop after installation.
To change the COM port mappings, users should restart the driver by
rebooting the computer, or re-install the “VXC Card” hardware in the “Device
Manager” by un-install card and then scan new hardware.
3.4.4 Uninstallation
Before removing the card from your computer, it’s recommended to uninstall
the device from the ”Device Manager”. This removes unused hardware
information from the database (registry) of Windows.
This section describes VXC Card Linux driver’s features and how to compile
and install into a general Linux system. The VXC Card Linux driver is modified
from Linux kernel source and supports most of popular PC-based Linux
distributions.
3.5.1 Driver Features
Device file.
Dynamic device allocation.
Dynamic major number.
One major number for multiple devices.
Use the GNU configure and build system.
3.5.2 Installation
Please refer to the following steps to complete it.
1. Download or copy the IxCOM package to a directory that you have access to.
2. Extract the package.
For example, the package's file name is "ixcom-0.05.0.tar.gz" and its
path related to your current working directory is../pkg, then the extraction
command would be
gunzip -c ../pkg/ixcom-0.05.0.tar.gz | tar xvf –
or
tar -zxvf ../pkg/ixcom-0.05.0.tar.gz
An ixcom-0.05.0 directory is created after extraction.
3. For convenient access, it is a good idea to put a symbol-link on it.
ln -s ixcom-0.05.0 ixcom
4. Change to the ixcom working directory you just made, type
5. Once the configuring has done successfully, type “make” to build all.
Note: If you like to install files to system directory, the make install will
do it for you. However, install files to system directory is not necessary
for further operation. You will need the root privilege for that.
Script “./ixcom.inst” loads modules automatically. Script
“./ixcom.remove” removes the loaded modules. The root privilege is required
when installing or removing these kernel modules.
3.5.3 Access To VXC Serial Port
Script “ixcom.inst” will establish unused device major number dynamically
and create correspond device node for access VXC serial port.
Use “dmesg” command to inspect the driver output message.
dmesg
………
………
ICPDAS VXC multi-serial card Serial driver version 5.05c
(2001-07-08) with HUB-6 MANY_PORTS MULTIPORT
SHARE_IRQ SERIAL_PCI enabled
vxc major = 254
vxc aux_major = 253
PCI: Found IRQ 5 for device 00:13.0
ttySV0 at port 0xe0c0 (irq = 5) is a 16550A
ttySV1 at port 0xe0e0 (irq = 5) is a 16550A
The script “ixcom.inst” had loaded module into kernel and find a VXC card
To remove VXC driver from system use script “./ixcom.remove” to
removes the loaded modules.
3.5.4 Access to VXC Auxiliary Serial Port
Each port of the VXC card has a corresponding auxiliary device named
cuaV. The auxiliary device cuaV behave is very similar to serial device ttySV
except DCD signal identify.
A serial port will fails to open when the DCD signal is OFF and closing
automatically when DCD signal is OFF. But the auxiliary serial device will not to
check the status of DCD signal if ON when open serial port and not closing
serial port automatically when DCD signal is OFF. The auxiliary serial device will
be useful with dialing-out modem that fails to assert DCD signal when there is
no one called into it and there is no carrier. The cuaV device was once used for
dialing-out and ttySV used for dialing-in purpose traditionally.
Each ttySV device of VXC serial card has a corresponding auxiliary device
cuaV with the same minor number but different major number that create by
script ixcom.inst automatically.
• wBoards [OUT] number of boards found in this PC
• wSubVendor [IN] Sub-vendor ID of the board to be determined
• wSubDevice [IN] Sub-device ID of the board to be determined
• wSubAux [IN] Sub-aux ID of the board to be determined
Note: The “[IN]” symbolic indicates that the parameter should assign a
value by users, while the “[OUT]” symbolic indicates that the parameter
will return a value after calling the function.
The PIO_DriverInit function detects all VXC series cards in the system, and
is implemented based on the PCI plug & play mechanism. All VXC series cards
installed in this system will be detected and the resources will be saved in the
library.
Sample program 1:
Determine the resources for all VXC-142 cards in the PC
wSubVendor=0x61; wSubDevice=0x00; wSubAux=0x00; /* for VXC-142 */
wRetVal=PIO_DriverInit(&wBoards, wSubVendor,wSubDevice,wSubAux);
printf("There are %d VXC-142 card(s) in this PC\n",wBoards);
/* Step 2: save the resources of all cards installed in the PC */
for (i=0; i<wBoards; i++)
{ PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wID1,&wID2,&wID3,
&wID4,&wID5);
printf("\nCard_%d: wBase=%x, wIrq=%x", i,wBase,wIrq);
wConfigSpace[i][0]=wBaseAddress; /* save all resources of this card */
wConfigSpace[i][1]=wIrq; /* save all resources of this card */
}
Sample program 2:
Identify all VXC cards in the PC
wRetVal=PIO_DriverInit(&wBoards,0xff,0xff,0xff); /* identify all VXC cards */
printf("\nThere are %d VXC Cards in this PC",wBoards);
if (wBoards==0 ) exit(0);
wIrq [OUT] The IRQ channel number allocated to this board.
•
wSubVendor [OUT] The sub-vendor ID for this board.
• wSubDevice [OUT] The sub-device ID for this board.
• wSubAux [OUT] The sub-aux ID for this board.
• wSlotBus [OUT] The hardware slot ID1 for this board.
• wSlotDevice [OUT] The hardware slot ID2 for this board.
The PIO_GetConfigAddressSpace function can be used to save the
resource information for all VXC cards installed in the system. The application
program can then directly control the functions of each VXC series card.
A sample program source is as follows:
[IN] Board index number which between 0 and total boards –1.
wSubVendor=0x61; wSubDevice=0x00; wSubAux=0x00;/* for VXC-142 */
wRetVal=PIO_DriverInit(&wBoards, wSubVendor,wSubDevice,wSubAux);
printf("There are %d VXC-142 cards in this PC\n",wBoards);
/* Step 2: save the resources for each VXC-142 card installed in the PC */
for (i=0; i<wBoards; i++)
{ PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&t1,&t2,&t3,&t4,&t5);
printf("\nCard_%d: wBase=%x, wIrq=%x", i,wBase,wIrq);
wConfigSpace[i][0]=wBaseAddress; /* save all resources for this card */
wConfigSpace[i][1]=wIrq; /* save all resources for this card */
}
/* Step 3: directly control the VXC-142 */
wBase=wConfigSpace[0][0]; /* get the base address of card_0 */
outport(wBase,1); /* enable all D/I/O operations for card_0 */
wBase=wConfigSpace[1][0]; /* get the base address of card_1 */
outport(wBase,1); /* enable all D/I/O operations for card_1 */
4.1.3 Show_PIO_PISO
Show_PIO_PISO(wSubVendor,wSubDevice,wSubAux)
• wSubVendor [IN] the subVendor ID of the board to be determined
• wSubDevice [IN] the subDevice ID of the board to be determined
• wSubAux [IN] the subAux ID of the board to be determined
The Show_PIO_PISO function will display a text string to identify the special
subIDs. The text string is the same as that defined in PIO.H
The I/O address of the VXC series card is automatically assigned by the
main-board ROM BIOS. The I/O address can also be re-assigned by the user. It
is strongly recommended that user does not change the I/O address. The
plug & play BIOS will assign the correct I/O address to each VXC series
card.
The table below indicates the I/O address of the VXC-112A, VXC-142/142i
and VXC-182i series cards:
Address Read Write
wBase+0 Same RESET\ control register
wBase+2 Same Aux control register
wBase+3 Same Aux data register
wBase+5 N/A INT mask control register
wBase+7 Aux pin status register Same
wBase+0x2a N/A INT polarity control register
wBase+0xc0 Read Data from Port 1 Write Data to Port 1
wBase+0xe0 Read Data from Port 2 Write Data to Port 2
wBase+0xdc High/low speed mode of Port 1
wBase+0xfc High/low speed mode of Port 2
Note. Refer to Sec. 4.1 for more information regarding wBase.
outportb(wBase+5, 0); /* disables all interrupts */
outportb(wBase+5,0x03); /* enables INT ch0 and ch1 for VXC-142 */
outportb(wBase+5,0x0B); /* enables INT ch0 and ch1 for VXC-112A */
4.2.5 Aux Status Register
(Read/Write): wBase+7
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Aux7 Aux6 Aux5 Aux4 Aux3 Aux2 Aux1 Aux0
Note. Refer to Sec. 4.1 for more information regarding wBase.
Aux0=INT_CHAN_0, Aux1=INT_CHAN_1:
For VXC-142/142i and VXC-182i card.
Aux2=INT_CHAN_0, Aux3=INT_CHAN_1:
For VXC-112A card.
Aux0~3 are used as interrupt sources. The interrupt service routine must
read this register to perform interrupt source identification.
4.2.6 Interrupt Polarity Control Register
(Read/Write): wBase+0x2A
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0 0 0 0
Note. Refer to Sec. 4.1 for more information regarding wBase.
INV0~INV1: For VXC-142/142i and VXC-182i card.
INV2~INV3: For VXC-112A card.
If only one interrupt signal source is used, the interrupt service routine doesn’t
need to identify the interrupt source.
If there is more than one interrupt source, the interrupt service routine needs
to identify the active signals by:
1. Reading the new status of all interrupt signal sources
2. Servicing it if INT0 is active
3. Servicing it if INT1 is active
Note:
If the interrupt signal is too short, the interrupt service routine cannot
identify which interrupt source is active. Therefore, the interrupt signal
must be in the hold_active state long enough for the interrupt service
routine to be executed. The hold_time is different for different Operating
Systems. The hold_time can be as short as a microsecond or as long as a
whole second. In general, 20mS is a long enough to for successful
execution under any OS.
The interrupt output signal of the VXC card, INT\, is Level-Trigger and Active_Low. If INT\ generates a low_pulse, the VXC card will send an interrupt
signal to the PC only once. If INT\ is fixed in low_level, the VXC card will send
an interrupt signal to the PC continuously. Therefore, INT_CHAN_0/1 must be
controlled as a pulse_type signal, which must normally be fixed in a
low_level state and should generate a high_pulse when sending an
interrupt signal to the PC.
The INT_CHAN_0/1 priority is the same as the above. If both signals are
active at the same time, then INT\ will activate only once. The interrupt service
routine must read the status of all interrupt channels for multi-channel interrupts.
(to PCI slot)
INT_CHAN_1
initial_low
active_high
If only one interrupt source is used, the interrupt service routine doesn’t need
to read the status of the interrupt source.
The INT_CHAN_0 and INT_CHAN_1 architecture is shown in the above
figure. The only difference between INT0 and INT1 is that the INT_CHAN_0
signal source comes from the UART 0 interrupt output, and the INT_CHAN_1
signal source comes from the UART 1 interrupt output.
INT_CHAN_0/1 must be fixed in a low level state normally and should
generate a high_pulse when sending an interrupt signal to the PC.
INT0/1
Inverted/Noninverted
select
(INV0/1)
Enable/Disable select
(EN0/1)
The EN0/1 can be used to enable/disable the INT_CHAN_0/1 as follows:
(Refer to Sec.4.2.4) (Note: VXC-112A using EN2/3.)
INV0/1 can be used to invert/non-invert the INT0/1 as follows:
(Refer to Sec.4.2.6) (Note: VXC-112A using INV2/3.)
INV0/1 = 0 → INT_CHAN_0/1 = inverted state of INT0/1
INV0/1 = 1 → INT_CHAN_0/1 = non-inverted state of INT0/1
As mentioned above, if INT\ is fixed in a low level state, the VXC card
will continuously send interrupt signals to the PC. The interrupt service
routine should use INV0/1 to invert/non-invert INT0/1 and so generate a
high_pulse. (Note: VXC-112A using INV2/3.)