Moxa CA-108 Series Manual

Moxa CA-108 Series Manual

CA and CB Series Multiport Serial Module User’s Manual

Edition 8.1, November 2017 www.moxa.com/product

© 2017 Moxa Inc. All rights reserved.

CA and CB Series PC/104 Multiport Serial Module User’s Manual

The software described in this manual is furnished under a license agreement and may be used only in accordance with the terms of that agreement.

Copyright Notice

© 2017 Moxa Inc. All rights reserved.

Trademarks

The MOXA logo is a registered trademark of Moxa Inc. All other trademarks or registered marks in this manual belong to their respective manufacturers.

Disclaimer

Information in this document is subject to change without notice and does not represent a commitment on the part of Moxa. Moxa provides this document as is, without warranty of any kind, either expressed or implied, including, but not limited to, its particular purpose. Moxa reserves the right to make improvements and/or changes to this manual, or to the products and/or the programs described in this manual, at any time. Information provided in this manual is intended to be accurate and reliable. However, Moxa assumes no responsibility for its use, or for any infringements on the rights of third parties that may result from its use. This product might include unintentional technical or typographical errors. Changes are periodically made to the information herein to correct such errors, and these changes are incorporated into new editions of the publication.

Technical Support Contact Information

Moxa Americas

Toll-free: 1-888-669-2872 Tel: Fax: +1-714-528-6777 +1-714-528-6778

Moxa Europe

Tel: +49-89-3 70 03 99-0 Fax: +49-89-3 70 03 99-99

Moxa India

Tel: +91-80-4172-9088 Fax: +91-80-4132-1045

www.moxa.com/support

Moxa China (Shanghai office)

Toll-free: 800-820-5036 Tel: Fax: +86-21-5258-9955 +86-21-5258-5505

Moxa Asia-Pacific

Tel: +886-2-8919-1230 Fax: +886-2-8919-1231

Table of Contents

1.

2.

3.

4.

5.

6.

Introduction ...................................................................................................................................... 1-1

Overview ........................................................................................................................................... 1-2 Package Checklist ............................................................................................................................... 1-2

Product Specifications ......................................................................................................................... 1-3

Hardware Installation ....................................................................................................................... 2-1

Hardware Installation .......................................................................................................................... 2-2 Block Diagrams .................................................................................................................................. 2-2

I/O Base Address (For CA Series) .................................................................................................. 2-4

Rotary Switch(For CB Series) ........................................................................................................ 2-5 Termination Resistor .................................................................................................................... 2-5 Interrupt Vector for CA Series ....................................................................................................... 2-5

Serial Interface................................................................................................................................... 2-6

Software Installation ........................................................................................................................ 3-1

Windows OS ....................................................................................................................................... 3-2 Older OS for CA Series ................................................................................................................. 3-2

Older OS for CB Series ............................................................................................................... 3-20

Newer OS for Both CA/CB Series ................................................................................................. 3-43

Non-Windows OS .............................................................................................................................. 3-59

Serial Programming Tools ................................................................................................................. 4-1

Serial Programming Library .................................................................................................................. 4-2 PComm Utilities .................................................................................................................................. 4-2 Installation ................................................................................................................................. 4-2 PComm Diagnostic ...................................................................................................................... 4-2

PComm Monitor .......................................................................................................................... 4-3 PComm Terminal Emulator ........................................................................................................... 4-3

Smartio/Industio Programming Guide .............................................................................................. 5-1

Relative Product List ........................................................................................................................... 5-2 Resource Requirement for Moxa Board .................................................................................................. 5-2 PCI Configuration for Moxa Board ......................................................................................................... 5-2

UART Register Structure for MU860 chip ................................................................................................ 5-3

UART Register Structure for MUE250, MUE450, and MUE850 chips ............................................................ 5-4

For Baud Rate Setting ......................................................................................................................... 5-5

Moxa Board PCI Device ID List ............................................................................................................. 5-6 UART Datasheet ................................................................................................................................. 5-6

Pin Assignments ................................................................................................................................ 6-1

Box Header Pin Assignments ................................................................................................................ 6-1 RS-232 ...................................................................................................................................... 6-1 RS-422, 4-wire RS-485 ................................................................................................................ 6-1

2-wire RS-485 ............................................................................................................................ 6-2

1 1.

Introduction

Welcome to the CA and CB Series of PC/104 communication modules, a multiport serial module for industrial applications. It is designed for the PC/104 CPU and PC/104-Plus boards that respectively accept the PC/104 and PC/104-Plus expansion interface. Optional DB9 and DB25 cables are available to connect different devices. The CA Series includes the following models:

CA-108: CA-108-T: CA-114: CA-114-T: CA-134I: CA-134I-T: CA-104: CA-104-T : CA-132: CA-132-T: CA-132I: CA-132I-T:

8 ports, RS-232 8 ports, RS-232, wide temperature 4 ports, RS-232/422/485 4 ports, RS-232/422/485, wide temperature 4 ports, RS-422/485, optical isolation protection 4 ports, RS-422/485, optical isolation protection, wide temperature 4 ports, RS-232 4 ports, RS-232, wide temperature 2 ports, RS-422/485 2 ports, RS-422/485, wide temperature 2 ports, RS-422/485, optical isolation protection 2 ports, RS-422/485, optical isolation protection, wide temperature The CB Series includes the following models:

CB-108: CB-108-T: CB-114: CB-114-T: CB-134I: Cb-134I-T:

8 ports, RS-232 8 ports, RS-232, wide temperature 4 ports, RS-232/422/485 4 ports, RS-232/422/485, wide temperature 4 ports, RS-422/485, optical isolation protection 4 ports, RS-422/485, optical isolation protection, wide temperature 2 kV optical isolation is provided on optical isolation models. Wide-temperature models are rated for operation between -40 to 85°C. The following topics are covered in this chapter: 

Overview

Package Checklist

Product Specifications

CA Series PC/104 Introduction

Overview

The PC/104 standard serial boards are very popular for embedded applications. Moxa offers a wide selection of PC/104 and PC/104-Plus serial boards to provide industrial-grade connections to multiple serial devices. Use Moxa's serial boards so that your PC/104-based systems can establish serial device connections with high data throughput over multiple serial interfaces. The CA serial board series is for PC/104 modules, while the CB serial board series is for PC/104-Plus modules.

Package Checklist

MOXA performs a careful mechanical and electrical inspection of each module prior to shipping. Your module should arrive in perfect electrical order, free of any marks or scratches. Please handle the module by the edges only, since your body’s static charge can damage the integrated circuits. When the module is not in use, please keep it in the anti-static package provided. You may also use this package to return the module if it requires repair. The CA/CB Series module is shipped with the following items: • • • • Multiport serial module (PC/104 is for CA Series; PC/104-Plus is for CB Series) Documentation and software CD Quick installation guide 5-year product warranty statement

NOTE

Please notify your sales representative if any of the above items are missing or damaged. The CA Series module features the following: • • • • • • Two, four, or eight serial ports (depending on the model) RS-232, RS-422, or RS-485 operation (depending on the model) 64-byte FIFOs and on-chip flow control Up to 921.6Kbps data transmission speed Built-in 15 KV ESD protection Configurable IRQ and I/O settings • • Onboard Tx, Rx LED indicators for each port Optional wide temperature support (-40 to 85°C) The CB Series module features the following: • Four or eight serial ports (depending on the model) • RS-232, RS-422, or RS-485 operation (depending on the model) • 128-byte FIFOs and on-chip flow control • Up to 921.6Kbps data transmission speed • Built-in 15 KV ESD protection • Onboard Tx, Rx LED indicators for each port • Optional wide temperature support (-40 to 85°C) 1-2

CA Series PC/104 Introduction

Product Specifications

CA Series PC/104 Multiport Serial Module Hardware

