background image

Overview        5-3

104-422/485-2I User’s Guide

Pr

ogr
am

m

ing

ä

ä

ä

ä

Overview

A total of 32 address locations are allocated to the 104-422/485-2I, 17 of which are used.  The 
UARTs are addressed as follows:

Table 5-1. Address Selection 

The Read / Write registers for the UARTs match the industry-standard 16550 registers.  The Card 
IRQ status register is compatible with Windows NT. COM A will set bit 0 hi on interrupt, COM B will 
set bit 1 hi on interrupt.

ä

ä

ä

ä

Sample Programs

There are sample programs provided with the 104-422/485-2I card in C, Pascal, QuickBASIC, and 
several Windows languages.  DOS samples are located in the DOS directory and Windows samples 
are located in the WIN32 directory.

ä

ä

ä

ä

Windows Programming

The 104-422/485-2I card installs into Windows as COM ports. Thus the Windows standard API 
functions can be used. In particular:

J

CreateFile() and CloseHandle() for opening and closing a port.

J

SetupComm(), SetCommTimeouts(), GetCommState(), and SetCommState() to set 
and change a port’s settings.

J

ReadFile() and WriteFile() for accessing a port.

I/O Address

Read

Write

Base +0 thru 7

COM A UART

COM A UART

Base +8 thru F

COM B UART

COM B UART

Base +10h

Card IRQ Status

N/A

Содержание 104-422-2I

Страница 1: ...www kontron com 104 422 485 2I User s Guide Manual PN 931 0071 00 A November 2002...

Страница 2: ...y copyrights or patents and does not convey any license under the patent rights of Kontron nor the rights of others Kontron is a registered trademark of Kontron All trademarks registered trademarks an...

Страница 3: ...Limited Warranty xvii Return Procedure xviii Limitation of Liability xix Chapter 1 Introduction Overview 1 3 Multipoint Opto isolated Communications 1 3 COM Port Compatibility 1 3 Communication Modes...

Страница 4: ...tallation 3 8 Installing the Board 3 8 Installing COM Ports in Windows Operating Systems 3 9 Chapter 4 Connector Pin Assignments Overview 4 3 Connector Pin Assignments 4 3 Chapter 5 Programming Overvi...

Страница 5: ...Safety Instructions Contents Before You Begin vii When Working Inside a Computer viii Preventing Electrostatic Discharge ix...

Страница 6: ...vi 104 422 485 2I User s Guide This page intentionally left blank...

Страница 7: ...uthorized electronics service personnel should access the interior of the computer The power supplies produce high voltages and energy hazards which can cause bodily harm J Use extreme caution when in...

Страница 8: ...avoid possible damage to system boards wait five seconds after turning off the computer before removing a component removing a system board or disconnecting a peripheral device from the computer J Whe...

Страница 9: ...do not remove the component s antistatic packing material until you are ready to install the component in a computer Just before unwrapping the antistatic packaging be sure you are at an ESD workstati...

Страница 10: ...x 104 422 485 2I User s Guide This page intentionally left blank...

Страница 11: ...nts How to Use This Guide xiii Customer Comments xiv Advisory Conventions xv Unpacking xvi Guarantee and Warranty Policy xvii Guarantee xvii Limited Warranty xvii Return Procedure xviii Limitation of...

Страница 12: ...xii 104 422 485 2I User s Guide This page intentionally left blank...

Страница 13: ...nstallation describes how to install the 104 422 485 2I drivers to your system and how to install the 104 422 485 2I board into an expansion connector on a PC 104 compatible card J Chapter 4 Technical...

Страница 14: ...ing the online form under Contact Us on our web site www kontron com under Technical Support Detail any errors you find We will correct the errors or problems as soon as possible and post the revised...

Страница 15: ...l component Disclaimer We have tried to identify all situations that may pose a warning or caution condition in this user s guide However Kontron does not claim to have covered all situations that mig...

Страница 16: ...terial for possible future shipment 2 Remove all items from the box If any items listed on the purchase order are missing notify Kontron customer service immediately 3 Inspect the product for damage I...

Страница 17: ...oftware cables etc within 30 days of receipt and in an as new and resalable condition The Return Procedure must be followed to assure a prompt refund Restocking Charges Product returned after 30 days...

Страница 18: ...duct s returned to Kontron for service or credit must be accompanied by a Return Material Authorization RMA Number Freight on all returned items must be prepaid by the customer who is responsible for...

Страница 19: ...ct furnished hereunder Kontron s liability shall in no event exceed the purchase price of the product purchased hereunder The foregoing limitation of liability shall be equally applicable to any servi...

Страница 20: ...xx 104 422 485 2I User s Guide This page intentionally left blank...

Страница 21: ...1 Introduction Contents Overview 1 3 Multipoint Opto isolated Communications 1 3 COM Port Compatibility 1 3 Communication Modes 1 4 Line Bias and Termination 1 4 Transceiver Control 1 4 What s Includ...

Страница 22: ...n of baud rates from 50 to 115 200 Baud rates up to 460 800 baud may be provided as a factory option The Programming section of this manual contains a table to use when selecting baud rate The output...

Страница 23: ...o state when all transmitters are off and the last receiver input at each end of the network be terminated to prevent ringing The 104 422 485 2I supports these options with jumpers on the card See Cha...

Страница 24: ...amaged contact Kontron J 104 422 485 2I adapter J Nylon Mounting Hardware Kit J I O and Communication Documentation CD ROM J I O and Communication Software A Series CD ROM Isolated Power Crystal Oscil...

Страница 25: ...Setup Contents Overview 2 3 Option Selection 2 3 A5 through A9 2 3 IRQ3 through IRQ15 2 3 485A B and 422A B 2 3 TRMI and TRMO 2 3 Terminations and Bias 2 4 Full or Half Duplex 2 5 Jumpers 2 6 Address...

Страница 26: ...corresponds to the IRQ level that your software will be able to service One IRQ services both serial ports 485A B and 422A B A jumper at the 485 location sets that port for 2 wire RS485 Half Duplex mo...

Страница 27: ...itor across the output if desired for RS422 mode and across the transmit receive output input for RS485 operation A jumper at the TRMI location applies a load on RS422 inputs Figure 2 1 Two Wire Conne...

Страница 28: ...the two serial ports The following table shows how two serial communication cards would be interconnected for the various modes Tx designates the transmit wires and Rx designates the receive wires Co...

Страница 29: ...de 422 Selects RS422 Full duplex mode TRMO Load for RS485 mode or output load for RS422 mode TRMI Input load for RS422 mode A5 A9 Selects the Cards Base Address IRQ s Selects IRQ level the same IRQ se...

Страница 30: ...hat will avoid conflict with other installed computer resources Then the SETUP program will show you where to position the address jumpers when you have selected a base address The following provides...

Страница 31: ...xxxx represents address lines A4 through A0 used on the card to select individual registers See Chapter 5 Programming in this manual Hex Range Usage 300 31F Prototype Card 360 36F Reserved 378 37F Par...

Страница 32: ...ddress Selection Table carefully before selecting the card address If the addresses of two installed functions overlap you will experience unpredictable computer behavior Jumper Name A9 A8 A7 A6 A5 Se...

Страница 33: ...Software Installation 3 3 DOS WIN3 x 3 3 Windows 95 98 2000 ME 3 3 Windows NT 3 4 Linux 3 4 QNX 3 4 Directories Created On The Hard Disk 3 4 System Installation 3 8 Installing the Board 3 8 Installin...

Страница 34: ...w Hardware Wizard dialog box Click Next to begin to install the new hardware 3 The computer will now try and auto detect new hardware Click Next and wait until the dialog screen returns 4 Windows asks...

