NuDAQ PET-48DIO User Manual

Programmable 48-bit dio event, and timer cards

Advertisement

Quick Links

®
NuDAQ
PET-48DIO
Programmable 48-bit DIO
Event, and Timer Cards
User's Guide

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PET-48DIO and is the answer not in the manual?

Questions and answers

Summary of Contents for NuDAQ PET-48DIO

  • Page 1 ® NuDAQ PET-48DIO Programmable 48-bit DIO Event, and Timer Cards User’s Guide...
  • Page 3 Trademarks ® NuDAQ is registered trademarks of ADLINK Technology Inc. Other product names mentioned herein are used for identification purposes only and may be trademarks and/or registered trademarks of...
  • Page 4 Customer Satisfaction is always the most important thing for ADLINK Tech Inc. If you need any help or service, please contact us and get it. ADLINK Technology Inc. Web Site http://www.Adlink.com.tw Sales & Service service@Adlink.com.tw Technical NuDAQ nudaq@Adlink.com.tw Support NuDAM nudam@Adlink.com.tw NuIPC nuipc@Adlink.com.tw NuPRO nupro@Adlink.com.tw...
  • Page 5: Table Of Contents

    2.9.3 Timer Clock Source Setting JP12..........13 2.10 Programmable Interrupt Setting ........14 2.11 Connectors............... 16 Chapter 3 Control Programming .......19 PET-48DIO Software Library Installation ......19 8255 Mode 0..............20 Register Structure ............21 Programming for PET-48DIO ..........23 3.4.1 Programming in Assembly Langrage........23...
  • Page 6 How to Use This Guide This manual is designed to help you use the 7248/96 series products. It describes how to modify and control various functions on the cards to meet your requirements. It is divided into five chapters: • Chapter 1, "Introduction,"...
  • Page 7: Chapter 1 Introduction

    I n t r o d u c t i o n The PET-48DIO is a digital input / output add-on card with 48 programmable I/O ports for IBM PC or compatibles. In addition to programmable I/O ports, an event counting and a timer pacer for interrupt are also included.
  • Page 8: Applications

    Logic level 1 : From 2.0 V to 5.0 V Input loading: 0.2 mA at 0.4 V Input hysteresis: From 0.2 V to 0.4 V Frequency Response: 500 KHZ Ø Digital Output Current sink of logic level 0 : 24 mA Max, Current source of logic level 1 : 15 mA Max.
  • Page 9: Software Supporting

    MS-DOS Borland C/C++ programming library which is included in the ADLINK all-in-one CD. ACLS-DLL1 is the Development Kit for NuDAQ ISA-Bus Cards with digital I/O, Windows 3.1/95/98/NT. ACLS-DLL1 can be used for many programming environments, such as VC++, VB, Delphi.
  • Page 10: Chapter 2 Installation

    I n s t a l l a t i o n This chapter describes how to install the PET-48DIO in your PC system. What You Have In addition to this User's Manual, the package includes the following items: Ø...
  • Page 11: Layout Of Pet-48Dio

    JP14 Fig 2.1 Layout of PET-48DIO Jumper and DIP Switch Description You can change the PET-48DIO channels and the base address by setting jumpers and DIP switches on the card. The card's jumpers and switches are preset at the factory.
  • Page 12: Setting Base Address

    Setting Base Address You can change the PET-48DIO's I/O port address by setting Dual in Line Package switch (SW1) board. Under normal circumstances, you should not need to change the switch s ettings. PET-48DIO requires two consecutive address locations in I/O address space.
  • Page 13 Functionality of SW1 I/O port address(Hex) 000-001 002-003 004-005 300-301 (* default) 3FC-3FD 3FE-3FF (*) : default setting ON : 0 OFF : 1. A1, ... A9 are correspond to PC address lines. Table 2.1 I/O Base Adress Table Installation • 7...
  • Page 14: Pull-Up And Pull-Down Setting

    There are six build-in jumpers on PET-48DIO for pull up and pull down the I/O ports. The PET-48DIO can pull up PA, PB, PC to +5V, and pull down PA, PB, and PC to ground.A typical application where pull up resistors are used to monitor switch closure.
  • Page 15 Figure 2.4 Pull-up/Pull-Down Network Connector I/O Port Jumper Table 2.2 Jumper for Pull-Up/Pull-Down Setting ( Jumper settting of for JP1, JP2, JP4, JP6, JP7, and JP9) Pull-up to +5V (Default Setting) Pull-down to Ground No Pull-up or Pull-down Installation • 9...
  • Page 16: Optp-22 Pin-2 & Pin-4 Configuration Setting

    Optp-22 Pin-2 & Pin-4 Configuration Setting +12V JP3/JP8 port C data 7 port C data 6 Port C data 5 Port C data 4 Port C data 3 Figure 2.5 Connector of CN1 and CN2 The pin-2 and pin-4 of CN1 and CN2 can be configuration as +12V or Ground (GND).
  • Page 17: Interrupt Irq Level Setting

    Interrupt IRQ Level Setting The PET-48DIO can connect to any one of the interrupt lines of the PC I/O channel. The interrupt line is selected by the jumper JP5. If you wish to use the interrupt capability of the PET-48DIO, you must select an interrupt level and place the jumper in the appropriate position to enable the particular interrupt line.
  • Page 18: Timer Interrupt Setting Jp10

    8253 Timer/Counter Counter 0 PC0 ( CN2) CLK0 GATE0 OUT0 Event IRQ 32.768 KHz JP11 Counter 1 CLK1 GATE1 OUT1 2MHz Oscillator JP12 Counter 2 CLK2 OUT2 GATE2 Timer IRQ JP10 Figure 2.7 Block Diagram of 8253 Timer/Counter 2.9.1 Timer Interrupt Setting JP10 The jumper JP10 is used for enabling or disabling timer interrupt, and the default jumper setting is illustrated as below.
  • Page 19: Timer Clock Source Setting Jp12

    2.9.3 Timer Clock Source Setting JP12 The JP12 is for select timer clock source. The range of timer is depend on clock source, PET-48DIO has two clock sources for timer, and setting range shows as table. Clock source Timer setting range 32.768 KHZ...
  • Page 20: 2.10 Programmable Interrupt Setting

    2.10 Programmable Interrupt Setting The PC0D3 and PC0D7 are two real time interrupt input ports. JP13 is for PC0D3 and PC0D7 interrupt control setting. Disable PC0D3 & PC0D7 as interrupt input ports ( factroy default) PC0D3 & PC0D7 as programmable interrupt input refer to the table below PC0D3 to generate an interrupt when input is...
  • Page 21 The PC1D3 and PC1D7 are two real time interrupt input ports. JP14 is for PC1D3 and PC1D7 interrupt control setting, and the mini jumper is for setting. Disable PC1D3 & PC1D7 as interrupt input ports ( factroy default) PC1D3 & PC1D7 as programmable interrupt input refer to the table below PC1D3 to generate an interrupt when input is...
  • Page 22: 2.11 Connectors

    2.11 Connectors A 8255 has 24 I/O ports which may be individually programmed in 2 groups of 12 or 3 groups of 8. Figure shows PET-48DIO equally 8255- block diagram. B u s PA 7 - PA 0 PORT A...
  • Page 23 Ø Pin Assignment of CN1 The CN1 is a 50-pin connector for PA1, PB1, PC1 input / output ports connetion, the pin out of CN1 is shown in the following figure: +12V Port C data 7 Port C data 6 Port C data 5 Port C data 4 Port C data 3...
  • Page 24 Ø Pin Assignment of CN2 The CN2 is a 50-pin connector for PA0, PB0, PC0 input / output ports connecting, the pin out of CN2 is shown in the following fgure. +12V Port C data 7 Port C data 6 Port C data 5 Port C data 4 Port C data 3...
  • Page 25: Chapter 3 Control Programming

    3. Type the commands (X indicates the CD ROM driver): X:\> CD NuDAQISA\48DIO X:\> NuDAQISA\48DIO> SETUP 4. An installation completed message will be shown on the screen. After installation, all the files of PET-48DIO Library & Utility for DOS are stored in C:\ADLINK\48DIO\DOS directory. Control Programming • 19...
  • Page 26: 8255 Mode 0

    8255 Mode 0 The PET-48DIO can emulates MODE 0 of 8255 PPI, and it comes equipped with two 50-pin male IDC connectors that interface with OPTO-22 racks 8, 16, and 24. The basic function definition of 8255 mode 0 is :...
  • Page 27: Register Structure

    Table 3.1 Summarize of control word (D0 - D4) and mode state (Mode 0 - Mode 15) Register Structure The PET-48DIO needs two bytes of I / O address to operate, the first byte is ports' index select and the second byte is ports' data read/write.
  • Page 28 For example, If you defined the PET-48DIO's I/O port address as 300H, then the index select register is 300H, and Data Read/Write register is 301H. The relationship of ports' index select and ports' data read / write shows a s figure.
  • Page 29: Programming For Pet-48Dio

    Programming for PET-48DIO According to the description of above sections, you can understand how to program the PET-48DIO easily. Partial of Assembly and C programs will be listed below, and a complete C source program for timer pacer interrupt of PET-48DIO is included.
  • Page 30 To write the port DX , INDEX ; DATA OF INDEX SAME AS I /O ; ADDRESS THAT SET BY SW1 AL , CTRL0 ; CTRL0 = 3H DX , AL ; SET INDEX TO GROUP 0 ; CONTROL WORD ;...
  • Page 31 To initial 8253 DX , INDEX ; DATA OF INDEX SAME AS I/O ; ADDRESS THAT SET BY SW1 AL , CTRL53 ; CTRL53 = 83H DX , AL ; SET INDEX TO 8253 CONTROL ; WORD ; DELAY ; POINT TO DATA READ/WRIT ;...
  • Page 32: Programming In C Language

    To set timer DX , INDEX ; DATA OF INDEX SAME AS I/O ; ADDRESS THAT SET BY SW1 AL , C531 ; C531 = 81H DX , AL; INDEX TO COUNT 1 ; DELAY ; POINT TO DATA READ/WRITE ;...
  • Page 33 To initial I/O port # define INDEX 0x300 //define same as //address setting # define DATA 0x301 //data R/W port # define CW0 0x3 //port 0 control port # define CW1 0x7 //port 1 control port # define CWD0 0x0A //0AH refer to 8255 CW //Mode6 Port A &...
  • Page 34 outportb(DATA,MOD15);//initial port 1 as mod //15 for input outportb(INDEX,PA1); //index to port A 1 input = inportb(DATA);//read PA1 To initial 8253 # define INDEX 0x300 //INDEX same as SW //setting # define DATA 0x301 //data R/W port # define CW53 0x83 //8253 control port # define CWD531 0x30 //8253 counter 1 CW # define CWD532 0x74 //8253 control 2 CW...
  • Page 35: A Complete Example Program For Interrupt Handling

    3.4.3 A Complete Example Program for Interrupt Handling /**********************************************************/ File name : test.C Purpose : PET-48DIO TEST Source Code Date : 06/02/1994 Version : Programmer : JIM LIU Configuration : (jumper settings) : IRQ5 JP10 : 1-2 ( Disable) JP11 : 2-3 ( Enable)
  • Page 36 void interrupt far do_isr(void); void interrupt (*old_isr)(void); Base_addr; inter = 0; /*--------------------------------------------------------*/ void set_counter( unsigned char c) outp( INDEX, CCW); outp( DATA, 0x30); outp( INDEX, COUNT); outp( DATA, c); outp( DATA, 0x00); unsigned char ia = 0x2; void interrupt far do_isr() outp( INDEX, PA0);...
  • Page 37 outp( INDEX, CW0); outp( DATA, 0x09); /* mode 5 : PA0, PB0 are output */ set_timer(1400,2400); if( inter == 1) outp( INDEX, 0x03); inp( DATA); printf( " interrupt \n"); inter = 0; }while( kbhit() == 0); setvect( 0x0d, old_isr); outp( 0x21, 0xb8); return( 0);...
  • Page 38: Product Warranty/Service

    P r o d u c t W a r r a n t y / S e r v i c e Seller warrants that equipment furnished will be free from defects in material and workmanship for a period of one year from the confirmed date of purchase of the original buyer and that upon written notice of any such defect, Seller will, at its option, repair or replace the defective item under the terms of this warranty, subject to the provisions and...

Table of Contents