I/O controller Connector Type 16C550C or compatible 40-pin box header (CA-108, CA-114, CA-134I, CA-104 ) 20-pin box header (CA-132 , CA-132I )

Interface

Bus No. of Ports PC/104 bus (Ver. 2.4) 2 ports (CA-132 , CA-132I ) 4 ports (CA-114, CA-134I, CA-104 ) 8 ports (CA-108) 8 Max. No. of Modules

Signals

RS-232 RS-422 4-wire RS-485 2-wire RS-485

Performance

Baudrate

Configuration

Parity Data Bits Stop Bit(s) IRQ FIFO Additional Settings Driver Support

Power and Environment

Operating Temperature TxD, RxD, RTS, CTS, DTR, DSR, DCD, GND TxD+(B), TxD-(A), RxD+(B), RxD-(A), GND TxD+(B), TxD-(A), RxD+(B), RxD-(A), GND Data+(B), Data-(A), GND 50 bps to 921.6 Kbps (supports nonstandard baud rates) None, Even, Odd, Space, Mark 5, 6, 7, 8 1, 1.5, 2 Shared IRQ for all ports (includes IRQ 3, 4, 5, 6, 7, 9, 10, 11, 12, 15) 64 bytes I/O base address, interrupt vector, serial interface (all by DIP switch) DOS Windows 2000/XP/2003/Vista/2008/7/8/8.1/10 (x86/x64), Windows Server 2008 R2/2012/2012 R2/2016 (x64) Linux 2.4, Linux 2.6 Operating Humidity Storage Temperature ESD Protection

Other

Dimensions (W x D) Regulatory Approvals

Warranty

Standard models: 0 to 55°C (32 to 131°F) “-T” models:, -40 to 85°C (-40 to 185°F) 5 to 95% RH -40 to 70°C (-40 to 158°F) Embedded 15 KV ESD protection 96 x 90 mm EN55022 Class A, EN55024, EN6100-3-2, EN61000-3-3, FCC Part 15 Class A 5 years 1-3

CA Series PC/104 Introduction CB Series PC/104-

Plus

Multiport Serial Module Hardware

I/O controller Connector Type MU860 (16C550C compatible) 40-pin box header

Interface

Bus No. of Ports PC/104-

Plus

(PCI) bus 4 ports (CB-114, CB-134I) 8 ports (CB-108) 8 Max. No. of Modules

Signals

RS-232 RS-422 4-wire RS-485 2-wire RS-485 TxD, RxD, RTS, CTS, DTR, DSR, DCD, GND TxD+(B), TxD-(A), RxD+(B), RxD-(A), GND TxD+(B), TxD-(A), RxD+(B), RxD-(A), GND Data+(B), Data-(A), GND

Performance

Baudrate 50 bps to 921.6 Kbps (supports nonstandard baud rates)

Configuration

Parity Data Bits Stop Bit(s) IRQ FIFO Additional Settings Driver Support None, Even, Odd, Space, Mark 5, 6, 7, 8 1, 1.5, 2 BIOS assigned 128 bytes Serial interface selection by DIP switch DOS Windows 2000/XP/2003/Vista/2008/7/8/8.1/10 (x86/x64), Windows Server 2008 R2/2012/2012 R2/2016 (x64) Linux 2.4, Linux 2.6 (x86 and x64)

Power and Environment

Operating Temperature Operating Humidity Storage Temperature ESD Protection

Other

Dimensions (W x D) Regulatory Approvals

Warranty

Standard models: 0 to 55°C (32 to 131°F) “-T” models:, -40 to 85°C (-40 to 185°F) 5 to 95% RH -40 to 70°C (-40 to 158°F) Embedded 15 KV ESD protection 96 x 90 mm EN55022 Class A, EN55024, EN6100-3-2, EN61000-3-3, FCC Part 15 Class A 5 years 1-4

2 2.

Hardware Installation

This chapter explains how to install the CA/CB Series multiport serial module. The following topics are covered in this chapter: 

Hardware Installation

Block Diagrams

I/O Base Address (For CA Series)

Rotary Switch(For CB Series)

Termination Resistor

Interrupt Vector for CA Series

Serial Interface

CA Series PC/104 Hardware Installation

Hardware Installation

Installing the CA/CB Series module is easy. For the CA Series, before inserting the module into the PC/104 slot, you must first configure the I/O base address, interrupt vector, IRQ, and serial interface (for select models).

ATTENTION

Safety First!

To prevent damage to your system or board, make sure your embedded PC’s power is turned off before installing your CA/CB Series module.

CA Series Step 1: Step 2: Step 3: Step 4: Step 5: Step 6:

Shut off power to your embedded PC and to any peripheral devices. After shutting off power, remove the cover of your embedded PC. Use the DIP switches on the module to select the I/O base address, interrupt vector, IRQ, and serial interface (for select models). Details for each model are provided later in this chapter. Insert the module firmly into the embedded PC’s PC/104 slot. Screw the control board in place Connect the cables. Power on the embedded PC.

CB Series Step 1: Step 2: Step 3: Step 4: Step 5: Step 6: Step 7:

Shut off power to your embedded PC and to any peripheral devices. After shutting off power, remove the cover of your embedded PC. Use the DIP switches on the module to select the serial interface. Details for each model are provided later in this chapter. Insert the module firmly into the embedded PC’s PC/104-Plus slot. Screw the control board in place. Connect the cables. Power on the embedded PC. The BIOS will automatically set the IRQ and I/O address. Proceed with the software installation. Please refer to Chapter 3.

Block Diagrams

CA-108

2-2

CA Series PC/104 CA-114 CA-134I, CA-132 , CA-132I CA-104 Hardware Installation

2-3

CA Series PC/104 CB-108 Hardware Installation CB-114 CB-134I

I/O Base Address (For CA Series)

Use DIP switch SW1 to set port 1’s I/O base address. The other ports will be configured automatically. The default I/O base address is 0×180 and allows settings from 0×000 to 0×3FF. Some popular settings are provided below:

A3 8

ON ON

A4 1

ON ON

A5 2

ON ON

A6 4

ON ON

A7 8

ON ON

A8 1

ON ON

A9 2

ON off

Hex

0×000 0×200 2-4

CA Series PC/104

ON ON ON ON ON off off off off off off off ON ON ON ON off off ON off off off off off ON ON ON off off off ON ON off off off off ON ON off off off off ON ON ON off off off ON off off off off off ON ON ON ON off off For example, an I/O base address of 0×180 should be set as follows:

A3

ON

A4

ON

A5

ON

A6

ON

A7

off

A8

off off off off off off off ON ON ON ON ON ON

A9

ON

Hardware Installation

off off off off off off ON ON ON ON ON off 0×300 0×380 0×3C0 0×3E0 0×3F0 0×3F8 0×008 0×018 0×038 0×078 0×0F8 0×2F8

Hex

0×180 = on, = off The other serial ports will be set automatically to 0×188, 0×190, 0×198, etc.

Rotary Switch(For CB Series)

A rotary switch on the board makes it easy to set the appropriate signals, particularly when installing multiple PC/104-Plus modules in the same unit. The rotary switch, which looks like a clock, provides a bidirectional path with no signal propagation delay. The first module on the stack should be set to CLK0, the second to CLK1, etc., to eliminate clock skew between modules.

Termination Resistor

Onboard termination resistors can be activated individually for each serial port using jumpers. With regard to the CA Series: for CA-114 and CA-134I, use JP1 through JP4; for CA-132 and CA-132I, use JP1 and JP2. JP1 corresponds to serial port 1. For the CB Series, use jumpers JP1 through JP4. JP1 corresponds to serial port 1. Short the jumper pins to activate the termination resistor; leave the jumper pins open to bypass the termination resistor.

Interrupt Vector for CA Series

Use DIP switch SW2 to set port 1’s interrupt vector. The default interrupt vector is 0×1C0, with SW2 set as follows:

A3

ON

A4

ON

A5

ON

A6

off

A7

off

A8

off

A9

ON

Hex

0×1C0 2-5

CA Series PC/104 Hardware Installation

= on, = off

Serial Interface CA Series

For the CA-114, use SW3, SW4, and SW5 to select the serial interface as follows:

Interface SW3 SW4 SW5 RS-232

– – ON

RS-422

– ON OFF

4w RS-485

ON OFF OFF

2w RS-485

OFF OFF OFF For the CA-134I, CA-132 , and CA-132I , use the 2-WIRE/4-WIRE and RS-422/RS-485 DIP switches to select the serial interface as follows:

Interface RS-422 4-wire RS-485 2-wire RS-485 2-WIRE/4-WIRE

– OFF ON

RS-422/RS-485

OFF ON ON

CB Series

For the CB-114 and CB-134I, use the DIP switch to select serial interface.

CB-114 Mode

RS-232 RS-422 4-wire RS-485 2-wire RS-485

S1

- - ON OFF

S2

- ON OFF OFF

S3

ON OFF OFF OFF

CB-134I Mode

RS-422 4-wire RS-485 2-wire RS-485

S1

- OFF ON

S2

OFF ON ON 2-6

CA Series PC/104 Hardware Installation

IRQ for CA Series

Before selecting an IRQ, please enter the PC’s BIOS and reserve a dedicated IRQ for the module. On the module, the IRQ is set by a jumper. Before inserting the module into the PC/104 slot, use the jumper to select an IRQ (3, 4, 5, 6, 7, 9, 10, 11, 12, or 15). 2-7

3 3.

Software Installation

After installing the CA/CB Series module in your embedded computer, the next step is installing the software. Drivers for various operating systems are provided, including DOS, Windows, and Linux. This chapter explains how to install and remove the CA/CB Series driver. The following topics are covered in this chapter: 

Windows OS

Older OS for CA Series

Older OS for CB Series

Newer OS for Both CA/CB Series

Non-Windows OS

CA Series PC/104

Windows OS Older OS for CA Series

Software Installation

DOS

Moxa DOS API-232 is a software package that can help you develop or debug serial communications programs. This section will explain how to install the package, set up the driver, and load or unload the driver. For additional information about the API-232 library and utilities, please refer to Chapter 4. The DOS drivers support the CA-104, CA-104-T, CA-132, CA-132-T, CA-132I, and CA-132I-T. The CA-108, CA-114, and CA-134I models are not supported under DOS. In the following instructions, the CA-104 is used as an example.

Installing the Driver

Run the installation program,

DOSINST.EXE

, in the DOS folder. Specify the target directory for the API-232 files (e.g.,

C:\MOXA

). Press

F2

to start the installation. When the installation is completed, you will be prompted to set up the board and driver initial values. We strongly recommendthat you do so. 3-2

CA Series PC/104 Software Installation Driver Setup

The following instructions are not intended to illustrate every function of the setup program. For more detailed information, please refer to the help files by pressing F1 in the setup program. 1. Run the setup program

BIN\SETUP.EXE

. 2. Select your CA Series model and press

Enter

. 3. You must set the Port No., I/O Address, IRQ, and INT Vector properly. These settings must match your module’s hardware configuration. 4. Press

PgDn

to view advanced the port setup options. Your module’s configuration will be displayed along with other settings, such as port number, buffer size, etc. 3-3

CA Series PC/104

5. Verify the settings and make any necessary changes.

Software Installation Port number: TxD buffer size: RxD buffer size: F5: Group Edit:

This is the port ID of each port. Application software will refer to a port by its port number (ID). Port numbers must be unique; duplicated port numbers are not allowed. The port ID can range from 0 to 127 as long as it does not overlap with another port. Generally, you should consider the convenience of programming when specifying the port number. This is the transmission (output) buffer allocated in the system for each port. This is the receiving (input) buffer allocated in the system for each port. This allows you to configure several ports simultaneously as a group. 6. Press

F10

to save the latest configuration and exit the setup program. 3-4

CA Series PC/104 Software Installation Loading the Driver

After setting up the driver, you must load the driver in order to gain access to the serial ports on the module. Run

BIN\DPC-DRV.EXE

at the DOS prompt. The driver will detect your CA Series module automatically. You should see messages indicating successful detection of your module, such as the following: PC/104 Communication Module DOS driver Version 1.0 Setup driver … CA-104 series OK! Device driver setup O.K. At this point, you can execute applications that support API-232 functions, or start developing applications using the API-232 library.

Unloading the Driver

To unload or release the CA Series driver from memory, enter

DPC-DRV/Q

at the DOS prompt.

Windows NT

The Windows NT drivers conform to the Win32 COMM API standard and support the CA-104, CA-104-T, CA-132, CA-132-T, CA-132I, CA-132I-T. CA-108, CA-114, and CA-134I. In the following instructions, the CA-104 is used as an example.

Installing the Driver

1. Right-click

Network Neighborhood

and select

Properties

in the context menu. 2. Under the

Adapters

tab, click

Add…

. 3-5

CA Series PC/104

3. When prompted to select a network adapter, click

Have Disk

.

Software Installation

4. At the prompt, insert the installation disk provided with your module. For the location, enter

A:\windows.nt

. Click

OK

to continue. 5. Windows will install the drivers. 3-6

CA Series PC/104 Software Installation

6. After the files have been installed, a configuration panel will open. Click

Add

to continue. 7. Under

Board Type

, select your CA Series model. The window will show the COM port numbers that will be assigned to the CA Series serial ports, as well as other settings. Click

OK

to continue. 3-7

CA Series PC/104 Software Installation

8. The CA Series module will appear as a network adapter. Click

OK

to complete installation of the module.

Uninstalling the Module

1. Right-click

Network Neighborhood

and select

Properties

in the context menu. 3-8

CA Series PC/104

2. Under the

Adapters

tab, select your CA Series module and click

Remove

.

Software Installation

3. A confirmation dialog will appear. Click

OK

to uninstall the device.

Windows 95, 98, ME

The Windows 95/98/ME drivers conform to the Win32 COMM API standard and support the CA-104, CA-104-T, CA-132, CA-132-T, CA-132I, CA-132I-T, CA-108, CA-114, and CA-134I. In the following instructions, the CA-104 is used as an example.

Installing the Driver

1. Insert the CA Series installation disk and run

Setup95.exe

through

Start menu

Run

. 3-9

CA Series PC/104

2. Click

Next

to proceed through the Welcome screens.

Software Installation

3. Windows will install the drivers. When the installation has been completed, click

Finish

. 3-10

CA Series PC/104 Software Installation

4. After the files have been installed, a configuration panel will open. Click

Add

to continue. 5. Under

Board Type

, select your CA Series model. The window will show the COM port numbers that will be assigned to the CA Series serial ports, as well as other settings. Click

OK

to continue. 3-11

CA Series PC/104 Software Installation

6. The CA Series module will now appear in the configuration panel. Click

OK

to complete installation of the module. Open the configuration panel again through

Start

Programs

Moxa Utilities

MOXA PC104 Communication Module Configuration Panel

.

Uninstalling the Module

Open the configuration panel through

Start>Programs>Moxa Utilities>Moxa PC104 Communication Module Configuration Panel

. Select your CA Series module and click Remove 2. A confirmation dialog will appear. Click

Yes

to uninstall the device. 3-12

CA Series PC/104 Software Installation

3. To remove the driver from the system, open

Add/Remove Programs

in the

Control Panel

. 4. Under the

Install/Uninstall

tab, select

MOXA PC104 Communication Module Driver

and click

Add/Remove

. 3-13

CA Series PC/104

5. A confirmation dialog will appear. Click

Yes

to remove the driver.

Software Installation

6. After the driver has been removed, click

OK

to close the window.

Windows CE 5.0

In this section, we explain how to install Moxa CA series boards under WinCE 5.0. These instructions are intended for users who are familiar with the Windows CE Platform Builder 5.0 ToolKit, and who would like to install one or more Moxa Tech products. Here, we only give the step-by-step installation instructions for the development environment. You will need to download the image file to the target host yourself. The WinCE 5.0 driver for the Moxa CA Series PC/104 Multiport Serial Module supports the following products: CA Series: CA-108, CA-114, CA-134I, CA-104, CA-132, and CA-132I. In the the following steps, we are using CA-104 as an example.

Installing the driver

The following procedure explains how to install the CA-104 multiport serial module driver under WinCE. 1. Obtain a copy of the Moxa Tech WinCE 5.0 driver package and extract it to your computer. Double-click the

Installation

icon to copy the Mxpcdrv folder to %WINCEROOT%\PLATFORM\ automatically, and import the supported Moxa Tech products into the

Folder

. 2. Start WinCE Platform Builder, and then select

File

New Platform

. 3-14

CA Series PC/104

3. Enter a workspace name and then press

Next

.

Software Installation

4. When you see Board Support Packages, Design Template, Applications & Media, Networking & Communications, OBEX Server, select what you need to build your own environment. The

Completing the New Platform Wizard

window will open to indicate that it has created a new platform. Click

Finish

to complete the setup. 3-15

CA Series PC/104 Software Installation

3-16

CA Series PC/104 Software Installation NOTE

5. Select

File

Manage Catalog Items In View

Catalog

, and browse

\Third Party\Device Drivers\ MOXA Smartio/Industio-PC/104

. Right-click on the driver Prefix COM or Prefix MXU you would like to include and choose

Add to OS Design

. You can only select either Prefix COM or Prefix MXU, but not both. Prefix COM supports up to 10 ports, from COM0 to COM9. Prefix MXU supports more than 10 ports, so it is better for you to select Prefix MXU if you are not sure how many ports the device has. Otherwise, you will only 3-17

CA Series PC/104

be allowed to use one multiport serial board on the target host.

Software Installation NOTE

6. After adding Moxa Tech drivers into your OS Design, a new project is automatically added to your workspace. The project name is mxpcdrvce5.reg. The project can be accessed from

View

File View

. The mxpcdrvce5.reg project contains a number of files used to configure the drivers included in your OS Design. For ISA boards, remember to set the IRQ and I/O address in mxpcdrvce5.reg. For example, if your IRQ is 10, IOBASE is 0180, Interrupt and Vector is 01c0, then you should configure “1A” for SysIntr, “0180” and “01c0” for IOBASE, “A” for IRQ ,and “1” for FIFO. When applying the formula “IRQ+10”, remember that IRQ is in base 10, and 10 is in Hex format. If we first convert the IRQ value to Hex format, then SysIntr will equal 1A. Otherwise, set FIFO to 1 to enable the FIFO. To use the “Terminal Emulator” tool, modify mxpcdrvce5.reg and keyboard as shown below (this is just for “one” “COM” port). Take note of the number of ports, COM, and MXU, and then enter the correct information. [HKEY_LOCAL_MACHINE\ExtModems\HayesCompat1] “Port”=”COM2:” “DeviceType”=dword:1 “FriendlyName”=”Hayes Compatible on COM2:” 3-18

CA Series PC/104 Software Installation

7. Finally, open Build OS, select Build and Sysgen, and be sure to click

Copy Files to Release Directory After Build

and

Make Run-Time Image After Build

.

NOTE

8. Finally, copy your image file to the target host. If you created a Windows CE Platform Builder in the development environment, skip steps 2, 3, and 4. 3-19

CA Series PC/104

Older OS for CB Series

Software Installation

DOS

Moxa DOS API-232 is a software package that can help you develop or debug serial communications programs. This section will explain how to install the package, set up the driver, and load or unload the driver. For additional information about the API-232 library and utilities, please refer to Chapter 4. The DOS drivers support all models in the CB Series. In the following instructions, the CB-104 is used as an example.

Installing the Driver

Run the installation program,

DOSINST.EXE

, in the DOS folder. Specify the target directory for the API-232 files (e.g.,

C:\MOXA

). Press

F2

to start the installation. strongly recommend that you do so. After the installation has been completed, you will be prompted to set up the board and driver initial values. We 3-20

CA Series PC/104 Software Installation Driver Setup

The following instructions are not intended to illustrate every function of the setup program. For more detailed information, please refer to the help files by pressing F1 in the setup program. 1. Run the setup program

BIN\SETUP.EXE

. 2. Select your CB Series model and press

Enter

. 3. A window will open, displaying all configuration information for all installed modules. Press

PgDn

to view advanced port setup options and to make configuration changes. Your module’s configuration will be displayed along with other settings such as port number, buffer size, etc. 4. Verify the settings and make any necessary changes.

Port number: TxD buffer size: RxD buffer size: F5: Group Edit:

This is the port ID of each port. Application software will refer to a port by its port number (ID). Port numbers must be unique; duplicate port numbers are not allowed. The port ID can range from 0 to 127 as long as it does not overlap with another port. Generally, you should consider the convenience of programming when specifying the port number. This is the transmission (output) buffer allocated in the system for each port. This is the receiving (input) buffer allocated in the system for each port. This allows you to configure several ports simultaneously as a group. 3-21

CA Series PC/104 Software Installation

5. Press

F10

to save the latest configuration and exit the setup program.

Loading the Driver

After setting up the driver, you must load the driver in order to gain access to the serial ports on the module. Run

BIN\DPC-DRV.EXE

at the DOS prompt. The driver will detect your CB Series module automatically. You should see messages indicating successful detection of your module, such as the following: Smartio/Industio Family DOS driver Version 1.8 Setup driver … CB-114 series (Bus=x, Dev=y): OK! Device driver setup O.K. At this point, you can execute applications that support API-232 functions, or start developing applications using the API-232 library.

Unloading the Driver

To unload or release the CB Series driver from memory, enter

DPC-DRV/Q

at the DOS prompt. 3-22

CA Series PC/104

Windows NT

Software Installation Installing the Driver

You will need to plug the board in an available PCI or PCI-X slot first, before installing the driver. Note that these instructions use the CB-114 as an example. The procedure for installing all models is the same. 1. Log into Windows NT as Administrator. 2. Locate the appropriate folder for your board’s drivers on the Document & Software CD. The NT drivers will be located under the product folder in the

\Software\WinNT

directory (e.g., under \CB-114 Series\Software). Copy this folder to the PC’s hard disk and remember its location. 3. In the

Control Panel

, open

Network

applet. On the

Adapters

tab, click

Add

. When prompted to select a product, click

Have Disk….

You will be prompted to enter the path to the driver. Enter the location of the drivers that you copied from the Document & Software CD (

C:\Windows.nt

in this example) and then click

OK

. 4. When prompted, select your board model (

Smartio/Industio Family multiport board

in this example) and click

OK

. 3-23

CA Series PC/104 Software Installation

5. After the files have been installed, a configuration panel will open. This is where boards are installed, configured, and removed. If another board has already been installed on the system, it will already be listed. Windows NT does not automatically detect Moxa UPCI boards, so you will need to click

Add

for a newly installed board. 6. Under

Board Type

, select the UPCI board that is being installed. The window will show the COM settings for the serial ports on the board. You can modify the COM settings for any port at this time by selecting a port and clicking

Port Setting

. If you are satisfied with the COM settings, click

OK

to return to the configuration panel. 3-24

CA Series PC/104 Software Installation

7. The board will now appear in the configuration panel (

CB-114 Series in this example

). Click

OK

to return to the Network applet. After that, click

OK

again to exit the Network applet 8. Restart the PC. After you have logged back into Windows NT, you may check the event log issued by the Moxa driver to see if the board’s ports have been initialized successfully. In the

Administrative

group, open

Event Viewer

and select

Log and System

. For each newly installed or configured Moxa UPCI board, check for a message stating that the board has been enabled (e.g., “MoxaCB-114 board, with first serial port COM3, has been enabled”).

Configuring the Ports

1. In Windows

Control Panel

, open the

Network

applet. In the

Adapters

tab, UPCI boards will appear as a type of Moxa adapter (

MOXA Smartio/Industio Family Adapter

in this example). Select the Moxa adapter and click

Properties…

. 3-25

CA Series PC/104 Software Installation

2. The configuration panel will open with a list of installed boards. Select your board and click

Property

. Up to four Moxa UPCI boards can be installed at a time. 3. Select a port to configure and click

Port Setting

. 3-26

CA Series PC/104 Software Installation

Under

Port Number

, select a COM number to assign to the serial port. Select

Auto Enumerating COM Number

to map subsequent ports in numerical order. For example, if COM 3 is assigned to Port 1, then COM 4 will be automatically assigned to Port 2.

4. Select an

Rx FIFO Trigger

and

Tx FIFO Size

. The default Rx FIFO Trigger is 120 bytes (high level). The default Tx FIFO Size is 128 bytes (high level). Select

Set the change to all ports

to use this setting for all serial ports on the board. High Middle

TxFIFO

128 64

RxFIFO

120 60 Low 1 1 5. Click

OK

to approve the settings for the selected port. Continue in the same way to configure the other ports. When you have finished setting up the ports, click

OK

to close the

Properties

window and apply the new port settings. Click

OK

again to exit the Network applet.

Removing the Board

To remove a board, shut of your PC and physically remove the board from the PCI slot. The next time you start up the PC, Windows NT will automatically remove the configuration. You do not need to go through the Windows control panel. 3-27

CA Series PC/104 Software Installation Updating the Driver

1. In Windows

Control Panel

, open the

Network

applet. Under the

Adapters

tab, UPCI boards will appear as a type of Moxa adapter (

MOXA Smartio/Industio Family Adapter

in this example). Select the Moxa adapter and click

Remove

. 2. Restart the system. 3. Go through the process of installing the drivers, using the new drivers.

Removing the Driver

1. In the Windows

Control Panel

, open the

Network

applet. Under the

Adapters

tab, UPCI boards will appear as a type of Moxa adapter (

MOXA Smartio/Industio Family Adapter

in this example). Select the Moxa adapter and click

Remove

. 2. Click

OK

to exit the Network applet and restart the system. 3-28

CA Series PC/104

Windows 95/98/ME

Software Installation Installing the Driver

Windows 95

1. After the board is physically installed and the PC boots up, Windows will automatically detect the new board and the Found New Hardware Wizard window will open. Click

Next

to continue. 2. Select

Other Locations…

3. Click

Browse

and select the appropriate directory on the Document & Software CD for the driver. Drivers for all operating systems are located under the product folder in the

\Software

directory. Select the

\Win9x

folder and click

OK

to continue. 3-29

CA Series PC/104

4. After Windows finds the drivers, click

Finish

.

Software Installation

You can configure and use the new COM ports right away without restarting Windows.

Windows 98 and ME

1. After the board is physically installed and the PC boots up, Windows will automatically detect the new board and the

Found New Hardware Wizard

window will open. Click

Next

to continue. 3-30

CA Series PC/104

2. Select

Display a list...

and click

Next

.

Software Installation

3. Select

Other Devices

and click

Next

. 4. Select

Have Disk…

5. Click

Browse

and select the appropriate directory on the Document & Software CD for the driver. Drivers for all operating systems are located under the product folder in the

\Software

directory. Select the

\Win9x

folder and click

OK

to continue. 3-31

CA Series PC/104

6. After Windows has installed the drivers, click

Finish

.

Software Installation Configuring the Ports

Configure the COM ports after the board and drivers have been installed. 1. In the Windows

Control Panel

, open the

System

applet. 3-32

CA Series PC/104 Software Installation

2. In the

Device Manager

tab, expand the

Moxa Smartio/Industio multiport board

category by clicking the

“+”

sign next to it. Select the desired board and click

Properties

. 3. Under the

Ports Configuration

tab, select a port to configure and click

Port Setting

. 3-33

CA Series PC/104 Software Installation

Under

Port Number

, select a COM number to assign to the serial port. Select

Auto Enumerating COM Number

to map subsequent ports in numerical order. For example, if COM 3 is assigned to Port 1, then COM 4 will be automatically assigned to Port 2. 4. Select an

Rx FIFO Trigger

and

Tx FIFO Size

. The default Rx FIFO Trigger is 120 bytes (high level). The default Tx FIFO Size is 128 bytes (high level). Select

Set the change to all ports

to use this setting for all serial ports on the board. High Middle Low

TxFIFO

128 64 1

RxFIFO

120 60 1 5. Click

OK

to approve the settings for the selected port. Continue in the same way to configure the other ports. When you have finished setting up the ports, click

OK

to close the

Properties

window and apply the new port settings. Click

OK

again to close the

Device Manager

and restart the system.

Updating the Driver

You may configure the COM ports after the board and drivers have been installed. 1. In the Windows

Control Panel

, open the

System

applet. 3-34

CA Series PC/104 Software Installation

2. Under the

Device Manager

tab, expand the

Moxa Smartio/Industio multiport board

category by clicking the

“+”

sign next to it. Select the desired board and click

Properties

. 3. In the

Driver

tab, click

Update Driver

.... 3-35

CA Series PC/104 Software Installation

4. Select the appropriate model (CP-168U in this example) and click

Have Disk...

5. When prompted, select the appropriate directory on the Document & Software CD for the driver. Drivers for all operating systems are located under the product folder in the

\Software

directory. Select the

\Win9x

folder and click

OK

to continue. 6. You will be prompted to restart the system. The new drivers will be in effect the next time you restart.

Removing the Driver

1. In the Windows Control Panel, open the

Add/Remove Programs

applet. On the Install/Uninstall tab, select

MOXA Smartio/Industio Driver

and click

Add/Remove

. 2. When prompted, click

Yes

to confirm that you want to remove the driver. 3-36

CA Series PC/104 Software Installation

3. After the driver has been removed, click

OK

to return to the

Add/Remove Programs

applet.

Windows CE 5.0

In this section, we explain how to install Moxa CB series boards under WinCE 5.0. These instructions are intended for users who are familiar with the Windows CE Platform Builder 5.0 Toolkit, and would like to install one or more Moxa Tech products. Here, we only give the step-by-step installation instructions for the development environment. You will need to download the image file to the target host yourself. The WinCE 5.0 driver for the Moxa CB Series PC/104-

Plus

Multiport Serial Module supports the following products: CB Series: CB-108, CB-114, CB-134I The CB-114 board is used to illustrate the installation procedure.

Installing the driver

The following procedure explains how to install the CB-114 multiport serial module driver under WinCE. 1. Obtain a copy of Moxa Tech WinCE 5.0 driver package and extract it to your computer. Double-click the Install package to copy the

Mxser

folder to %WINCEROOT%\PLATFORM\ automatically, and import the supported MOXA Tech products into the

Folder

. 2. Start WinCE Platform Builder, select

File

, and open

New Platform

. 3-37

CA Series PC/104

3. Enter a name for Workspace and press

Next

.

Software Installation

4. When you see

Board Support Packages, Design Template, Applications & Media, Networking & Communications, OBEX Server

, select what you need to build your own environment. The

Completing the New Platform Wizard

window will open to indicate that it has finished creating a new platform. Click

Finish

to complete the setup. 3-38

CA Series PC/104 Software Installation

3-39

CA Series PC/104 Software Installation

3-40

CA Series PC/104 Software Installation NOTE

5. Open Manage Catalog Items (

File

Manage Catalog Items

). Under

Catalog

(

View

Catalog

), browse t

\Third Party\Device Drivers\ MOXA Smartio/Industio-PCI, PC/104-

Plus

. Right-click on the driver

Prefix COM

or

Prefix MXU

you would like to include and choose

Add to OS Design.

You can only select either Prefix COM or Prefix MXU, but not both. Prefix COM supports up to 10 ports, from COM0 to COM9. Prefix MXU supports more than 10 ports, so it is better to select Prefix MXU if you are not sure how many ports the device has. Otherwise, you will only be allowed to use one multiport serial board on the target host. 3-41

CA Series PC/104 Software Installation

6. After adding Moxa Tech drivers into your

OS Design

, a new project is automatically added to your workspace. The project name is

mxserce5

. The project can be accessed from File View (

View

File View

). The

mxserce5

project contains a number of files used to configure the drivers included in your

OS Design

.

NOTE

If you would like to use the “Terminal Emulator” tool, please modify mxserce5.reg and keyboard like below (This is only just for “one” “COM” port). You have to take note of the number of ports, COM, MXU, and enter the correct information. [HKEY_LOCAL_MACHINE\ExtModems\HayesCompat1] “Port”=”COM2:” “DeviceType”=dword:1 “FriendlyName”=”Hayes Compatible on COM2:” 3-42

CA Series PC/104 Software Installation

7. Finally, open

Build OS

, select

Build and Sysgen

, and be sure to click

Copy Files to Release Directory After Build

and

Make Run-Time Image After Build

.

NOTE

8. Finally, copy your image file to the target host. If you have created a Windows CE Platform Builder in the development environment, skip steps 2, 3, and 4..

Newer OS for Both CA/CB Series

NOTE

   The content below will describe the software installation for newer Windows OS, including Windows 2000/XP/2003/Vista/2008/7/8/8.1/10 (x86/x64), Windows Server 2008 R2/2012/2012 R2/2016 (x64) The following topics include   Installing the Driver Configuring the Ports Checking the Status Removing the Driver Uninstallation the Driver We will take Window 7 (x64) for example, to let you know how to install your CA or CB boards. The installation procedure of Windows7 is similar to the other Windows platforms. The content describes how to install, configure, check the port status, remove, or uninstall the CA or CB boards. In the installation section, the CA Series has more installation procedures as it follows the ISA standard. The content will be added, followed by the installation part of CB Series. 3-43

CA Series PC/104 Software Installation NOTE Installing the Driver

In this section, we will describe how to install the CA or CB boards for the first time with Windows 7. First, make sure that you have already plugged the board or boards into the system’s PC/104 or PC/104-Plus slot(s). If you have already installed Moxa CA or CB board(s) in your computer, and you are installing additional boards, Windows 7 will automatically detect and install the new board(s) the next time you boot up the computer. In this case, proceed directly to the next section, “Configuring the Ports,” to configure the ports’ serial transmission parameters. Second, download the drivers at www.moxa.com

. Based on the OS type, choose the corresponding driver. Then, follow the following procedures to install the driver. 1. The Setup Wizard will open. Click

Next

to install the driver. 2. Please read the license agreement. If you agree, click

Next

to move on. 3-44

CA Series PC/104 Software Installation

3. Click

Next

to install the driver in the indicated folder, or use the drop-down folder list to locate a different folder. 4. Click

Install

to proceed with the installation. 3-45

CA Series PC/104

5. Click

Finish

to complete the installation of the driver.

Software Installation

If your model is from the CB Series, then the installation is done. Otherwise, you need to do the following steps to complete the installation for the CA Series (CA-114 Series is taken as example). 1. Select

Add Hardware Wizard

from the Control Panel. When the wizard opens, click

Next

to continue. 3-46

CA Series PC/104 Software Installation

2. Select

Yes, I have already connected the hardware

and click

Next

to continue. 3. Select

Add a new hardware device

and click

Next

to continue. 3-47

CA Series PC/104 Software Installation

4. Select

Install the hardware that I manually select from a list (Advanced)

and click

Next

to continue. 5. Select

Multi-port serial adapters

and click

Next

to continue. 3-48

CA Series PC/104

6. Select your CA Series model and click

Next

to continue.

Software Installation

7. To begin installing the module, click

Next

. 3-49

CA Series PC/104 Software Installation

8. If you see a warning that the software has not passed Windows Logo testing, click

Continue Anyway

. 9. Windows will install the drivers. When the installation has been completed, click

Finish

. 3-50

CA Series PC/104 Software Installation

10. After the module has been installed, you will be prompted to install the new serial ports. A

Found New Hardware Wizard

window will open for the first serial port, port 0. Select

No, not this time

and click

Next

. 11. Select

Install from a list or specific location (Advanced)

and click

Next

. 3-51

CA Series PC/104 Software Installation

12. Select

Search for the best driver in these locations

and

Include this location in the search

. Select the

\Program Files\MOXA\SmartioIndustioDriver

folder on the C drive disk, and click

Next

. 13. If you see a warning that the software has not passed Windows Logo testing, click

Continue Anyway

. 14. Windows will install the necessary drivers. 3-52

CA Series PC/104

15. After the installation is complete, click

Finish

.

Software Installation

16. Repeat the installation process for the remaining serial ports.

Configuring the Ports

After the driver has been installed, use Device Manager to configure the serial port of your CA or CB boards (CB-134I Series will be used as example). In this section, we describe how to access MOXA Smartio/Industio Window Driver and lead you to do the serial port configuration.   Accessing MOXA Smartio/Industio Window Driver Configuring Serial Port   Port Number Rx, TX FIFO 3-53

CA Series PC/104 Software Installation

Accessing MOXA Smartio/Industio Window Driver

Expand the

Multi-port serial adapters

tab, right-click

CB-134I Series (PC/104-Plus)

, and then click

Properties

to open the board’s configuration panel.

Configuring the Serial Ports

Port Number

1. Click the port you would like to configure to highlight it and then click

Port Setting

. 3-54

CA Series PC/104 Software Installation

2. Select a COM number for the port from the

Port Number

pull-down list. Select the

Auto Enumerating COM Number

option to map subsequent ports automatically. The port numbers will be assigned in sequence.

For example, if COM 1 is assigned to Port 1, then COM 2 (if not already occupied) will be assigned to Port 2, etc.

Rx, TX FIFO

1. Select an

Rx FIFO

Trigger from the

Rx FIFO Level

pull-down list. Rx FIFO trigger levels of

High, Middle

, and

Low

are available, with the default set to High. Select the

Set the change to all ports

option to apply this Rx FIFO Trigger to all ports. 2. Select a

Tx FIFO Level

from the

Tx FIFO Level

pull-down list. Tx FIFO Levels of

High, Middle

, and

Low

are available, with the default set to High. Select the

Set the change to all ports

option to apply the just defined Tx FIFO Size to all ports. High Middle Low

Tx FIFO (Byte)

CA Series 64 32 1 CB Series 128 64 1

Rx FIFO (Byte)

CA Series 56 28 1 CB Series 120 60 1 3. Click

OK

to save the port settings and then click

OK

in the

Property

window to finish the port settings procedure.

Checking the Status

The PComm Diagnostic program is a useful tool to check the status of Moxa’s multiport serial boards. The program can be used to test internal and external IRQ, TxD/RxD, UART, CTS/RTS, DTR/DSR, etc. Use this program to ensure that your Moxa boards and ports are working properly. 3-55

CA Series PC/104 Software Installation

To start the program, click

Start

Programs

MOXA

PComm Ver 1.X

PComm Diagnostic NOTE

You can download the PComm Lite software for free from Moxa’s website at www.moxa.com/support/free_downloads.htm.

3-56

CA Series PC/104 Software Installation Removing the Driver

1. Open the Device Manager and use the mouse to place the cursor over the

MOXA CB-134I Series (PC/104-Plus boards)

under Multi-port serial adapters, right-click, and then select the Uninstall option. 2. Select

Delete the driver software for this device

and click

OK

to proceed with uninstalling the board. 3-57

CA Series PC/104 Software Installation Uninstallating the Driver

The MSB driver may be removed through Add/Remove Programs in the Windows Control Panel. Click

Uninstall

next to

MOXA Smartio/Industio Windows Driver Verx.xx

3-58

CA Series PC/104 Software Installation

Non-Windows OS Linux

1. Execute the following commands from the Linux prompt: #mount /dev/cdrom /mnt/cdrom #cd / #mkdir moxa #cd moxa #cp /mnt/cdrom//mxpcdrv.tgz . #tar xvfz mxpcdrv.tgz 2. #cd mxpcdrv # make clean; make install 3. #cd /moxa/mxpcdrv/driver #./mpmknod 4. Install the module driver using the hardware settings that you selected. For example, for an I/O address of 0x180, an INT vector of 0x1C0, and an IRQ of 10, execute the following command: #modprobe mxpcdrv ioaddr=0x180 iovect=0x1C0 irq=10 (This step is only for CA Series) 5. You can use the Moxa diagnostic utility to verify the driver’s status: #cd /moxa/mxpcdrv/utility/diag #./msdiag 6. You can use the Moxa terminal utility to test the TTY ports: #cd /moxa/mxpcdrv/utility/term #./msterm 3-59

4 4.

Serial Programming Tools

Moxa provides Windows serial programming libraries and troubleshooting utilities that are easy to use and powerful. You can use these tools to reduce software development time. The serial communication library is useful for developing applications for data communications, remote access, data acquisition, and industrial control. It provides a simpler solution compared to the more complex Windows Win32 COMM API. PComm is a professional serial communication tool for Windows PCs. PComm includes the following features: • • Useful utilities for diagnostics, port monitoring, and terminal emulation Sample programs • Comprehensive help files The following topics are covered in this chapter: 

Serial Programming Library

PComm Utilities

Installation

PComm Diagnostic

PComm Monitor

PComm Terminal Emulator

CA Series PC/104 Serial Programming Tools

Serial Programming Library

The serial programming library assists you in developing serial communications programs for any COM port that complies with the Microsoft Win32 API. It facilitates the implementation of multi-process and multi-thread serial communication programs and can remarkably reduce development time. The library provides a complete set of functions as well as various sample programs for Visual C++, Visual Basic, and Delphi. To view detailed descriptions of the available functions and sample programs, go to

Start

Program

PComm Lite

and select

PComm Lib Help

,

PComm Porting Notes

, or

PComm Programming Guide

. You may also refer to the sample programs in the PComm directory.

PComm Utilities

This sections provides brief descriptions of the PComm utilities. For more information about these utilities, please refer to the help files or to the API-232.txt file for DOS.

Installation

To install PComm, run

Setup.exe

from the installation diskette. Please note that the PComm diagnostic and monitor utilities are for Moxa boards only. These two utilities will not work with other serial boards.

PComm Diagnostic

PComm Diagnostic is designed for Moxa boards only. It provides internal and external testing of IRQ, TxD/RxD, UART, CTS/RTS, DTR/DSR, DTR/DCD, and other items. You can use PComm Diagnostic to check the operation of both software and hardware. To run the Diagnostic program, go to

Start

Program

PComm Lite

Diagnostic

. 4-2

CA Series PC/104 Serial Programming Tools

PComm Monitor

PComm Monitor is designed for Moxa board in Windows NT only. It allows you to monitor data transmission of selected Moxa COM ports. It monitors data transmission, throughput, and line status at regular intervals. Click on a specific port to view that port’s communication parameters and status. To run PComm Monitor, go to

Start

Program

PComm Lite

Monitor

.

PComm Terminal Emulator

PComm Terminal Emulator can be used to connect to a serial port to verify that data transmission is functioning correctly. It supports multiple windows and both VT100 and ANSI terminal types. You can interactively transfer data, periodically send patterns, and transfer files using ASCII, XMODEM, YMODEM, ZMODEM, and KERMIT protocols. To run PComm Terminal Emulator, go to

Start

Program

PComm Lite

Terminal Emulator

. 4-3

5 5.

Smartio/Industio Programming Guide

If you want to develop your own driver, no matter whether it is on a Windows or Linux platform, Moxa Smartio/Industio Programming Guide is very useful. The following topics are covered in this chapter: 

Relative Product List

Resource Requirement for Moxa Board

PCI Configuration for Moxa Board

UART Register Structure for MU860 chip

UART Register Structure for MUE250, MUE450, and MUE850 chips

For Baud Rate Setting

Moxa Board PCI Device ID List

UART Datasheet

CA Series PC/104 Smartio/Industio Programming Guide

Relative Product List

Please see the “Moxa Board PCI Device ID List” at the end of this document.

Resource Requirement for Moxa Board

IRQ * 1 I/O : UART register: 64 bytes (8 bytes/port * 8port) for MU860 4096 bytes (512 bytes/port * 8port) for MUE250/450/850 IRQ Vector register:16 bytes (only 1 byte is used)

PCI Configuration for Moxa Board

A. MOXA Vendor ID: 0x1393 B. Device ID: Please see the “Moxa Board PCI Device ID List” section C. Hardware resources on the Device Configuration Register of the

PCI configuration space

:

Resource Name

IRQ IRQ Vector Address UART register (I/O Base Address) UART register (Memory Base Address) Vector Base Address

Chip

All MU860 MU860

Address Offset

0x3C 0x1C 0x18 MUE250, MUE450, MUE850 0x14 MUE250, MUE450, MUE850 0x18 BAR3 BAR2 BAR1 BAR2

Byte Offset

00h 04h 08h 0Ch 10h 14h 18h 1Ch … 3Ch …

0-7

Vendor ID Command … … BAR0 BAR1 BAR2 BAR3 … Interrupt Line …

8-15

Interrupt Pin

16-23

Device ID Status Reserved

24-31 Size

16 bytes 64 bytes 4096 bytes 16 bytes

NOTE

For MUE250, MUE450, and MUE850 chips only: Memory mode is recommended for these chips to access UART. To use memory mode, the driver has to access the memory base address, which is located at BAR1. 5-2

CA Series PC/104 Smartio/Industio Programming Guide

UART Register Structure for MU860 chip

NOTE

For a detailed UART register description, please see the “UART Datasheet” section.. 

UART register address = I/O base address + (port-1) *8

For example, if the base address is 0x180: The first port’s UART registered I/O address is 0x180+(1-1)*8 = 0x180 The first registered I/O address is 0x180, The second registered I/O address is 0x181, ….. The second port’s UART registered I/O address is 0x180+(2-1)*8 = 0x188 The first registered I/O address is 0x188, The second registered I/O address is 0x189, … 

IRQ Vector Register Structure Bit Value

0

Status

Interrupt pending. Please read the UART register to get the detail interrupt information *. No interrupt pending. 1 All serial ports on the same Moxa board use the same IRQ. Check the vector to determine which port issues the interruption. You can also get the information by querying the IIR of each port. 5-3

CA Series PC/104 Smartio/Industio Programming Guide

UART Register Structure for MUE250, MUE450, and MUE850 chips

There are 512 bytes for each UART register and 0x200 offset between each port. However, there is one exception, for the models which are 4-port boards, such as

CP-104EL-A

,

CP-114EL

,

CP-114EL-I

, and

CP-134EL-A

, the offset of the fourth UART register is 0xE00.

NOTE

Registers for 8 ports Registers for 4 ports For a detailed UART register description, please see the “UART Datasheet” section..

NOTE

UART register address = I/O base address + (port-1) * 0x200

For example, if base address is 0x200: The first port’s UART registered I/O address is 0x200 + (1-1) * 0x200 = 0x200 ………………The first registered I/O address is 0x200, The second registered I/O address is 0x201, ….. The second port’s UART registered I/O address is 0x200 + (2-1) * 0x200 = 0x400 The first registered I/O register is 0x400, The second registered I/O register is 0x401, ….. For CP-104EL-A, CP-114EL, CP-114EL-I, and CP-134EL-A only: The first port’s UART registered address: I/O base address The second port’s UART registered address: I/O base address + 1 * 0x200 The third port’s UART registered address: I/O base address + 2 * 0x200 The fourth port’s UART registered address :I/O base address + 7 * 0x200Type note content here. 5-4

CA Series PC/104 Smartio/Industio Programming Guide

Control Serial Interface and Termination Resistor for MUE chips

For Moxa boards that use MUE250, MUE450, and MUE850 chips, BAR2, which is allocated 16 bytes. is the vector base address that can be used to control the serial interface and termination resistor according to the following table.

Offset

0x4 0x5 0x6 0x7

Bit

[3..0] [7..4] [3..0] [7..4] [3..0] [7..4] [3..0] [7..4] [7..0] [7..0]

Port #

1 2 3 4 5 6 7 8 [8..1] [8..1]

Parameters

0x0 : RS-232 0x1 : RS-422 0xF : RS-485 2W 0xB : RS-485 4W 0x8 0x9 0xA [7..0] [8..1] GPIO – Input GPIO direction configuration 0 : Set GPIO direction to input 1 : Set GPIO direction to output GPIO – Output (Termination Resistor) 0 : Low (0 Ohm) 1 : High (120 Ohm) Especially, the interface of 4-port models, such as CP-114EL and CP-114EL-I, is using the following offset to set the interface of port 4.

Offset

0x4 0x5 0x6 0x7

Bit

[3..0] [7..4] [3..0] [7..4] [3..0] [7..4] [3..0]

Port #

1 2 3 - - - 4

Parameters

0x0 : RS-232 0x1 : RS-422 0xF : RS-485 2W 0xB : RS-485 4W

For Baud Rate Setting

For General PC Com Port: CLK=1.8432MHz Div = CLK/(Baud x 16) But for Moxa Board: CLK=14.7456MHz Div = CLK/(Baud x 16) 5-5

CA Series PC/104 Smartio/Industio Programming Guide

Moxa Board PCI Device ID List

Model

CP-102U CP-102UL CP-132UL CP-132UL-I CP-102E CP-102EL CP-132EL CP-132EL-I CP-104UL CP-104JU CP-114UL CP-114UL-I CP-134U CP-134U-I CP-104EL-A CP-114EL CP-114EL-I CP-134EL-A CB-114 CB-134I CP-118U CP-118U-I CP-138U CP-138U-I CP-168U CP-116E-A(A) CP-116E-A(B) CP-118EL-A CP-118E-A-I CP-138E-A-I CP-168EL-A CB-108 2 4 4 4 4 4 4 4 4 2 2 2 2

Ports

2 2 2 4 4 4 4 8 8 8 8 8 8 8 8 8 8 8 8

Bus

UPCI UPCI UPCI UPCI PCIe PCIe PCIe PCIe UPCI UPCI UPCI UPCI UPCI UPCI PCIe PCIe PCIe PCIe PC/104-Plus PC/104-Plus UPCI UPCI UPCI UPCI UPCI PCIe PCIe PCIe PCIe PCIe PCIe PC/104-Plus

Chip

MU860 MU860 MU860 MU860 MUE250 MUE250 MUE250 MUE250 MU860 MU860 MU860 MU860 MU860 MU860 MUE450 MUE450 MUE450 MUE450 MU860 MU860 MU860 MU860 MU860 MU860 MU860 MUE850 MUE850 MUE850 MUE850 MUE850 MUE850 MU860 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k

Max Baud

921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 921.6k 0x1393 0x1393 0x1393 0x1393 0x1393 0x1393 0x1393 0x1393 0x1393 0x1393 0x1393 0x1393 0x1393 0x1393 0x1393 0x1393

Vendor ID Device ID

0x1393 0x1022 0x1393 0x1393 0x1021 0x1321 0x1393 0x1393 0x1393 0x1393 0x1321 0x1024 0x1025 0x1322 0x1393 0x1393 0x1393 0x1393 0x1393 0x1393 0x1393 0x1393 0x1393 0x1322 0x1041 0x1042 0x1143 0x1143 0x1340 0x1340 0x1045 0x1144 0x1144 0x1342 0x1142 0x1341 0x1180 0x1180 0x1380 0x1380 0x1681 0x1160 0x1161 0x1182 0x1183 0x1381 0x1683 0x1080

UART Datasheet

Moxa’s chips are compatible with the following chips. For more details about the UART register description, please refer to the downloaded links below.

UART

MU-860 MUE-250 MUE-450 MUE-850

Port

2-8 2 4 8

Datasheet

TL16C550C PI7C9X7952 PI7C9X7954 PI7C9X7958 5-6

6 6.

Pin Assignments

The box header connector(s) on the module is used to connect to serial devices. Optional cables are available that provide DB9 or DB25 connectors. The pin assignments of the box header connectors and available cables are provided below.

Box Header Pin Assignments RS-232

These pin assignments apply to the CA-108/CB-108, CA-114/CB114, and CA-104. Note that there are two 40-pin box header connectors on the CA-108/CB108, each of which connects to 4 serial ports.

Pin

1 2 3 4 5 6 7 8 9 10

Signal

DCD0 DSR0 RxD0 RTS0 TxD0 CTS0 DTR0 --- GND0 ---

Pin

11 12 13 14 15 16 17 18 19 20

Signal

DCD1 DSR1 RxD1 RTS1 TxD1 CTS1 DTR1 --- GND1 ---

Pin

21 22 23 24 25 26 27 28 29 30

Signal

DCD2 DSR2 RxD2 RTS2 TxD2 CTS2 DTR2 --- GND2 ---

Pin

31 32 33 34 35 36 37 38 39 40

Signal

DCD3 DSR3 RxD3 RTS3 TxD3 CTS3 DTR3 --- GND3 ---

RS-422, 4-wire RS-485

These pin assignments apply to the CA-132, CA-132I , CA-114/CB-114, and CA-134I/CB1341. With regard to the CA Series, pins 21 to 40 apply to the CA-114 and CA-134I only.

Pin

1 3 5 7 9

Signal

TxD0-(A) TxD0+(B) RxD0+(B) RxD0-(A) GND0

Pin

11 13 15 17 19

Signal

TxD1-(A) TxD1+(B) RxD1+(B) RxD1-(A) GND1

Pin*

21 23 25 27 29

Signal*

TxD2-(A) TxD2+(B) RxD2+(B) RxD2-(A) GND2

Pin*

31 33 35 37 39

Signal*

TxD3-(A) TxD3+(B) RxD3+(B) RxD3-(A) GND3

CA Series PC/104 Pin Assignments

2-wire RS-485

These pin assignments apply to the CA-132 , CA-132I , CA-114/CB-114, and CA-134I/CB-1341. With regard to the CA series, pins 21 to 40 apply to the CA-114 and CA-134I only.

Pin

5 7 9

Signal

Data0+(B) Data0-(A) GND0

Pin

15 17 19

Signal

Data1+(B) Data1-(A) GND1

Pin*

25 27 29

Signal*

Data2+(B) Data2-(A) GND2

Pin*

35 37 39

Signal*

Data3+(B) Data3-(A) GND3 6-2

Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement