ACCES I/O PRODUCTS INC 10623 Roselle Street, San Diego, CA 92121 TEL (858)550-9559 FAX (858)550-7322 MODEL PCI-DA12-8/16 USER MANUAL FILE: MPCI-DA12-16.
Notice The information in this document is provided for reference only. ACCES does not assume any liability arising out of the application or use of the information or products described herein. This document may contain or reference information and products protected by copyrights or patents and does not convey any license under the patent rights of ACCES, nor the rights of others. IBM PC, PC/XT, and PC/AT are registered trademarks of the International Business Machines Corporation. Printed in USA.
Warranty Prior to shipment, ACCES equipment is thoroughly inspected and tested to applicable specifications. However, should equipment failure occur, ACCES assures its customers that prompt service and support will be available. All equipment originally manufactured by ACCES which is found to be defective will be repaired or replaced subject to the following considerations. Terms and Conditions If a unit is suspected of failure, contact ACCES' Customer Service department.
Table of Contents Notice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii Warranty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv Chapter 1: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
List of Figures Figure 1-1: PCI-DA12-8/16 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 1-4 Figure 3-1: PCI-DA12-8/16 Option Selection Map . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 3-3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 3-4 List of Tables Table 5-1: Table 5-2: Table 5-3: Table 5-4: Table 5-5: Table 9-1: Table 9-2: Table 9-3: Page vi Register Map . .
Chapter 1: Introduction Features • • • • • • • 8 or 16 Channels of Analog Output, 12 Bits Resolution. 24 Digital I/O Lines Buffered on the Card. Digital I/O Buffers Can Be Tri-stated under Program Control. Four and Eight Bit Ports Independently Selectable for Input or Output. Pull-Ups on Digital I/O Lines. Resettable fused +5V Supply Available to the User. Three 16-bit 1MHz down-counters, can generate interrupts to clock DACs.
PCI-DA12-8/16 Manual Each I/O line is buffered by a type 74LS245 tristate buffer transceiver capable of sourcing 15 mA or sinking 24mA (64 mA on request as a factory installed option). Pull-ups on the card assure that there are no erroneous outputs at power up. The buffers are configured automatically by hardware logic for input or output according to direction assignment from a control register in the PPI.
Digital I/O Output (0 to 24 Channels) • • Logic High: Logic Low: 2.5 VDC min., source 15 mA. 0.5 VDC max., sink 24 mA (64 mA optional). Input (0 to 24 Channels) • • Logic High: Logic Low: 2.0 to 5.0 VDC, Input Load: +20 :A. -0.5 to +0.8 VDC, Input Load: -200 :A. Counter/Timer • • • • • • • • Type: 82C54 programmable interval counters. Output Drive: 2.2 ma at 0.45 VDC (5 LSTTL loads). Input Gate: TTL/CMOS compatible. Clock: On-board, 1 MHz crystal-controlled oscillator.
PCI-DA12-8/16 Manual Figure 1-1: PCI-DA12-8/16 Block Diagram Page 1-4 Manual MPCI-DA12-16.
Chapter 2: Installation The software provided with this card is contained on either one CD or multiple diskettes and must be installed onto your hard disk prior to use. To do this, perform the following steps as appropriate for your software format and operating system. Substitute the appropriate drive letter for your CD-ROM or disk drive where you see d: or a: respectively in the examples below. CD Installation DOS/WIN3.x 1. 2. 3. 4. Place the CD into your CD-ROM drive.
PCI-DA12-8/16 Manual To copy the files on the master diskette to your hard disk, perform the following steps. 1. Place the master diskette into a floppy drive. 2. Change the active drive to the drive that has the diskette installed. For example, if the diskette is in drive A, type a:K. 3. Type installK and follow the on-screen prompts. Directories Created on the Hard Disk The installation process will create several directories on your hard disk.
SAMPLES Samples for using ACCES32.DLL are provided in this directory. Using this DLL not only makes the hardware programming easier (MUCH easier), but also one source file can be used for both Windows 95/98 and WindowsNT. One executable can run under both operating systems and still have full access to the hardware registers. The DLL is used exactly like any other DLL, so it is compatible with any language capable of using 32-bit DLLs.
PCI-DA12-8/16 Manual Findbase.exe DOS utility to determine an available base address for ISA bus , non-Plug-n-Play cards. Run this program once, before the hardware is installed in the computer, to determine an available address to give the card. Once the address has been determined, run the setup program provided with the hardware to see instructions on setting the address switch and various option selections. Poly.exe A generic utility to convert a table of data into an nth order polynomial.
Chapter 3: Option Selection Voltage output ranges are determined by switch settings as described in the following paragraphs. Also, the method to update D/A outputs is programmable as described here and in Chapter 5, Programming . Output Ranges There is a three-position slide switch associated with each DAC channel to make voltage range selection: switches S1 (Channel 0) through S16 (Channel 15). A silk-screen diagram on the card defines switch positions to use for each range.
PCI-DA12-8/16 Manual c. Timer Update: The counter/timer can initiate updates. First, disable interrupts and updates (read base+4 and read base+6) and enable Simultaneous Updates (read base+0). Then write the initial values into the DACs. Program the counter/timer for the tick frequency (mode 2 or mode 4), initialize your ISR, enable updates (read base+5), and enable interrupts (read base+3).
Figure 3-1: PCI-DA12-8/16 Option Selection Map Manual MPCI-DA12-16.
Chapter 4: Address Selection These cards use two I/O address spaces, one of 64 bytes and one of 256 bytes. The DACs occupy the first 32 bytes of the first area. The digital I/O circuit uses the next 4 register locations. The timer/counter chip uses 4 locations after that. The other 24 addresses are reserved. The 2nd I/O address space of 256 bytes is used for software calibration data. These two I/O address spaces are defined in the Port Address Selection Table in the Programming section of this manual.
PCI-DA12-8/16 Manual Page 4-2 Manual MPCI-DA12-16.
Chapter 5: Programming The PCI-DA12-8/16 DACs, Timers, and Digital I/O use 40 consecutive I/O addresses. Programming the PCI-DA12-8/16 is very straightforward as there are only three operating modes, three range-selection switches per channel, and one unique addition. The basic operation of a Digital-to-Analog card is to write a 12-bit value to a Digital to Analog Converter (DAC) pre-load (outer) register where it is buffered and loaded by an update command to a DAC (inner) register.
PCI-DA12-8/16 Manual Address Base + 0 Base + 1 Base + 2 Base + 3 Base + 4 Base + 5 Base + 6 Base + 7 Base + 8 Base + 9 Base + A Base + B Base + C Base + D Base + E Base + F Base + 10 Base + 11 Base + 12 Base + 13 Base + 14 Base + 15 Base + 16 Base + 17 Base + 18 Base + 19 Base + 1A Base + 1B Base + 1C Base + 1D Base + 1E Base + 1F Write * DAC 0 Low Byte DAC 0 High Byte DAC 1 Low Byte DAC 1 High Byte DAC 2 Low Byte DAC 2 High Byte DAC 3 Low Byte DAC 3 High Byte DAC 4 Low Byte DAC 4 High Byte DAC 5 Low Byte
Address Write Read Base + 20 Digital I/O Port A, Output Digital I/O Port A, Input Base + 21 Digital I/O Port B, Output Digital I/O Port B, Input Base + 22 Digital I/O Port C, Output Digital I/O Port C, Input Base + 23 Digital I/O Control Byte Base + 24 Counter/Timer 0 Counter/Timer 0 Base + 25 Counter/Timer 1 Counter/Timer 1 Base + 26 Counter/Timer 2 Counter/Timer 2 Base + 27 Counter/Timer Control Register Counter/Timer Control Register Table 5-2: I/O Address Map for the Digital I/
PCI-DA12-8/16 Manual Programming the Digital I/O Circuit The digital I/O circuit is comprised of an Intel 8255, a direction control latch, and four bi-directional buffers with 10K pull-ups. Please refer to the 8255-5 specification in appendix A for a detailed description of the PPI.
The circuit is initialized by the computer Reset command (all ports set for input and all buffers enabled). Both the 8255 control register and the buffer direction latch are accessed at the same address. The 8255 control register will latch a new configuration byte when it's written to with bit D7 high. If, for example, hex 80 is sent to Base Address+23, 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 the buffer controller.
PCI-DA12-8/16 Manual Page 5-6 Manual MPCI-DA12-16.
Chapter 6: 8254 Counter/Timer These cards contain a type 8254 programmable counter/timer that allows you to implement such functions as a Real Time Clock, Event Counter, Digital One-Shot, Programmable Rate Generator, Binary Rate Multiplier, Complex Wave Generator and/or a Motor Controller. The 8254 consists of three, 16-bit, presettable, down counters. Each counter can be programmed to any count between 1 or 2 and 65,535 in binary format depending on the mode chosen.
PCI-DA12-8/16 Manual Mode 4: Software Triggered Strobe This mode sets the output high and, when the count is loaded, the counter begins to count down. When the counter reaches zero, the output will go low for one input period. The counter must be reloaded to repeat the cycle. A low gate input will inhibit the counter.
RW0-RW1: These bits select the read/write mode of the selected counter. M0-M2: RW1 RW0 Counter Read/Write Function 0 0 Counter Latch Command 0 1 Read/Write LS Byte 1 0 Read/Write MS Byte 1 1 Read/Write LS Byte, then MS Byte These bits set the operational mode of the selected counter. Mode M2 M1 M0 0 0 0 0 1 0 0 1 2 X 1 0 3 X 1 1 4 1 0 0 5 1 0 1 BCD: Set the selected counter to count in binary (BCD = 0) or BCD (BCD = 1).
PCI-DA12-8/16 Manual For each counter you must specify in advance the type of read or write operation that you intend to perform. You have a choice of loading/reading (a) the high byte of the count, or (b) the low byte of the count, or (c) the low byte followed by the high byte. This last is most generally used and is selected for each counter by setting the RW1 and RW0 bits to ones.
After any latching operation on a counter, the contents of its hold register must be read before any subsequent latches of that counter will have any effect. If a status latch command is issued before the hold register is read, then the first read will read the status, not the latched value. 8254 Driver A simple driver is provided to perform basic counter/timer operations on the cards. Source code for the driver and a sample program showing how to use the functions is in the DOS\CSAMPLES directory.
PCI-DA12-8/16 Manual Generate Frequency The Generate Frequency function will generate a square wave (0 to +5V) with the desired frequency. The Base Address of the card as well as the frequency are required as input to the function. The counter can generate a frequency with a range of 1Hz to 250KHz. The square wave can be read on the CLOCK OUT pin of the card.
Chapter 7: Software The PCI-DA12-8/16 cards are straightforward to program. The following example is in C, but sample code is also provided on the CD in Pascal and four Windows languages: C++Builder, Delphi, VisualBASIC, and Visual C++. To output an analog value with 12-bit resolution, a corresponding decimal number N between 0 and 4095 is calculated (212 = 4096). N/4096 = V(out)/V(full scale) Next the data are written to the selected analog output channel. (See the preceding I/O Address Map.
PCI-DA12-8/16 Manual Page 7-2 Manual MPCI-DA12-16.
Chapter 8: Calibration Periodic calibration of the PCI-DA12-8/16 cards is recommended if they are used in extreme environmental conditions. The card uses very stable components but high-low temperature cycles might result in slight analog output errors. This card is calibrated by software using the following formula: Y= (4096 -a - b)/4096) * X + b To calibrate the card, run the calibration program and follow the screen prompts.
PCI-DA12-8/16 Manual Base + 80h to Base + 9Eh -2.5 V to 2.5 V. DAC 0 to DAC 15 DAC 0 to DAC 15 Base + A0h to Base + BEh -10 V to 10 V. DAC 0 to DAC 15 DAC 0 to DAC 15 Base + C0h to Base + DEh 4 to 20 mA. DAC 0 to DAC 15 DAC 0 to DAC 15 The next table shows the location of the range data for each channel. The value stored is a number from 0 to 6, representing the 7 ranges (as shown in the table below). If you set any channel's range switch, be sure to place the correct value in this table.
Chapter 9: Connector Pin Assignments The analog outputs are accessible via a male 37-pin D type connector.
PCI-DA12-8/16 Manual The digital I/O and counter outputs are accessible on the board via a 40-pin IDC header. A ribbon cable assembly with a 40-pin header and a DB37 female connector is shipped with the PCI-DA12-8/16.
Pin Function Pin Function 1 Digital I/O Port A - Bit 0 11 Digital I/O Port C - Bit 0 20 Digital I/O Port A - Bit 1 30 Digital I/O Port C - Bit 1 2 Digital I/O Port A - Bit 2 12 Digital I/O Port C - Bit 2 21 Digital I/O Port A - Bit 3 31 Digital I/O Port C - Bit 3 3 Digital I/O Port A - Bit 4 13 Return Ground 22 Digital I/O Port A - Bit 5 32 Return Ground 4 Digital I/O Port A - Bit 6 14 Digital I/O Port C - Bit 4 23 Digital I/O Port A - Bit 7 33 Digital I/O Port C - Bit 5
PCI-DA12-8/16 Manual Page 9-4 Manual MPCI-DA12-16.
Customer Comments If you experience any problems with this manual or just want to give us some feedback, please email us at: manuals@accesioproducts.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.accesioproducts.