Страница 35: ...to the 104 ICOM2S s Base Address in our example the card is at Base Address 300 so we changed the Input Out Range to 0300 0307 Once the correct setting is entered Click ok to return to the Resources t...

Страница 36: ...lock on the board The address of COM B is the base address of the board 8 6 When the Add New Port dialog is configured click OK but answer Don t Restart Now when prompted until you ve added both ports...

Страница 37: ...g Set the IRQ that matches your hardware and click OK to save your change 10 Click OK then Click Next then Click Finish 11 Windows will ask if you want to restart You should select Don t Restart Now a...

Страница 38: ...13 Select Basic Configuration 8 from the Settings Based on drop down list 14 Select I O Range in the Resource Settings box and Click the Change Settings button 15 Enter the base address of the board a...

Страница 39: ...alibrate the card DOS PSAMPLES A subdirectory of CARDNAME that contains Pascal samples DOSC SAMPLES A subdirectory of CARDNAME that contains C samples Win32 language Subdirectories containing samples...

Страница 40: ...compatible with any language capable of using 32 bit DLLs Consult the manuals provided with your language s compiler for information on using DLLs in your specific environment VBACCES This directory c...

Страница 41: ...needs Samples are provided to demonstrate the use of the generic driver Note that the use of IRQs in near real time data acquisition programs requires multi threaded application programming technique...

Страница 42: ...rminal type communication program designed for RS422 485 operation Used primarily with REMOTE ACCES Data Acquisition Pods and our RS422 485 serial communication product line Can be used to say hello t...

Страница 43: ...of the expansion connector on a PC 104 compatible card The 104 422 485 2I adapter is keyed per the PC 104 Revision 2 1 Specification This will aid in preventing the adapter from being inserted incorr...

Страница 44: ...Chapter 4 Connector Pin Assignments Contents Overview 4 3 Connector Pin Assignments 4 3...

Страница 45: ...r Connector Pin Assignments The popular 9 pin D subminiature connector male is used for interfacing to communication lines The connectors are equipped with 4 40 threaded standoffs female screw lock to...

Страница 46: ...Chapter 5 Programming Contents Overview 5 3 Sample Programs 5 3 Windows Programming 5 3 Initialization 5 4 Reception 5 6 Transmission 5 7...

Страница 47: ...grams provided with the 104 422 485 2I card in C Pascal QuickBASIC and several Windows languages DOS samples are located in the DOS directory and Windows samples are located in the WIN32 directory Win...

Страница 48: ...at Base Address 3 In C code the call would be outportb BASEADDR 3 0x80 You then load the divisor into Base Address 0 low byte and Base Address 1 high byte The following equation defines the relationsh...

Страница 49: ...bits Bit settings are extracted by subtracting 5 from the desired word length Bit 2 determines the number of stop bits There can be either one or two stop bits If Bit 2 is set to 0 there will be one s...

Страница 50: ...driven When polling reception is accomplished by constantly reading the Line Status Register at Base Address 5 Bit 0 of this register is set high whenever data are ready to be read from the chip Polli...

Страница 51: ...s pending control exits the routine A sample handler written in C is as follows readback inportb BASEADDR 2 if readback 4 Readback will be set to 4 if data are available data i inportb BASEADDR outpor...

Страница 52: ...Chapter 6 Specifications Contents Communications Interface 6 3 Environmental 6 4 Power Consumption 6 4 Physical Dimensions 6 4...

Страница 53: ...es 50 to 115 200 baud 460 800 baud as a factory installed option Asynchronous Type 16550 buffered UART Address Continuously mappable within 000 to 3FF hex range of AT I O bus addresses Mutlipoint Comp...

Страница 54: ...condensing Power Consumption Physical Dimensions The 104 422 485 2I is PC 104 compliant meaning that it conforms to all non optional aspects of the PC 104 specification including both the mechanical a...

Отзывы: