background image

Chapter 5: Software

 

 
The following paragraphs describe the setup program, then the VisualBASIC utility program 
 

SETUP.EXE

 

 
This program is supplied in the root or base directory as a tool for you to use in configuring jumpers on the card. 
It is menu-driven and provides pictures of the card on the computer monitor. You make simple keystrokes to 
select functions. The picture on the monitor then changes to show how to place the jumper to effect your 
choices. 
 
The setup program is a stand-alone program that can be run at any time. It does not require that the card be 
plugged into the computer for any part of the setup. The program is self-explanatory with operation instructions 
and on-line help. 
 

To run this program, at the DOS prompt, enter SETUP.EXE followed by 

-

 

VISUALBASIC UTILITY DRIVER 

 
The CD provided with your card includes extentions to the VisualBASIC language for use with this card. The 
extensions are in a directory named VBACCES. These extensions are in the form of a .DLL, a .GBL, and a 
VisualBASIC sample. Together these files allow you to access the port and main memory space in a fashion 
similar to BASIC, QuickBASIC, Pascal, C/C

++

, Assembly, and most other standard languages. 

 
To use these files in a VisualBASIC program, you must create a .MAK file (File l New Project) similar to the 
sample provided (or else, modify your existing project file) and include the .GBL file (File | Add File). Once this 
has been done, VisualBASIC will be enhanced with the addition of the following functions. 
 

InPortb 

 
Function: Reads a byte from a hardware port. Due to limitations of VisualBASIC, the 

number is returned in an integer. 

 
Declaration: 

function InPortb(byval address as integer) as integer

 

 

InPort 

 
Function: Reads an integer from a hardware port. This function returns the 16-bit value 

obtained from reading the low byte from address and the high byte from 
1. 

 
Declaration:

 function InPort(byval address as integer) as integer

 

 

OutPortb 

 
Function: Writes the lower eight bits of value to the hardware port at address. This 

function returns the value output. 

 
Declaration: 

function OutPortb(byval address as integer, byval value 

as integer) as integer

 

 
 
 
 

Manual PCI-DIO-48 H/HS 

12

Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Summary of Contents for PCI-DIO-48H

Page 1: ...l service in house repair center WE BUY USED EQUIPMENT Sell your excess underutilized and idle used equipment We also offer credit for buy backs and trade ins www artisantg com WeBuyEquipment REMOTE INSPECTION Remotely inspect equipment before purchasing with our interactive website at www instraview com LOOKING FOR MORE INFORMATION Visit us on the web at www artisantg com for more information on ...

Page 2: ...0 9559 FAX 858 550 7322 contactus accesio com www accesio com DIGITAL INPUT OUTPUT CARD Models PCI DIO 48H and PCI DIO 48HS USER MANUAL File mpci dio 48H Be Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...

Page 3: ...emarks of the International Business Machines Corporation Printed in USA Copyright 1998 2005 by ACCES I O Products Inc 10623 Roselle Street San Diego CA 92121 All rights reserved WARNING ALWAYS CONNECT AND DISCONNECT YOUR FIELD CABLING WITH THE COMPUTER POWER OFF ALWAYS TURN COMPUTER POWER OFF BEFORE INSTALLING A CARD CONNECTING AND DISCONNECTING CABLES OR INSTALLING CARDS INTO A SYSTEM WITH THE C...

Page 4: ...ipment Following Years Throughout your equipment s lifetime ACCES stands ready to provide on site or in plant service at reasonable rates similar to those of other manufacturers in the industry Equipment Not Manufactured by ACCES Equipment provided but not manufactured by ACCES is warranted and will be repaired according to the terms and conditions of the respective equipment manufacturer s warran...

Page 5: ...pter 6 Programming 14 Table 6 1 Address Assignments 14 Table 6 2 Control Register Bit Assignments 15 Table 6 3 Control Register Configuration 16 Table 6 4 Change of State Interrupt Enable Register 17 Chapter 7 Connector Pin Assignments 19 Table 7 1 Connector Pin Assignments 1 50 19 Table 7 2 Connector Pin Assignments 51 100 20 Manual PCI DIO 48 H HS 4 Artisan Technology Group Quality Instrumentati...

Page 6: ...tware configured for four inputs and four latched outputs Pull ups on the cards assure that there are no erroneous outputs at power up until the card is initialized by system software The feature that distinguishes the 48HS model from the 48H card is that the state of all inputs can be monitored and if one or more bits change state a latched interrupt request can be generated Thus it is not necess...

Page 7: ...he base address is selected by the system An illustrated setup program is provided on the diskette or CD shipped with your card Interactive displays show locations and proper configuration of jumpers to set up the interrupt enable function Also sample programs in Turbo C and Turbo Pascal are presented in the Software section of this manual Specifications Digital Inputs TTL Compatible Logic High 2 ...

Page 8: ...LIES TO S CARDS ONLY CHANGE OF STATE INTERRUPT EXTERNAL INTERRUPT COMPUTER PCI BUS I O B U F F E R S 1 0 0 P I N C O N N E C T O R PORT A PORT B PORT C HI PORT C LO PORT A PORT B PORT C HI PORT C LO Figure 1 1 Block Diagram Manual PCI DIO 48 H HS 7 Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...

Page 9: ...ollowing instructions assume the CD ROM drive is drive D Please substitute the appropriate drive letter for your system as necessary DOS 1 Place the CD into your CD ROM drive 2 Type B to change the active drive to the CD ROM drive 3 Type GLQR JJ to run the install program 4 Follow the on screen prompts to install the software for this board WINDOWS 1 Place the CD into your CD ROM drive 2 The syste...

Page 10: ...d to the newly created card directory from the CD to test and validate your installation The base address assigned by BIOS or the operating system can change each time new hardware is installed into or removed from the computer Please recheck PCIFind or Device Manager if the hardware configuration is changed Software you write can automatically determine the base address of the card using a variet...

Page 11: ...ntrol is provided at the jumper position labeled TST BEN When the jumper is in the BEN Buffer Enable position the I O buffers are always enabled When the jumper is in the TST Tristate position enabled disabled state is controlled by a control register See the programming section of this manual for a description Note A jumper must be installed in either the TST or the BEN position for the card to f...

Page 12: ...rating systems Windows95 and WindowsNT 5 0 can be queried to determine which resources were assigned In these operating systems you can use either PCIFind or the Device Manager utility from the System Properties Applet of the control panel The cards are installed in the Data Acquisition class of the Device Manager list Selecting the card clicking Properties and then selecting the Resources Tab wil...

Page 13: ...these files allow you to access the port and main memory space in a fashion similar to BASIC QuickBASIC Pascal C C Assembly and most other standard languages To use these files in a VisualBASIC program you must create a MAK file File l New Project similar to the sample provided or else modify your existing project file and include the GBL file File Add File Once this has been done VisualBASIC will...

Page 14: ...re stored in two s complement form All bit patterns must be converted to and from this two s complement form if meaningful display is required Otherwise values returned from the InPortb function will be 128 to 127 rather than 0 to 255 An alternative is to perform all assignments in hexadecimal rather then decimal form Before the program will execute the GBL file must be modified to include the pat...

Page 15: ... Group 1 Control Group 1 Enable Disable Buffer Grp 0 Enable Disable Buffer Grp 1 Enable Chg of St Interrupt Clear Chg of St Interrupt Read Write Read Write Read Write Write Only Read Write Read Write Read Write Write Only Write Only Write Only Write Only Write Only Table 6 1 Address Assignments These cards use two type 8255 5 PPIs to provide a total of 48 bits input output capability The cards are...

Page 16: ... Base Address 3 with data bit D7 high programs port direction at group 0 ports A B and C If for example hex 80 is sent to Base Address 3 the group 0 PPI will be configured in mode 0 with ports A B and C as outputs At the same time data bit D7 is also latched in a buffer controller for the associated PPI chip A high state disables the buffers and thus all four buffers will be put in the tristate mo...

Page 17: ...g your working software In this example the card base address is 2D0 hex and the I O lines of group 0 are to be setup as follows Port A Input Port B Output Port C Hi Input Port C Lo Output The first step is to configure the control register Configure bits of the control register as D7 1 Active Mode Set D6 0 Mode 0 D5 0 Mode 0 D4 1 Port A Input D3 1 Port C Hi Input D2 0 Mode 0 D1 0 Port B Output D0...

Page 18: ...way you can enable disable the output buffers without programming the PPI mode Note When writing a command byte to these cards while the TST jumper is installed the PPI output buffers are disabled Thus when you desire to to change the mode you must first set the new mode and then enable the buffers Enabling the buffers can be done at either Base Address 3 or 7 or Base Address 8 or 9 CHANGE OF STAT...

Page 19: ...e will show up at pin 9 or 59 of the connector Example 2 External interrupt The interrupt option jumper for the group must be in the IEN position Configure port C Low as an input and enable interrupts globally by reading any address decoded by the board The pulse at pins 9 or 59 bit C3 must go high for at least 1 uS then low Example 3 Gating the external interrupt An open collector or open drain d...

Page 20: ...ort B Group 0 Port B Group 0 Port B Group 0 Port B Group 0 Port B Group 0 Port B Group 0 Port B Group 0 Port B Group 0 Port A Group 0 Port A Group 0 Port A Group 0 Port A Group 0 Port A Group 0 Port A Group 0 Port A Group 0 Port A 5 VDC PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0 PB7 PB6 PB5 PB4 PB3 PB2 PB1 PB0 PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 ...

Page 21: ...oup 1 Port A Group 1 Port A Group 1 Port A Group 1 Port A 5 VDC PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0 PB7 PB6 PB5 PB4 PB3 PB2 PB1 PB0 PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 Ground Ground Ground Ground Ground 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 99 This line is an I O port and also a User Interrupt Tab...

Page 22: ...s accesio com Please detail any errors you find and include your mailing address so that we can send you any manual updates 10623 Roselle Street San Diego CA 92121 Tel 858 550 9559 FAX 858 550 7322 www accesio com Manual PCI DIO 48 H HS 21 Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...

Page 23: ...l service in house repair center WE BUY USED EQUIPMENT Sell your excess underutilized and idle used equipment We also offer credit for buy backs and trade ins www artisantg com WeBuyEquipment REMOTE INSPECTION Remotely inspect equipment before purchasing with our interactive website at www instraview com LOOKING FOR MORE INFORMATION Visit us on the web at www artisantg com for more information on ...

Reviews: