Page 2
National Instruments Corporate Headquarters 6504 Bridge Point Parkway Austin, TX 78730-5039 (512) 794-0100 Technical support fax: (800) 328-2203 (512) 794-5678 Branch Offices: Australia (03) 879 9422, Austria (0662) 435986, Belgium 02/757.00.20, Canada (Ontario) (519) 622-9310, Canada (Québec) (514) 694-8521, Denmark 45 76 26 00, Finland (90) 527 2321, France (1) 48 14 24 24,...
Page 3
Limited Warranty The AT-DIO-32F is warranted against defects in materials and workmanship for a period of one year from the date of shipment, as evidenced by receipts or other documentation. National Instruments will, at its option, repair or replace equipment that proves to be defective during the warranty period. This warranty includes parts and labor.
Page 4
Any use or application of National Instruments products for or involving medical or clinical treatment must be performed by properly trained and qualified medical personnel, and all traditional medical safeguards, equipment, and procedures that are appropriate in the particular situation to prevent serious injury or death should always continue to be used when National Instruments products are being used.
Page 9
Tables Table 2-1. AT-DIO-32F Factory-Set Jumper and Switch Settings ........2-2 Table 2-2. Default Settings of National Instruments Products for the PC......2-6 Table 2-3. Switch Settings with Corresponding Base I/O Address and Base I/O Address Space ..................2-7 Table 2-4.
The AT-DIO-32F is a high-speed, 32-bit, parallel, digital I/O interface. The AT-DIO-32F is a member of the National Instruments AT Series of PC AT I/O channel expansion boards for the IBM PC AT and compatible computers. These boards are designed for high-performance data acquisition and control for applications in laboratory testing, production testing, and industrial process monitoring and control.
Intel 8254 System Timing Controller technical manual Customer Communication National Instruments wants to receive your comments on our products and manuals. We are interested in the applications you develop with our products, and we want to help if you have problems with them.
This chapter describes the AT-DIO-32F, lists the contents of your AT-DIO-32F kit, and explains how to unpack the AT-DIO-32F kit. The AT-DIO-32F is a high-speed, 32-bit, parallel, digital I/O interface board for the PC. The 32 lines of digital I/O are organized into four 8-bit ports. With the various handshaking options available, the AT-DIO-32F is compatible with a wide range of peripheral devices and other computers.
Introduction Chapter 1 What Your Kit Should Contain The contents of the AT-DIO-32F kit (part number 776246-01) are listed as follows. Kit Component Part Number AT-DIO-32F board 180735-01 AT-DIO-32F User Manual 320147-01 NI-DAQ software for DOS/Windows/LabWindows, with manuals 776250-01 NI-DAQ Software Reference Manual for DOS/Windows/LabWindows...
Normally, however, you should not need to read the low-level programming details in the user manual because the NI-DAQ software package for controlling the AT-DIO-32F is included with the board. Using NI-DAQ is quicker and easier than and as flexible as using the low-level programming described in Chapter 4, Programming.
1.0 m 180723-10 * The AT-DIO-32F is equipped with an EMI shield on the I/O connector that can be used to connect the shield of a shielded ribbon cable to the computer chassis. Shielded ribbon cables are necessary to meet FCC Class A Emission Limits.
• Remove the board from the package and inspect the board for loose components or any other sign of damage. Notify National Instruments if the board appears damaged in any way. Do not install a damaged board into your computer.
AT Bus Interface The AT-DIO-32F is configured at the factory to use a base I/O address of hex 240, to use interrupt lines 11 and 12, to use DMA channels 5 and 6, and to disconnect the board from the RTSI clock.
Configuration and Installation Chapter 2 Table 2-1. AT-DIO-32F Factory-Set Jumper and Switch Settings Base I/O Address Hex 240 (factory setting) The black side indicates the side that is pushed down. DMA Channel Bank A = Channel 5 W1: Upper-right two rows...
If any equipment in your computer uses this base I/O address space, change the base I/O address of the AT-DIO-32F or of the other device. If you change the AT- DIO-32F base I/O address, make a corresponding change to any software packages you use with the AT-DIO-32F.
B. Switches Set to Base I/O Address of Hex 240 (Factory Setting) Figure 2-2. Example Base I/O Address Switch Settings The five LSBs of the address (A4 through A0) are decoded by the AT-DIO-32F to select the appropriate AT-DIO-32F register. To change the base I/O address, remove the plastic cover on U61, press each switch to the desired position, verify that each switch is completely pressed down, and replace the plastic cover.
The DMA channel used by the AT-DIO-32F is selected by jumpers on W1 (see Figure 2-1). The AT-DIO-32F is set at the factory to use DMA Channels 5 and 6. These are the default DMA channels used by the AT-DIO-32F software handler. Verify that these DMA channels are not also used by equipment already installed in your computer.
Configuration and Installation Chapter 2 The AT-DIO-32F hardware can only use Channels 5, 6, and 7 as DMA channels. Notice that these are the three available 16-bit channels on the PC I/O channel. The AT-DIO-32F does not use and cannot be configured to use the 8-bit DMA channels on the PC I/O channel.
Figure 2-5. DMA Jumper Settings for Disabling DMA Transfers Interrupt Selection The AT-DIO-32F board can connect to one or two of any of the 11 interrupt lines of the PC I/O channel. The interrupt lines are selected by jumper W2, which is located above the I/O slot edge connector on the AT-DIO-32F (see Figure 2-1).
Chapter 2 If you do not want to use interrupts, place the jumper on W2 in the positions shown in Figure 2- 7. This setting disables the AT-DIO-32F from asserting any interrupt lines on the PC I/O channel. • • • • • • • • •...
2. Remove the top cover or access port to the I/O channel. 3. Remove the expansion slot cover on the back panel of the computer. 4. Insert the AT-DIO-32F into a 16-bit slot. It may be a tight fit, but do not force the board into place.
Warning: Connections that exceed any of the maximum ratings of input or output signals on the AT-DIO-32F may result in damage to the AT-DIO-32F board and to the PC. Maximum input ratings for each signal are given in this chapter under the discussion of that signal.
DIOA7 is the MSB; DIOA0 is the LSB. REQ1 Input handshaking request line for Group 1. When the AT-DIO-32F is in write mode, the external device activates this signal to indicate that it is ready to receive data. When the AT-DIO-32F is in read mode, the external device activates this signal if data can be read on the data lines.
Page 31
ACK2 Output handshaking acknowledge signal for Group 2. When the AT-DIO-32F is in write mode, this signal becomes active when data has been written to the data lines. When the AT-DIO-32F is in read mode, this signal becomes active when the available data on the data lines has been read.
70 mA Timing Specifications This section lists the timing specifications for handshaking with the AT-DIO-32F. The REQ and ACK signals are available on the I/O connector, and in the following diagrams they are non- inverted. The digital I/O ports are divided into two groups: Group 1 and Group 2. The timing specifications for Group 1 and Group 2 handshaking are identical.
Page 33
Description (continued) Input Handshaking request signal. If the AT-DIO-32F is in write mode, this signal is asserted when the external device is ready to receive data. If the AT-DIO-32F is in read mode, this signal is asserted when data is available to be read. This signal is available on the I/O connector.
All timing values are in nanoseconds. Cabling The AT-DIO-32F can be interfaced to a wide range of printers, plotters, test instruments, I/O racks and modules, screw terminal panels, and almost any device with a parallel interface. The AT-DIO-32F digital I/O connector is a standard 50-pin header connector. The pin assignments are compatible with the DEC DRV11J parallel interface and most standard 32-channel I/O module mounting racks (such as those manufactured by Opto 22 and Gordos).
Page 36
T&B/Ansley Corporation part number 171-50 If you plan to use the AT-DIO-32F for a communications application, you may need shielded cables to meet FCC requirements. The AT-DIO-32F I/O bracket has been designed so that the shield of the I/O cable can be grounded through the computer chassis when a mating connector...
This chapter explains the basic operation of the AT-DIO-32F circuitry. The AT-DIO-32F is a high-speed, 32-bit, parallel, digital I/O interface for the PC. The 32 lines of digital I/O on the AT-DIO-32F are divided into four 8-bit ports (DIOA, DIOB, DIOC, and DIOD).
Address Decoder The PC I/O channel has 24 address lines; the AT-DIO-32F uses ten of these lines to decode the board address. Therefore, the board address range is hex 000 to 3FF. Address lines SA5 through SA9 are used to generate the board enable signal.
I/O lines. Onboard Counters The AT-DIO-32F includes three onboard counters, useful for pattern generation and periodic data acquisition. Counter 1 can be programmed to generate group 1 handshaking requests on the REQ1 line. Likewise, counter 2 can be programmed to generate group 2 handshaking requests on the REQ2 line.
Counter 2 REQ1 REQ2 Figure 3-2. AT-DIO-32F Clock Routing Scheme Digital I/O Connector All digital I/O is through a standard, 50-pin, male connector. The pin assignments for this connector are compatible with the DEC DRV11-J parallel interface and most 32-channel I/O module racks.
Once the data is read or written, TDELAY begins. After TDELAY, ACK is sent to the digital I/O connector. When another leading edge of REQ is received, DRDY is set and the AT-DIO-32F is ready for another cycle. Figure 3-5 shows a read transfer in leading edge mode.
TDELAY. If TDELAY is programmed to 0, the pulse width of ACK is 100 nsec. When another trailing edge of REQ is received, DRDY is set and the AT-DIO-32F is ready for another cycle. Figure 3-7 shows a read transfer in trailing edge mode.
Each handshaking group can be assigned a separate DMA channel for 16-bit data transfer, and each group has a DMA enable bit, DMAEN. When DMA is enabled, the AT-DIO-32F sends a DMA request to a port that is ready to receive data during a write transfer, or to a port that is ready to read data during a read transfer.
Theory of Operation RTSI Bus Interface The AT-DIO-32F is interfaced to the National Instrument RTSI bus. The RTSI bus has seven trigger lines and a system clock line. All National Instruments AT Series boards that have RTSI bus connectors can be wired together inside the PC to share these signals.
AT-DIO-32F board, you need not read this chapter. Register Map The register map for the AT-DIO-32F is shown in Table 4-1. This table gives the register name, the register address, the type of the register (read only, write only, or read and write), and the size of the register in bits.
Register Description Format The remainder of this section discusses each of the AT-DIO-32F registers in the order shown in Table 4-1. Each register group is introduced, followed by a detailed bit description of each register. The individual register description gives the address, type, word size, and bit map of the register, followed by a description of each bit.
The seven registers making up the Configuration and Status Register Group can be used for general monitoring and control of the AT-DIO-32F hardware. The four configuration registers (CFG1, CFG2, CFG3, and CFG4) control the digital I/O modes, handshaking modes, interrupt, and DMA operations.
Page 59
Description (continued) TRANS32 32-Bit Transfer Enable. When TRANS32 is set, the AT-DIO-32F is in 32-bit transfer mode. This mode uses the Group 1 handshaking lines (REQ1 and ACK1). When REQ1 is received, DRDY1 and DRDY2 are both set. When data is read or written for both Group 1 and Group 2, the ACK1 line is asserted.
Programming Chapter 4 CFG4 Register Revision C and later versions of the AT-DIO-32F have a CFG4 Register. This register contains four bits that set the leading pulse delay mode, Port D double-buffer mode, and version compatibility. Address: Base address + 14 (hex)
The four registers making up the Digital I/O Register Group monitor and control the AT-DIO- 32F digital I/O lines. There are four 8-bit ports on the AT-DIO-32F. These ports are grouped so that either 8-bit or 16-bit operations can be performed.
RTSI Bus Register Group The two registers making up the RTSI Bus Register Group program the AT-DIO-32F RTSI switch for routing of signals on the RTSI bus trigger lines to and from AT-DIO-32F request (REQ) and acknowledge (ACK) signal lines.
The AT-DIO-32F has four 8-bit digital I/O ports. These ports are organized into two groups: Group 1 contains Ports A and B, and Group 2 contains Ports C and D. The AT-DIO-32F can also operate in two modes: Mode 0 and Mode 1. Mode 0 is basic I/O where each port can be configured as a read or write port.
Chapter 4 Mode 0 Programming Whenever the AT-DIO-32F is started up, each digital I/O port is configured as a read port. The status of the lines connected to each port can be determined by reading that port. To configure a port as a write port, the port's corresponding WRITE bit must be set.
Page 86
Reading the STAT Register returns the status of REQ2, ACK2, and the DRDY2 bit. Handshaking Modes The AT-DIO-32F can be programmed for one of three types of handshake timing: level mode, leading edge mode, and trailing edge mode. These modes are described in detail in the following pages.
EDGE, LPULSE, and TS (TDELAY) values. Requests should not begin on the REQ1 line until both groups are fully configured. Configured in this way, the AT-DIO-32F can transfer data to or from all 32 of its data lines simultaneously, using only the ACK1 and REQ1 handshaking lines. ACK2 and REQ2 can be ignored.
Programming Pattern Generation Using Onboard Counters There are three onboard counters on the AT-DIO-32F, each designated for a specific purpose. The output of Counter 1 is connected to the Group 1 handshaking request line REQ1. The output of Counter 2 is connected to the Group 2 handshaking request line REQ2. The output of Counter 3 can be used as the counting source for Counter 1 or 2.
Programming the RTSI Bus Interface The RTSI switch connects signals on the AT-DIO-32F to the seven RTSI bus trigger lines. The RTSI switch has seven pins labeled A<6..0> connected to AT-DIO-32F signals, and seven pins labeled B<6..0> connected to the seven RTSI bus trigger lines. The signals connected to each pin are given in Table 4-6.
Appendix A Specifications This appendix lists the specifications for the AT-DIO-32F. These specifications are typical at 25° C unless otherwise noted. Digital I/O Number of channels ............... 32 I/O Compatibility ................. TTL Digital logic levels ..............Level Input low voltage 0.0 V...
Appendix B I/O Connector and Register Descriptions This appendix contains a description of the AT-DIO-32F I/O connector and references to the registers of the AT-DIO-32F. I/O Connector Figure B-1 shows the pinout and signal names for the AT-DIO-32F 50-pin I/O connector.
I/O Connector and Register Descriptions Appendix B AT-DIO-32F Register Descriptions A quick reference for the AT-DIO-32F appears on the following pages. CFG1 Register Base Address Offset = 00 (hex), 16-bit write only DMAEN1 INTEN1 T1S2 T1S1 T1S0 DIOBEN DIOAEN LRESET1...
This appendix contains the application notes for the AT-DIO-32F board. The versatile AT-DIO-32F can interface the PC to almost any 8-bit, 16-bit, or 32-bit parallel device or I/O module rack. These programs explore the several handshaking modes of the AT-DIO-32F and can easily be modified to fulfill your own specialized communication needs.
0x04 #define CFG4offset 0x14 #define STAToffset 0x00 #define PORTAoffset 0x06 int base_address, /* base_address of the AT-DIO-32F board */ cfg1, /* address of CFG1 register */ cfg2, /* address of CFG2 register */ cfg3, /* address of CFG3 register */...
Page 112
Appendix C Application Notes /* set up AT-DIO-32F to communicate with printer */ Setup_DIO(); /* setup the AT-DIO-32F */ /* get the chars to print and send out */ printf("\nEnter the name of the file to print: \n"); scanf("%s",filename); /* gets(filename);*/ fp = fopen(filename,"r");...
/* echo character to screen */ AT-DIO-32F to AT-DIO-32F 16-Bit Communications This program transmits 16-bit words between two AT-DIO-32F boards in separate PC computers. With the program, the AT-DIO-32F can communicate with National Instruments MC-DIO-32F or NB-DIO-32F. Ports A and B function as the 16-bit read channel with Group 1 handshaking, and Ports C and D comprise the 16-bit write channel utilizing Group 2 handshaking.
The following program is divided into two functional parts, one for sending files from the AT-DIO-32F and the other for receiving files. Both are structured similarly and check for the EOF marker which marks the end of transmission. The handshaking between the AT-DIO-32F boards is fully automatic and requires no software toggling of lines.
Page 115
Application Notes Appendix C /* address offset of the registers of AT-DIO-32F */ #define CFG1os 0x00 #define CFG2os 0x02 #define CFG3os 0x04 #define CFG4os 0x14 #define STATos 0x00 #define PORTAos 0x06 #define PORTCos 0x08 unsigned int base_addr; unsigned int CFG1,CFG2,CFG3,CFG4, /* Registers of AT-DIO-32F */ STAT1,PORTA,PORTC;...
Page 117
/* Echo characters to screen. outpw(PORTC, wd); /* Send a 16-bit word to the MC-DIO-32F. */ /*... Return non-zero value if the AT-DIO-32F is ready to be written more data...*/ data_out_rdy() return (inpw(STAT1) & 0x0004); /* Returns DRDY2 bit. */ /******************* Routines for Receiving Data **********************/ /*...
Page 118
Appendix C Application Notes printf("\nAn End-of-File has been received.\n"); fclose(fp); }/* End get_main */ /*... Get the 16-bit word from the AT-DIO-32F ...*/ in_word() int wd; while(!data_in_rdy()) ; /* Wait until data is ready. */ wd = inpw(PORTA); return wd;...
PB-32SM PB-32Q PB32D The AT-DIO-32F can be used with the following I/O module racks if connected with a cable indicated by the specifications in Table C-1. Any pins not listed are not connected and should be left open. Table C-1. Cable Specification for Connections to 8-, 16-, or 24-Channel I/O Module Racks...
Page 120
T&B/Ansley Corporation part number 609-5007 The mating connector for the AT-DIO-32F is a 50-position, polarized, ribbon socket connector with strain relief. National Instruments uses a polarized (keyed) connector to prevent inadvertent upside-down connection to the AT-DIO-32F. Recommended manufacturer part numbers for this...
Filling out a copy of the Technical Support Form before contacting National Instruments helps us help you better and faster. National Instruments provides comprehensive technical assistance around the world. In the U.S. and Canada, applications engineers are available Monday through Friday from 8:00 a.m. to 6:00 p.m.
Page 145
National Instruments for technical support helps our applications engineers answer your questions more efficiently. If you are using any National Instruments hardware or software products related to this problem, include the configuration forms from their user manuals. Include additional pages if necessary.
Page 146
Completing this form accurately before contacting National Instruments for technical support helps our applications engineers answer your questions more efficiently.
Page 147
Documentation Comment Form ___________________________________________________ National Instruments encourages you to comment on the documentation supplied with our products. This information helps us provide quality products to meet your needs. Title: AT-DIO-32F User Manual Edition Date: April 1995 Part Number: 320147-01 Please comment on the completeness, clarity, and organization of the manual.
3-2 bus. See RTSI bus. address switch settings. See base I/O bus transceivers, 3-2 address. application notes AT-DIO-32F and I/O module racks, C- to C-11 AT-DIO-32F to AT-DIO-32F 16-bit cabling communications AT-DIO-32F and I/O module racks, C- cabling, C-5...
Page 150
4-2 configuration, 2-7 to 2-9 STAT Register, 4-16 to 4-17, B-3 default settings (chart), 2-2 theory of operation, 3-2 default settings for National Instruments COUNT* bit, 4-35 products, 2-6 Counter 1 and Counter 2 jumper settings, 2-8 to 2-9...
Page 151
2-16, A-1 DRDY1 programming example, 4-45 installation DRDY2 bit, 4-17 procedure for, 2-12 DRDY2 programming example, 4-46 unpacking the AT-DIO-32F, 1-5 Intel 8254 programmable interval timer absolute maximum ratings, D-19 A.C. characteristics, D-19 to D-20 block diagram, D-2 EDGE1 bit, 4-6...
Page 152
I/O address selection, 2-4 to 2-7 pin description for, D-3 default settings, 2-1 programming, D-6 to D-18 default settings for National Instruments read-back command, D-9 to D-10 products, 2-6 read operations, D-8 to D-9 DMA channel, 2-7 to 2-9...
Page 154
RTSISTRB Register, 4-28, B-4 theory of operation RW<1..0> bit, 4-36 address decoder, 3-2 RWSEL<1..0> bit, 4-33 to 4-34 AT-DIO-32F block diagram, 3-1 bus transceivers, 3-2 configuration and status registers, 3-2 data latches and drivers, 3-2 to 3-3 digital I/O connector, 3-4...