Part Number Hot Search : 
US431LCZ PN2483 PAB333 CW24C02 BR88DL Z6051UA N4403 3TZ53
Product Description
Full Text Search
 

To Download PCL-818L Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  PCL-818L high-performance das card with programmable gain
copyright this documentation and the software routines contained in the pcl- 818l software disk are copyrighted 1994 by advantech co., ltd. all rights are reserved. advantech co., ltd. reserves the right to make improvements in the products described in this manual at any time without notice. no part of this manual may be reproduced, copied, translated or transmitted in any form or by any means without the prior written permission of advantech co., ltd. information provided in this manual is intended to be accurate and reliable. however, advantech co., ltd. assumes no responsibility for its use, nor for any infringe- ments of the rights of third parties which may result from its use. acknowledgments pc-labcard is a trademark of advantech co., ltd. ibm and pc are trademarks of international business machines corporation. ms- dos, microsoft c and quickbasic are trademarks of microsoft corporation. basic is a trademark of dartmouth college. intel is a trademark of intel corporation. turbo c is a trademark of borland international. part no. 2003818082 4th edition printed in taiwan october 1995
contents chapter 1 general information ................................ 1 introduction ........................................................................ 2 features .............................................................................. 2 specifications ..................................................................... 3 daughterboards .................................................................. 5 software support ................................................................ 7 chapter 2 installation ............................................... 9 initial inspection .............................................................. 10 switch and jumper settings .............................................. 10 connector pin assignments .............................................. 16 hardware installation ....................................................... 19 software installation ........................................................ 20 chapter 3 signal connections ................................. 21 analog input connections ................................................ 22 expanding analog inputs .................................................. 24 analog output connection ................................................ 25 digital signal connections ................................................ 25 chapter 4 register structure and format ............. 27 a/d data registers C base+0/1 ....................................... 29 software a/d trigger C base+0 ..................................... 29 a/d range control C base+1 .......................................... 30 mux scan register C base+2......................................... 30 digital i/o registers C base+3/11 .................................. 32 d/a output registers C base+4/5 ................................... 32 a/d status register C base+8 ......................................... 33 control register C base+9 .............................................. 34 timer/counter enable register C base+10 ...................... 36 programmable timer/counter registers C b+12/13/14/15 . 36
chapter 5 a/d conversion ....................................... 37 a/d data format and status register ................................ 38 input range selection ........................................................ 39 mux setting .................................................................... 39 trigger mode .................................................................... 40 a/d data transfer .............................................................. 41 how to make an a/d conversion ..................................... 42 chapter 6 d/a conversion ....................................... 43 general information ......................................................... 44 d/a applications .............................................................. 45 chapter 7 digital input and output ....................... 47 chapter 8 programmable timer/counter ............... 49 the intel 8254 .................................................................. 50 counter read/write and control registers .......................... 50 counter operating modes ................................................. 53 counter operations ........................................................... 55 counter applications ........................................................ 56 chapter 9 direct memory access operation .......... 57 using dma transfer with the PCL-818L ........................ 59 appendix a block diagram ...................................... 61 appendix b connector, switch and vr locations . 63 appendix c pc i/o port address map ..................... 65 appendix d calibration ........................................... 67 vr assignment ................................................................. 68 a/d calibration ................................................................ 69 d/a calibration ................................................................ 69
chapter 1 general information 1 1 general information chapter
2 PCL-818L user's manual introduction the PCL-818L is a high performance multi-function data acquisition card for ibm pc/xt/at or compatible computers. it offers the five most desired measurement and control functions: 12-bit a/d conver- sion, d/a conversion, digital input, digital output and timer/counter. automatic channel scanning circuitry and on-board sram let you perform multiple-channel a/d conversion with dma and individual channel gains. the PCL-818L is an advanced new version of our popular pcl-818. a custom 160-pin asic chip integrates the functions of the full-size pcl-818. this chip gives you maximum accuracy and reliability, along with minimum cost, size and power consumption. the resulting half-size card is fully software compatible with the pcl- 818. this puts rich software support and a wide variety of external signal conditioning boards at your disposal. the PCL-818L is excellent for data acquisition, process control, automatic testing and factory automation. features ? 16 single-ended or eight differential analog inputs, switch selectable ? 12-bit a/d, up to 40 khz sampling rate with dma transfer and different gain for each channel. ? software programmable gain values ? software selectable analog input ranges (bipolar): two ranges, selected by jumper jp7 10, 5, 2.5, 1.25 or 5, 2.5, 1.25, 0.625 ? 16 digital inputs and 16 digital outputs, ttl/dtl compatible ? one 12-bit analog output channel ? flexible triggering options: software trigger, programmable pacer trigger and external pulse trigger. ? data transfer by program control, interrupt handler routine or dma ? new-technology 160 pin 1.0 m m cmos asic chip
chapter 1 general information 3 specifications ? analog input (a/d converter) ? channels : 16 single-ended or 8 differential, switch selectable ? resolution : 12 bits ? input ranges (bipolar, v dc ) : 0.625, 1.25, 2.5, 5 or 1.25, 2.5, 5, 10 all input ranges are software programmable. ? overvoltage : continuous 30 v max. ? conversion type : successive approximation ? conversion rate : 40 khz max. ? accuracy : (0.01% of reading), 1 bit ? linearity : 1 bit ? trigger mode : software trigger, on-board programmable pacer trigger or external trigger ? ext. trigger : ttl compatible. load is 0.4 ma max. at 0.5 v and -0.05 ma max. at 2.7 v ? data transfer : program, interrupt or dma ? analog output (d/a converter) ? channels : 1 channel ? resolution : 12 bits ? output range : 0 to +5 (+10) v with on-board -5 (-10) v reference. max. 10 v with external dc or ac reference ? reference : internal: -5 v or -10 v external dc or ac: 10 v max. ? conversion type : 12 bit monolithic multiplying ? linearity : 0.5 bit ? output drive : 5 ma max. ? settling time : 5 microseconds
4 PCL-818L user's manual ? digital input ? channel : 16 bits ? level : ttl compatible ? input voltage : low: 0.8 v max. high: 2.0 v min. ? input load : low: 0.4 ma max. at 0.5 v high: 0.05 ma max. at 2.7 v ? digital output ? channel : 16 bits ? level : ttl compatible ? output voltage : low: sink 8 ma at 0.5 v max. high: source -0.4 ma at 2.4 v min. ? programmable timer/counter ? device : intel 8254 or equivalent ? counters : 3 channels, 16 bit. 2 channels are permanently configured as programmable pacers 1 channel is free for your applications ? input, gate : ttl/cmos compatible ? time base : pacer channel 1: 10 mhz or 1 mhz, switch selectable pacer channel 2: takes input from channel 1 pacer channel 0: internal 100 khz or external clock (10 mhz max). source selected with timer/counter enable register (base+10) ? pacer output : 0.00023 hz (71 minutes/pulse) to 2.5 mhz ? interrupt channel ? level : irq 2 to 7, software selectable ? enable : via inte bit of control register (base+9)
chapter 1 general information 5 ? dma channel ? level : 1 or 3, jumper selectable ? enable : via dmae bit of control register (base+9) ? general ? power consumption : +5 v: 210 ma typical, 500 ma max. +12 v: 20 ma typical, 100 ma max. -12 v: 20 ma typical, 40 ma max. ? i/o connector : 20 pin post headers for i/o connection. adapter available to convert to db-37 connector ? analog input/output/counter connector : db-37 ?i /o base : requires 16 consecutive address locations. base address definable by the dip switch sw1 for address line a9-a4. (factory setting is hex 300) ? operating temp : 0 to +50 o c ? storage temp : -20 to +65 o c daughterboards we offer a wide variety of optional daughterboards to help you get the most from your PCL-818L. you will need the pcld-774 analog expansion board or pcld-8115 wiring terminal board to make connections. ? pcld-789 amplifier/multiplexer board this analog input-signal conditioning board multiplexes up to 16 differential inputs to one a/d input channel. a high grade instrumen- tation amplifier provides switch selectable gains of 0.5, 1, 2, 10, 50, 100, 200, 1000 or user defined. ? pcld-788 relay multiplexer board this board multiplexes up to 16 differential inputs to one analog output channel. it offers isolated break-before-make high voltage switching and a cjc circuit for thermocouple measurement.
6 PCL-818L user's manual ? pcld-787 8-channel simultaneous sample and hold board this board lets you simultaneously acquire up to eight analog inputs with less than 30 nsec of channel-to-channel sample time uncertainty. ? pcld-786 ac/dc power ssr and relay driver board this board holds eight opto-isolated solid state relay modules and provides an additional eight outputs to drive external relays. ? pcld-785b and pcld-885 relay output boards these boards let you control relays through the PCL-818L's 16-bit digital output channels. pcld-785b provides 24 spdt relays, while the pcld-885 provides 16 spst power relays. ? pcld-782b isolated d/i board this board provides 24 opto-isolated digital input channels and a cable to connect to the PCL-818L's digital input ports. ? pcld-779 8-channel relay-isolated multiplexer and amplifier board this board lets you easily make multi-channel temperature measure- ments. we designed it for the cost-sensitive customer who requires precision, low-level signal measurement and isolation for industrial applications. ? pcld-770 with pcld-7701 and pcld-7702 modules pcld-770 accepts signals from up to eight pcld-7701 or pcld- 7702 signal conditioning modules and multiplexes them into a single analog input channel. pcld-7701 is an isolated amplifier module and the pcld-7702 is an amplifier with i/v source. you can cascade up to ten pcld-770s for a total of 80 differential input channels. ? pcld-5b16 module carrier board this board holds 16 5b-series input and/or output modules. we supply 5b modules for wide variety of signal input signals, including thermocouples, strain gauges and rtds.
chapter 1 general information 7 software support the PCL-818L comes with a powerful and easy-to-use software driver whose functions can be accessed by referring to a user-defined parameter table. with these driver functions your application pro- gramming becomes much easier, especially when you want to use some of the sophisticated features available from the PCL-818L, such as interrupt or dma data transfer. you can also use the following application software packages with the PCL-818L. ? dadisp spreadsheet software for off-line data analysis and digital signal processing. dsp development corp. ? labtech notebook integrated data acquisition software with real time analysis, display and process control. laboratory technologies corp. ? labtech acquire low cost data acquisition software . laboratory technologies corp. ? daxpert 1.0 dos-based general purpose data acquisition package. you can quickly set up an experiment, acquire data and graphically display the results on the screen in real time. advantech. ? genie 1.1 windows-based general purpose data acquisition package. its intui- tive, object-oriented graphical user interface simplifies control strategy and display setups. advantech ? pc-scope this software turns your pc into a storage-oscilloscope. advantech
8 PCL-818L user's manual ? snap-master for microsoft windows a pc-based data-acquisition, analysis and display software tool for microsoft windows. this is the first windows-based package that allows control of sensors, transducers, actuators and signal condition- ers as part of the data-acquisition system. hem data corporation ? genesis icon-based process-control software for graphically creating, simulat- ing and executing real-time data acquisition and process control strategies. iconics, inc. ? pc-streamer a menu-driven, user friendly data acquisition software package capable of continuously streaming up to 16 channels of acquired data to disk. it can store at up to 200 kb/sec with no limitations on file size. advantech contact your local pc-labcard representative for more information about these software packages.
chapter 2 installation 9 chapter 2 installation
10 PCL-818L user's manual initial inspection we carefully inspected the PCL-818L both mechanically and electri- cally before shipment. it should be free of marks and scratches and in perfect order on receipt. as you unpack the PCL-818L, check it for signs of shipping damage (damaged box, scratches, dents, etc.). if it is damaged or fails to meet specifications, notify our service department or your local sales representative immediately. also, call the carrier immediately and retain the shipping carton and packing material for inspection by the carrier. we will then make arrangements to repair or replace the unit. discharge any static electricity on your body before you touch the board by touching the back of the system unit (grounded metal). remove the PCL-818L card from its protective packaging by grasping the rear metal panel. handle the card only by its edges to avoid static electric discharge which could damage its integrated circuits. keep the antistatic package. whenever you remove the card from the pc, please store the card in this package for protection. you should also avoid contact with materials that hold static electricity such as plastic, vinyl and styrofoam. switch and jumper settings we designed the PCL-818L ease-of-use as a primary design goal. the card has one function switch and seven jumper settings the following sections tell how to configure the card. you may want to refer to the figure in appendix b for help identifying card compo- nents. base address selection (sw1) you control the PCL-818L's operation by reading or writing data to the pc's i/o (input/output) port addresses. the PCL-818L requires 16 consecutive address locations. switch sw1 sets the card's base (beginning) address. valid base addresses range from hex 000 to hex 3f0. other devices in your system may, however, be using some of these addresses.
chapter 2 installation 11 we set the PCL-818L for a base address of hex 300 at the factory. if you need to adjust it to some other address range, set switch sw1 as shown in the following table: card i/o addresses (sw1) range (hex) switch position 123456 000 - 00f llllll 010 - 01f lllll? 200 - 20f ?lllll 210 - 21f ?llll? * 300 - 30f ??llll 3f0 - 3ff ?????? ? = off l = on * = default note: switches 1-6 control the pc bus address lines as follows: switch 123456 line a9 a8 a7 a6 a5 a4 appendix c provides a pc i/o port address map to help you avoid the i/o addresses for standard pc devices. dma channel selection (jp1) the PCL-818L supports dma data transfer. jumper jp1 selects the dma channel 1 or 3, as shown in the following figure. channel 1 channel 3 (default) ??? 13 ??? 13
12 PCL-818L user's manual timer clock selection (jp2) jp2 controls the input clock frequency for the 8254 programmable clock/timer. you have two choices: 10 mhz and 1 mhz. this lets you generate pacer output frequencies from 2.5 mhz to 0.00023 hz (71 minutes/pulse). the following equation gives the pacer rate: pacer rate = fclk / ( div1 * div2 ) fclk is 1 mhz or 10 mhz as set by jumper jp2. div1 and div2 are the dividers set in counter 1 and counter 2 in the 8254. see chapter for more information on the card's 8254 counter/timer. 10 mhz 1 mhz (default) trig0 and gate0 selection (jp3) jp3 has two jumpers. the upper jumper selects the card's a/d trigger source when you use external triggering. the lower jumper selects the gate control for counter 0 of the card's 8254 timer/counter. upper jumper ? source for external trigger: you have two choices: di0 (pin 1) on connector cn2 or trig0 (pin 35) on cn3. trig0 di0 (default) lower jumper ? counter 0 gate controller you have two choices: di2 (pin 3) on connector cn2 or gate0 (pin 36) on cn3. gate0 di2 (default) ??? 1m 10m ??? 1m 10m ??? dio trig0 ??? dio trig0 ??? di2 gate0 ??? di2 gate0
chapter 2 installation 13 we recommend that you leave jp3 set to the default di0 and di2 (both jumpers in the left-hand position), because this setting is required by the software driver. this setting has the same effect as that achieved by sw6 positions 7 and 8 on the pcl-718 card. d/a reference voltage, int./ext. (jp4) jumper jp4 selects reference voltage source for the PCL-818L's d/a converters. you can use the card's internal reference or supply an external reference. set jp4 as shown below: external ref. internal ref. (default) when you set jp4 to int, the d/a converter takes its reference voltage input from the card's on-board reference. jumper jp5 sets the on-board reference to either -5 v or -10 v. with jp4 set to int, the d/a channel has an output range of 0 v to +5 v or 0 v to +10 v. when you set jp4 to ext, the d/a converter takes its reference voltage input from pin 31 of connector cn3. you can apply any voltage between -10 v and +10 v to this pin to function as the external reference. the reference input can be either dc or ac (<100 khz). when you use an external reference with voltage v ref , you can program the d/a channel to output from 0 v to -v ref . you can also use the d/a converter as a programmable attenuator. the attenuation factor between reference input and analog output is: attenuation factor = g / 4095 where g is a value you write to the d/a registers between 0 and 4095. for example, if you set g to 2048, then the attenuation factor is 0.5. a sine wave of 10 v amplitude applied to the reference input will generate a sine wave of 5 v amplitude on the analog output. ??? int ext ??? int ext
14 PCL-818L user's manual ??? ??? 10v 5v 10v 5v ??? ??? 10v 5v 10v 5v ??? ??? ??? ??? internal voltage reference, -10 v or -5 v (jp5) if you use an internal reference voltage (set with jp4), the PCL-818L provides a choice of dc internal reference voltage sources: -5 v and - 10 v. jp5 selects the source, as shown below: -10 v -5 v (default) channel configuration, s. e. or diff. (jp6) the PCL-818L offers 16 single-ended or eight differential analog input channels. jumper jp6 switches the channels between single- ended or differential input, as shown below: 16 s. e. inputs eight differential inputs (default) input voltage range, 5 or 10 v (jp7) jumper jp7 selects the input voltage range for the a/d converter. when you set jp7 to 5 v, the maximum input voltage range is 5 v and the programmable input ranges are 5 v, 2.5 v, 1.25 v and 0.625 v. when you set jp7 to 10 v, the maximum input voltage range is 10 v and the programmable input ranges are 10 v, 5 v, 2.5 v and 1.25 v. set jp7 as shown below: 10 v 5 v (default) diff s/e diff s/e
chapter 2 installation 15 digital output, 20-pin or 37-pin conn. (jp8-11) jumpers jp8 to jp11 switch digital output channels 0 to 3 between the card's 20-pin connector and 37-pin connector. if you set the jumpers to the left (d) side, the digital output signals will come out on connec- tor cn1 (20-pin). if you set the jumpers to the right (s) side, the output signals will come out on connector cn3 (37-pin). these four digital output signals select the analog input channel when you use a multiplexer/amplifier daughterboard. daughterboards with a db-37 connector, such as the pcld-789d or pcld-779d, read the digital output signals from the db-37 connector (dn3). with other daughterboards you will need to connect an external 20-pin flat cable from cn1 to the daughterboard. settings for jp8 to jp11 appear below: do to cn3, 37-pin do to cn1, 20-pin (default) ??? ??? ??? ??? s0 s1 s2 s3 d0 d1 d2 d3 ??? ??? ??? ??? s0 s1 s2 s3 d0 d1 d2 d3 jp8 jp9 jp8 jp9 jp10 jp11 jp10 jp11
16 PCL-818L user's manual connector pin assignments the PCL-818L has two on-board 20-pin flat-cable connectors (insulation displacement, mass termination) and a db-37 connector accessible from the card bracket. see the figure in appendix b for the location of each connector. connector pin assignments appear below. abbreviations a/d s analog input (single-ended) a/d h analog input high (differential) a/d l analog input low (differential) a.gnd analog ground d/a analog output d/o digital output d/i digital input d.gnd digital and power supply ground clk clock input for the 8254 gate gate input for the 8254 out signal output of the 8254 vref internal voltage reference vrefin external voltage reference input ? connector cn1 ? digital output d/o 0 1 2 d/o 1 d/o 2 3 4 d/o 3 d/o 4 5 6 d/o 5 d/o 6 7 8 d/o 7 d/o 8 9 10 d/o 9 d/o 10 11 12 d/o 11 d/o 12 13 14 d/o 13 d/o 14 15 16 d/o 15 d.gnd 17 18 d.gnd + 5 v 19 20 +12 v note: jumpers jp8 to jp11 select the output connector (either cn1 or cn3) for digital output signals 0 to 3. if you switch the output to cn3, no signals will appear on cn1, and vice versa.
chapter 2 installation 17 ? connector cn2 ? digital input d/i 0 1 2 d/i 1 d/i 2 3 4 d/i 3 d/i 4 5 6 d/i 5 d/i 6 7 8 d/i 7 d/i 8 9 10 d/i 9 d/i 10 11 12 d/i 11 d/i 12 13 14 d/i 13 d/i 14 15 16 d/i 15 d.gnd 17 18 d.gnd +5 v 19 20 +12 v ? connector cn3 ? analog input/output/counter, single ended operation a/ds0 1 a/ds1 2 a/ds2 3 a/ds3 4 a/ds4 5 a/ds5 6 a/ds6 7 a/ds7 8 agnd 9 agnd 10 v.ref 11 s0 12 +12 v 13 s2 14 dgnd 15 nc 16 counter 0 clk 17 counter 0 out 18 +5 v 19 20 a/ds8 21 a/ds9 22 a/ds10 23 a/ds11 24 a/ds12 25 a/ds13 26 a/ds14 27 a/ds15 28 agnd 29 agnd 30 da0 out 31 da0 vrefin 32 s1 33 s3 34 dgnd 35 trig0 36 counter 0 gate 37 pacer note: jumpers jp8 to jp11 select the output connector (either cn1 or cn3) for digital output signals 0 to 3. if you switch the output to cn1, no signals will appear on cn3, and vice versa.
18 PCL-818L user's manual ? connector cn3 ? analog input/output/counter, differential ended operation a/dh0 1 a/dh1 2 a/dh2 3 a/dh3 4 a/dh4 5 a/dh5 6 a/dh6 7 a/dh7 8 agnd 9 agnd 10 vref 11 s0 12 +12 v 13 s2 14 dgnd 15 nc 16 counter 0 clk 17 counter 0 out 18 +5 v 19 20 a/dl0 21 a/dl1 22 a/dl2 23 a/dl3 24 a/dl4 25 a/dl5 26 a/dl6 27 a/dl7 28 agnd 29 agnd 30 da0out 31 da0vrefin 32 s1 33 s3 34 dgnd 35 trig0 36 counter 0 gate 37 pacer note: jumpers jp8 to jp11 select the output connector (either cn1 or cn3) for digital output signals 0 to 3. if you switch the output to cn1, no signals will appear on cn3, and vice versa.
chapter 2 installation 19 hardware installation warning! turn off your pc power supply whenever you install or remove the PCL-818L or connect and disconnect cables. installing the card in your computer 1. turn the computer off. turn the power off to any peripheral devices such as printers and monitors. 2. disconnect the power cord and any other cables from the back of the computer. 3. remove the system unit cover (see the user's guide for your chassis if necessary). 4. locate the expansion slots at the rear of the unit and choose any unused slot. 5. remove the screw that secures the expansion slot cover to the system unit. save the screw to secure the interface card retaining bracket. 6. carefully grasp the upper edge of the PCL-818L card. align the hole in the retaining bracket with the hole on top of the expansion slot and align the gold striped edge connector with the expansion slot socket. press the board firmly into the socket. 7. secure the PCL-818L using the screw you removed in step 5. 8. attach any accessories (using 20 pin flat cables, a db-37 cable, etc.) to the PCL-818L. 9. replace the system unit cover. connect the cables you removed in step 2. turn the computer power on. hardware installation is now complete. install the software driver as described in the following section.
20 PCL-818L user's manual software installation the PCL-818L includes a floppy disk with utility software. the disk contains the following: 1. a comprehensive i/o driver for a/d, d/a, digital i/o and counter applications. this driver lets you use standard functions, written in common programming languages, to operate the PCL-818L. you do not need to perform detailed register programming. the driver supports the following languages: basica, gwbasic, quick- basic, microsoft c/c++ and pascal, turbo c/c++, borland c/ c++ and turbo pascal. please refer to the software driver user?s manual for more information. 2. demonstration programs 3. a calibration program 4. a test programs we strongly recommend that you make a working copy from the master disk and store the master disk in a safe place. you can use the dos copy or diskcopy commands to copy the disk files to another floppy disk or simply use the copy command to copy the files to a hard disk.
chapter 3 signal connections 21 3 signal connections chapter
22 PCL-818L user's manual correct signal connections are one of the most important factors to consider if your application is to send and receive data with accuracy. good signal connections can also avoid a lot of unnecessary damage to your valuable pc and other hardware. this chapter provides information on signal connections for different types of data acquisi- tion applications. analog input connections the PCL-818L supports either 16 single-ended or eight differential analog inputs. jumper jp7 selects the input channel configuration. the major difference between single-ended and differential input connections is the number of signal wires per input channel. single-ended channel connections single-ended connections use only one signal wire per channel. the voltage on the line references to the common ground on the card. a signal source without a local ground is called a ?floating? source. it is fairly simple to connect a single-ended channel to a floating signal source. a standard wiring diagram looks like this: differential channel connection the differential input configuration uses two signal wires per channel. the card measures only the voltage difference between these two wires, the high wire and the low wire. if the signal source has no connection to ground, it is called a ?floating? source. a connection signal input to a/d a.gnd a.gnd + vs -
chapter 3 signal connections 23 must exist between low and ground to define a common reference point for floating signal sources. to measure a floating source connect the input channel as shown below: if the signal source has one side connected to a local ground, the signal source ground and the PCL-818L ground will not be at exactly the same voltage, as they are connected through the ground return of the equipment and building wiring. the difference between the ground voltages forms a common-mode voltage. to avoid the ground loop noise effect caused by common-mode voltages, connect the signal ground to the low input. do not connect the low input to the PCL-818L ground directly. in some cases you may also need a wire connection between the PCL-818L ground and the signal source ground for better grounding. the following two diagrams show correct and incorrect connections for a differential input with local ground: correct connection a.gnd + vs - + vin - + - high low gnd + vs - + vin - + - high low vin=vs vcm + _
24 PCL-818L user's manual incorrect connection expanding analog inputs you can expand any or all of the PCL-818L's a/d input channels with multiplexing daughterboards. most daughterboards require the pcld-774 analog expansion board or the pcld-8115 screw terminal board for connections. the pcld-789 amplifier and multiplexer multiplexes 16 differential inputs to one a/d input channel. you can cascade up to eight pcld- 789s to the PCL-818L for a total of 128 channels. see the pcld-779 user's manual for complete operating instructions. the pcld-774 analog expansion board accommodates multiple external signal-conditioning daughterboards, such as pcld-779 and pcld-789. it features five sets of on-board 20-pin header connectors. a special star-type architecture lets you cascade multiple signal- conditioning boards without the signal-attenuation and current- loading problems of normal cascading. the pcld-8115 screw terminal board makes wiring connections easy. it provides 20-pin flat cable and db-37 cable connectors. it also includes cjc (cold junction compensation) circuits which let you directly measure thermocouples with your PCL-818L. you can handle all types of thermocouples with software compensation and lineariza- tion. special circuit pads on the pcld-8115 accommodate passive signal conditioning components. you can easily implement a low-pass filter, attenuator or current shunt by adding resistors and capacitors. gnd + vs - + vin - + - high low vin=vs+vcm vcm + _
chapter 3 signal connections 25 analog output connection the PCL-818L provides one d/a output channel. you can use the internal precision -5 v or -10 v reference to generate 0 to +5 v or 0 to +10 v d/a output. for other d/a output ranges, use an external reference. the maximum reference input voltage is 10 v and maximum output scaling is 10 v. loading current for d/a outputs should not exceed 5 ma. connector cn3 provides d/a, a/d and counter signals. important d/a signal connections such as input reference, d/a outputs and analog ground appear below: digital signal connections the PCL-818L has 16 digital input and 16 digital output channels. the digital i/o levels are ttl compatible. the following figure shows connections to exchange digital signals with other ttl devices: d.gnd d.gnd di do ttl devices on-board ref d/a jp4 jp5 -5v -10v cn3-11 vref cn3-31 d/a ref in cn3-30 d/a out cn3-9,10,14,28,29,33 a.gnd
26 PCL-818L user's manual d.gnd 4.7k +5v to receive an open/short signal from a switch or relay, add a pull- up resistor to ensure that the input is held at a high level when the contacts are open. see the figure below:
chapter 4 register structure and format 27 4 register structure and format chapter
28 PCL-818L user's manual the key to programming the PCL-818L is to understand the function of the card's 16 registers. the PCL-818L requires 16 consecutive addresses in the pc's i/o space. each address corresponds to a card register. the address of each register is specified as an offset from the card's base address. for example, base+0 is the card's base address and base+7 is the base address + seven bytes. if the card's base address is 300h, the register's address is 307h. the following sections give detailed information on the layout and function of each of the card's registers. i/o port address map the following table shows the function of each register or driver and its address relative to the card's base address. i/o port address assignments address read write base+0 a/d low byte & channel software a/d trigger base+1 a/d high byte a/d range control base+2 mux scan channel mux scan channel & range control pointer base+3 d/i low byte (di0-7) d/o low byte (do0-7) base+4 n/a d/a 0 low byte base+5 n/a d/a 0 high byte base+6 n/a n/a base+7 n/a n/a base+8 status clear interrupt request base+9 control control base+10 n/a counter enable base+11 d/i high byte (di8-15) d/o high byte (do8-15) base+12 counter 0 counter 0 base+13 counter 1 counter 1 base+14 counter 2 counter 2 base+15 n/a counter control
chapter 4 register structure and format 29 a/d data registers ? base+0/1 two read-only registers at base+0 and base+1 hold a/d conver- sion data. the 12 bits of data from the conversion are stored in base+1 bit 7 to bit 0 and base+0 bit 7 to bit 4. base+0 bits 3 to 0 store the source a/d channel number. base+0 (read only) ? a/d low byte and channel number bit d7 d6 d5 d4 d3 d2 d1 d0 value ad3 ad2 ad1 ad0 c3 c2 c1 c0 base+1 (read only) ? a/d high byte bit d7 d6 d5 d4 d3 d2 d1 d0 value ad11 ad10 ad9 ad8 ad7 ad6 ad5 ad4 ad11 to ad0 analog to digital data. ad0 is the least significant bit (lsb) of the a/d data, and ad11 is the most significant bit (msb). c3 to c0 a/d channel number from which the data is derived. c3 is the msb and c0 is the lsb. software a/d trigger ? base+0 you can trigger an a/d conversion from software, the card's on-board pacer or an external pulse. bits 1 and 0 of register base+9 (shown on page 34) select the trigger source. if you select software trigger- ing, a write to the register base+0 with any value will trigger an a/d conversion.
30 PCL-818L user's manual a/d range control ? base+1 each a/d channel has its own individual input range, controlled by a range code stored in on-board ram and the setting of jumper jp7. if you want to change the range code for a given channel, select the channel as the start channel in register base+2, mux scan (de- scribed in the next section), then write the range code to bits 0 and 1 of base+1. base+1 (write only)? a/d range control code bit d7 d6 d5 d4 d3 d2 d1 d0 value n/a n/a n/a n/a n/a n/a g1 g0 range codes and jp7 settings appear below: input range range code jp7 = 5 v jp7 = 10 v g1 g0 5 v 10 v 0 0 2.5 v 5 v 0 1 1.25 v 2.5 v 1 0 0.625 v 1.25 v 1 1 mux scan register ? base+2 read/write register base+2 controls multiplexer (mux) scanning. the high nibble provides the stop scan channel number, and the low nibble provides the start scan channel number. the mux is initialized automatically to the start channel when you write to this register. each a/d trigger sets the mux to the next channel.
chapter 4 register structure and format 31 with continuous triggering the mux will scan from the start channel to the end channel, then repeat. for example, if the start channel is 3 and the stop channel is 7, then the scan sequence is 3, 4, 5, 6, 7, 3, 4, 5, 6, 7, 3, 4... base+2 (write) ? start and stop scan channels bit d7 d6 d5 d4 d3 d2 d1 d0 value ch3 ch2 ch1 ch0 cl3 cl2 cl1 cl0 ch3 to ch0 stop scan channel number cl3 to cl0 start scan channel number the mux scan register low nibble, cl3 to cl0, also acts as a pointer when you program the a/d input range (see previous section). when you set the mux start channel to n, the range code written to the register base+1 is for channel n. programming example this basic code fragment sets the range for channel 5 to 0.625 v: 200 out base+2, 5 set pointer to ch.5 210 out base+1, 3 range code=3 for 0.625 v note : the mux start/stop channel changes each time you change the input range. do not forget to reset the mux start and stop channels to the correct values after you are finished setting the range.
32 PCL-818L user's manual digital i/o registers ? base+3/11 the PCL-818L offers 16 digital input channels and 16 digital output channels. these i/o channels use the input and output ports at address base+3 and base+11. base+3 (read port) ? d/i low byte bit d7 d6 d5 d4 d3 d2 d1 d0 value di7 di6 di5 di4 di3 di2 di1 di0 base+3 (write port) ? d/o low byte bit d7 d6 d5 d4 d3 d2 d1 d0 value do7 do6 do5 do4 do3 do2 do1 do0 base+11 (read port) ? d/i high byte bit d7 d6 d5 d4 d3 d2 d1 d0 value di15 di14 di13 di12 di11 di10 di9 di8 base+11 (write port) ? d/o high byte bit d7 d6 d5 d4 d3 d2 d1 d0 value do15 do14 do13 do12 do11 do10 do9 do8 d/a output registers ? base+4/5 write-only registers base+4 and +5 accept data for d/a output. base+4 ? d/a output low byte bit d7 d6 d5 d4 d3 d2 d1 d0 value da3da2da1da0xxxx base+5 ? d/a output high byte bit d7 d6 d5 d4 d3 d2 d1 d0 value da11 da10 da9 da8 da7 da6 da5 da4 da11 to da0 digital to analog data. da0 is the least significant bit (lsb) and da11 is the most significant bit (msb) of the d/a data.
chapter 4 register structure and format 33 a/d status register ? base+8 read-only register base+8 provides information on the a/d configu- ration and operation. writing to this i/o port with any data value clears the its int bit. the other data bits do not change. base+8 ? a/d status bit d7 d6 d5 d4 d3 d2 d1 d0 value eoc n/a mux int cn3 cn2 cn1 cn0 eoc end of conversion. 0 the a/d converter is idle, ready for the next conversion. data from the previous conversion is available in the a/d data registers. 1 the a/d converter is busy, implying that the a/d conversion is in progress. mux single-ended/differential channel indicator. 0 8 differential channels 1 16 single-ended channels int data valid. 0 no a/d conversion has been completed since the last time the int bit was cleared. values in the a/d data registers are not valid data. 1 the a/d conversion has finished, and converted data is ready. if the inte bit of the control register (base +9) is set, an interrupt signal will be sent to the pc bus through interrupt level irqn, where n is specified by bits i2, i1 and i0 of the control register. though the a/d status register is read-only, writing to it with any value will clear the int bit. cn3 to cn0 when eoc = 0 these status bits contain the channel number of the next channel to be converted.
34 PCL-818L user's manual remarks if you trigger the a/d conversion with the on-board pacer or an external pulse, your software should check the int bit, not the eoc bit, before it reads the conversion data. eoc can equal 0 in two different situations: the conversion is com- pleted or no conversion has been started. your software should therefore wait for the signal int = 1 before it reads the conversion data. it should then clear the int bit by writing any value to the a/d status register base+8. control register ? base+9 read/write register base+9 provides information on the PCL-818L's operating modes. base+9 ? control bit d7 d6 d5 d4 d3 d2 d1 d0 value inte i2 i1 i0 x dmae st1 st0 inte disable/enable PCL-818L generated interrupts 0 disables interrupt generation. no interrupt signal can be sent to the pc bus. 1 enables interrupt generation. if dmae = 0 the pcl- 818l will generate an interrupt when it completes an a/d conversion. use this setting for interrupt driven data transfer. if dmae = 1 the PCL-818L will generate an interrupt when it receives a t/c (terminal count) signal from the pc's dma controller, indicating that a dma transfer has completed. use this setting for dma data transfer. the dma transfer is stopped by the interrupt caused by the t/c signal. see dmae below.
chapter 4 register structure and format 35 i2 to i0 selects the interrupt used by an interrupt or dma driven data transfer. interrupt level inl2 inl1 inl0 n/a 0 0 0 n/a 0 0 1 irq2 0 1 0 irq3 0 1 1 irq4 1 0 0 irq5 1 0 1 irq6 1 1 0 irq7 1 1 1 note : make sure that the irq level you choose is not being used by another i/o device. dmae disable/enable PCL-818L dma transfers. 0 disables dma transfer. 1 enables dma transfer. each a/d conversion initiates two successive dma request signals. these signals cause the 8237 dma controller to transfer two bytes of conversion data from the PCL-818L to memory. note : you must program the pc's 8237 dma controller and the dma page register before you set dmae to 1. st1 to st0 trigger source trigger source st1 st0 software trigger 0 x external trigger 1 0 pacer trigger 1 1
36 PCL-818L user's manual timer/counter enable register ? base+10 write register base+10 enables or disables the PCL-818L's timer/ counter base+10 ? enable pacer bit d7 d6 d5 d4 d3 d2 d1 d0 value xxxxxxtc1tc0 tc0 disable/enable pacer 0 pacer enabled 1 pacer controlled by trig0. this blocks trigger pulses sent from the pacer to the a/d until trig0 is taken high. tc1 counter 0 input source mode 0 sets counter 0 to accept external clock pulses 1 connects counter 0 internally to a 100 khz clock source programmable timer/counter registers ? base+12/13/14/15 the four registers located at addresses base+12, base+13, base+14 and base+15 are used for the intel 8254 programmable timer/counter. please refer to chapter 8 or 8254 product literature for detailed application information.
chapter 5 a/d conversion 37 chapter 5 a/d conversion
38 PCL-818L user's manual this chapter explains how to use the PCL-818L's a/d conversion functions. the first five sections cover a/d data format, input range selection, status register settings, mux scan setting, trigger modes and data transfer. the last section gives step by step implementation guidelines for a/d operations. a/d data format and status register since the PCL-818L uses 12-bit a/d conversions, a single 8-bit register will not accommodate all the data. the PCL-818L therefore stores a/d data in two registers located at addresses base+0 and base+1. it stores the a/d low byte data in bits d4 to d7 (ad0 to ad3) of base+0 and high byte data in bits d0 to d7 (ad4 to ad11) of base+1. the least significant bit is ad0 and the most significant bit is ad11. you can read the source channel number corresponding to the a/d data form bits d0 to d3 (c0 to c3) of base+0. a/d data register format is: base+0 (read only) ? a/d low byte and channel number bit d7 d6 d5 d4 d3 d2 d1 d0 value ad3 ad2 ad1 ad0 c3 c2 c1 c0 base+1 (read only) ? a/d high byte bit d7 d6 d5 d4 d3 d2 d1 d0 value ad11 ad10 ad9 ad8 ad7 ad6 ad5 ad4 the a/d status register at base+8 (read only) gives information on a/d configuration and operation. a/d status register format is: base+8 ? a/d status bit d7 d6 d5 d4 d3 d2 d1 d0 value eoc n/a mux int cn3 cn2 cn1 cn0
chapter 5 a/d conversion 39 bits in this register indicate the end of conversion status, single- ended/differential input, interrupt status and the number of the channel to be converted next. refer to chapter 4, a/d status register , for more information. input range selection each a/d channel has its own individual input range, controlled by a range code stored in on-board ram and the setting of jumper jp7. please refer to chapter 4, a/d range control , for more information. mux setting the PCL-818L offers 16 single-ended or eight differential analog input channels. set jumper jp6 for the channel configuration before you set the multiplexer scan range. the mux scan register specifies the high and low limits of the scan range. the mux scan register is a read/write register at address base+2. bits d0 to d3 hold the starting channel number, and positions d4 to d7 hold the stop scan channel number. when you set the PCL-818L for eight differential input channels, bits ch3 and cl3 must be zero. the mux scan register data format is: base+2 (write) ? start and stop scan channels bit d7 d6 d5 d4 d3 d2 d1 d0 value ch3 ch2 ch1 ch0 cl3 cl2 cl1 cl0 if you require only one a/d input channel, you should set the high and low scan limits to the same value. if you specify a range of input channels, the PCL-818L automatically performs an a/d conversion on each channel in the range, beginning with the start channel. when it reaches the stop channel, it loops back to the start channel and continues. this looping continues until the specified number of conversions is completed. note that writing to the mux automatical- ly resets it to the start channel.
40 PCL-818L user's manual you can specify channel settings by writing directly to the mux scan register. you use the mux scan register to point to a specified channel when you set channel input ranges (with base+1). after you set the input range, you will need to reset the mux register for the proper start and stop channels. trigger mode you can trigger an a/d conversion from software, the card's on-board pacer or an external pulse. bits 1 and 0 of register base+9 select the trigger source. 1. if you select software triggering, a write to the register base+0 with any value will trigger an a/d conversion. you would not normally use software triggering in high speed a/d applications because the triggering rate is too slow. 2. you can use the PCL-818L's on-board intel 8254 programmable interval timer/counter to generate timing related signals. counters 1 and 2 of the intel 8254 can provide a/d converter trigger pulses with precise periods. the 8254 can generate pacer output between 2.5 mhz and 71 minutes per pulse. chapter 8 covers the details of the intel 8254 timer/counter. pacer triggering is ideal for interrupt and dma data transfer, normally used in a/d applications which require higher conver- sion speeds. 3. you can provide an external signal to trigger the a/d conversion. connect the external signal to trig0 (pin 35 on connector cn3). you would normally use external triggering if your application requires a/d conversions not periodically, but conditionally, e. g., measuring a voltage when a limit switch closes. the a/d conver- sion starts at the rising edge of the external trigger pulse.
chapter 5 a/d conversion 41 a/d data transfer you can perform a/d data transfer by program control, interrupt routine or dma. 1. program controlled data transfer operates by polling the a/d status register. after the a/d conversion has been triggered, your application program checks the int bit (data valid) of the a/d status register. when it detects that the int bit is on (1), it sends the a/d data to the pc's memory using dma. remember to reset the int bit (by writing to register base+8 with any value) after you transfer the a/d data. when you use software triggering, you can check either the int or eoc bits for data validity. because the program triggers the a/d conversion, you do not need to poll the int bit to see if the conversion has occurred. it is easier to use the eoc bit, because you do not need to clear it after you transfer the data. 2. with interrupt routine data transfer, an interrupt routine handler program transfers data from the card's a/d data registers to a previously defined memory segment in the pc. at the end of each conversion the eoc signal generates an interrupt, and the interrupt handler routine performs the transfer. you must specify the interrupt control bit and the interrupt level selection bits in the PCL-818L control register (base+9) before you use the interrupt routine. writing to the a/d status register address (base+8) resets the PCL-818L interrupt request and re-enables the PCL-818L interrupt. 3. direct memory access (dma) transfer moves the a/d data from the PCL-818L hardware device to the pc system memory without the system cpu. dma is very useful in high speed data transfer, but it is complicated to operate. before the dma operation you must set the dma level (jp3), the dma enable bit control register (base+9) and the registers in the 8237 dma controller. we recommend that you use the PCL-818L driver to perform dma operations. see chapter 9 for more information on the 8237 dma controller and PCL-818L dma operations.
42 PCL-818L user's manual how to make an a/d conversion your program can perform a/d by writing all the i/o port instructions directly, or you can take advantage of the PCL-818L driver. we suggest that you make use of the driver functions in your program. this will make your programming job easier and improve your program's performance. see the software driver user?s manual for more information. do the following to perform software trigger and program controlled data transfer without the PCL-818L driver: 1. set the input range for each a/d channel. 2. set the input channel by specifying the mux scan range. 3. trigger the a/d conversion by writing to the a/d low byte register (base+0) with any value. 4. check for the end of the conversion by reading the a/d status register (base+8) int bit. 5. read data from the a/d converter by reading the a/d data registers (base+0 and base+1). 6. converting the binary a/d data to an integer.
chapter 6 d/a conversion 43 6 d/a conversion chapter
44 PCL-818L user's manual general information the PCL-818L provides one d/a output channel with two double- buffered 12-bit multiplying d/a converters. write registers at address- es base+4 and base+5 hold data to be output. da0 is the least significant bit (lsb) and da11 is the most significant bit (msb) of the d/a data. the register data format appears below: base+4 ? d/a output low byte bit d7 d6 d5 d4 d3 d2 d1 d0 value da3da2da1da0xxxx base+5 ? d/a output high byte bit d7 d6 d5 d4 d3 d2 d1 d0 value da11 da10 da9 da8 da7 da6 da5 da4 when you write data to the d/a channels, write the low byte first. the low byte is temporarily held by a register in the d/a and not released to the output. after you write the high byte, the low byte and high byte are added and passed to the d/a converter. this double buffering process protects d/a data integrity through a single step update. the PCL-818L provides a precision fixed internal -5 v or -10 v reference, selectable by means of jumper jp5. this reference voltage is available at connector cn3 pin 11. if you use this voltage as the d/a reference input, the d/a output range is either 0 to +5 v or 0 to +10 v. you can also use an external dc or ac source as the d/a reference input. in this case, the maximum reference input voltage is 10 v, and the maximum d/a output ranges are 0 to +10 v or 0 to -10 v. connector cn3 supports all d/a signal connections. see chapter 2, connector pin assignments , for connector pin assignments. chapter 3 gives a wiring diagram for d/a signal connections.
chapter 6 d/a conversion 45 d/a applications the PCL-818L supports a variety of d/a operations. it can function as a digital attenuator (by inputting variable ac or dc references) or as a generator of arbitrary waveforms. in your application program you can perform d/a functions by addressing the PCL-818L's registers directly, or you can take advan- tage of the advantech driver functions. for more information, see the user's manual for the driver.
46 PCL-818L user's manual
chapter 7 digital input and output 47 7 digital input and output chapter
48 PCL-818L user's manual the PCL-818L provides 16 digital input channels and 16 digital output channels. you read digital input data from registers base+3 and base+11. after the read operation the input lines go to three- state (data is not latched). you write digital output data to registers base+3 and base+11. the registers latch the output value (you can read it back). data format for each register appears below: base+3 (read port) ? d/i low byte bit d7 d6 d5 d4 d3 d2 d1 d0 value di7 di6 di5 di4 di3 di2 di1 di0 base+3 (write port) ? d/o low byte bit d7 d6 d5 d4 d3 d2 d1 d0 value do7 do6 do5 do4 do3 do2 do1 do0 base+11 (read port) ? d/i high byte bit d7 d6 d5 d4 d3 d2 d1 d0 value di15 di14 di13 di12 di11 di10 di9 di8 base+11 (write port) ? d/o high byte bit d7 d6 d5 d4 d3 d2 d1 d0 value do15 do14 do13 do12 do11 do10 do9 do8 using the PCL-818L's input and output functions is fairly straightfor- ward. chapter 3 gives some ideas for digital signal connections.
chapter 8 programmable counter/timer 49 8 programmable timer/counter chapter
50 PCL-818L user's manual the intel 8254 the PCL-818L provides an intel 8254 programmable interval timer/ counter, version 2. the popular 8254 offers three independent 16-bit down counters. each counter has a clock input, control gate and an output. you can program each counter for maximum count values from 2 to 65535. version 2 of the 8254 has a maximum input clock frequency of 10 mhz. the PCL-818L provides 1 mhz and 10 mhz input frequencies to the 8254 from an on-board crystal oscillator. jumper jp2 controls the input frequency. see chapter 2 for more information. counters 1 and 2 on the 8254 are cascaded and operated in a fixed divider configuration. counter 1 input connects to the 1 mhz or 10 mhz clock frequency, and the output of counter 1 connects to the input of counter 2. the output of counter 2 is internally configured to provide trigger pulses to the a/d converter, but you can also access it for your own use from connector cn3 pin 37. counter 0 is not used by the PCL-818L and is available for your use. you can access it through cn3 pin 18. counter read/write and control registers the 8254 programmable interval timer uses four registers at addresses base+12, base+13, base+14 and base+15. register functions appear below: register function base+12 counter 0 read/write base+13 counter 1 read/write base+14 counter 2 read/write base+15 counter control word since the 8254 counter uses a 16 bit structure, each section of read/ write data is split into a least significant byte (lsb) and most signifi- cant byte (msb). to avoid errors it is important that you make read/ write operations in pairs and keep track of the byte order.
chapter 8 programmable counter/timer 51 the data format for the control register appears below: base+15 ? 8254 control, standard mode bit d7 d6 d5 d4 d3 d2 d1 d0 value sc1 sc0 rw1 rw0 m2 m1 m0 bcd sc1 & sc0 select counter. counter sc1 sc0 000 101 210 read-back command 1 1 rw1 & rw0 select read/write operation operation rw1 rw0 counter latch 0 0 read/write lsb 0 1 read/write msb 1 0 read/write lsb first, 1 1 then msb m2, m1 & m0 select operating mode m2 m1 m0 mode 0 0 0 0 interrupt on terminal count 0 0 1 1 programmable one shot x 1 0 2 rate generator x 1 1 3 square wave rate generator 1 0 0 4 software triggered strobe 1 0 1 5 hardware triggered strobe
52 PCL-818L user's manual bcd select binary or bcd counting. bcd type 0 binary counting 16-bits 1 binary coded decimal (bcd) counting if you set the module for binary counting, the count can be any number from 0 up to 65535. if you set it for bcd (binary coded decimal) counting, the count can be any number from 0 to 9999. if you set both sc1 and sc0 bits to 1, the counter control register is in read-back command mode. the control register data format then becomes: base+15 C 8254 control, read-back mode bit d7 d6 d5 d4 d3 d2 d1 d0 value 1 1 cntstac2c1c0x cnt = 0 latch count of selected counter(s). sta = 0 latch status of selected counter(s). c2, c1 & c0 select counter for a read-back operation. c2 = 1 select counter 2 c1 = 1 select counter 1 c0 = 1 select counter 0 if you set both sc1 and sc0 to 1 and sta to 0, the register selected by c2 to c0 contains a byte which shows the status of the counter. the data format of the counter read/write register then becomes: base+12/13/14 ? status read-back mode bit d7 d6 d5 d4 d3 d2 d1 d0 value out nc rw1 rw0 m2 m1 m0 bcd
chapter 8 programmable counter/timer 53 out current state of counter output nc null count is 1 when the last count written to the counter register has been loaded into the counting element the counter enable register, located at address base+10, has a close relationship with the counter operation. refer to chapter 4, timer/ counter enable register , for the register data format. the tc0 bit enables and disables the pacer. if tc0 = 0, the pacer is enabled. if tc0 = 1, the pacer is disabled and trigger pulses from the pacer are kept from the a/d until trig0 is taken high. the tc1 bit controls the input source for counter 0. if tc1 = 0, counter 0 is configured to accept external clock pulses. if tc1 = 1, counter 0 is internally connected to the 100 khz clock source. counter operating modes mode 0 ? stop on terminal count the output will be initially low after this mode of operation is set. after you load the count into the selected count register, the output will remain low and the counter will count. when the counter reaches the terminal count, its output will go high and remain high until you reload it with the mode or a new count value. the counter continues to decrement after it reaches the terminal count. rewriting a counter register during counting has the following results: 1. writing to the first byte stops the current counting. 2. writing to the second byte starts the new count. mode 1 ? programmable one-shot the output is initially high. the output will go low on the count following the rising edge of the gate input. it will then go high on the terminal count. if you load a new count value while the output is low, the new value will not affect the duration of the one-shot pulse until the succeeding trigger. you can read the current count at any time without affecting the one-shot pulse. the one-shot is retriggerable, thus the output will remain low for the full count after any rising edge at the gate input.
54 PCL-818L user's manual mode 2 ? rate generator the output will be low for one period of the input clock. the period from one output pulse to the next equals the number of input counts in the counter register. if you reload the counter register between output pulses, the present period will not be affected, but the subsequent period will reflect the value. the gate input, when low, will force the output high. when the gate input goes high, the counter will start from the initial count. you can thus use the gate input to synchronize the counter. with this mode the output will remain high until you load the count register is loaded. you can also synchronize the output by software. mode 3 ? square wave generator this mode is similar to mode 2, except that the output will remain high until one half of the count has been completed (for even numbers), and will go low for the other half of the count. this is accomplished by decreasing the counter by two on the falling edge of each clock pulse. when the counter reaches the terminal count, the state of the output is changed, the counter is reloaded with the full count and the whole process is repeated. if the count is odd and the output is high, the first clock pulse (after the count is loaded ) decrements the count by 1. subsequent clock pulses decrement the count by 2. after timeout, the output goes low and the full count is reloaded. the first clock pulse (following the reload) decrements the counter by 3. subsequent clock pulses decrement the count by two until timeout, then the whole process is repeated. in this way, if the count is odd, the output will be high for (n+1)/2 counts and low for (n-1)/2 counts. mode 4 ? software triggered strobe after the mode is set, the output will be high. when the count is loaded, the counter will begin counting. on terminal count, the output will go low for one input clock period then go high again.
chapter 8 programmable counter/timer 55 if you reload the count register during counting, the new count will be loaded on the next clk pulse. the count will be inhibited while the gate input is low. mode 5 ? hardware triggered strobe the counter will start counting after the rising edge of the trigger input and will go low for one clock period when the terminal count is reached. the counter is retriggerable. counter operations read/write operation before you write the initial count to each counter, you must first specify the read/write operation type, operating mode and counter type in the control byte and write the control byte to the control register (base+15). since the control byte register and all three counter read/write registers have separate addresses and each control byte specifies the counter it applies to (by sc1 & sc0), no instructions on the operating sequence are required. any programming sequence following the 8254 conven- tion is acceptable. there are three types of counter operation: read/load lsb, read/load msb and read/load lsb followed by msb. it is important that you make your read/write operations in pairs and keep track of the byte order. counter read-back command the 8254 counter read-back command lets you check the count value, programmed mode and current states of the out pin and null count flag of the selected counter(s). you write this command to the control word register. format is as shown at the beginning of the chapter. the read-back command can latch multiple counter output latches. simply set the cnt bit to 0 and select the desired counter(s). this single command is functionally equivalent to multiple counter latch commands, one for each counter latched.
56 PCL-818L user's manual the read-back command can also latch status information for selected counter(s) by setting sta bit = 0. the status must be latched to be read; the status of a counter is accessed by a read from that counter. the counter status format appears at the beginning of the chapter. counter latch operation users often want to read the value of a counter without disturbing the count in progress. you do this by latching the count value for the specific counter, then reading the value. the 8254 supports the counter latch operation in two ways. the first way is to set bits rw1 and rw0 to 0. this latches the count of the selected counter in a 16-bit hold register. the second way is to perform a latch operation under the read-back command. set bits sc1 and sc0 to 1 and cnt = 0. the second method has the advantage of operating several counters at the same time. a subsequent read operation on the selected counter will retrieve the latched value. counter applications the 8254 programmable interval timer/counter on your PCL-818L interface card is a very useful device. you can program counters 1 and 2 to serve as a pacer to generate a/d conversion trigger pulses. counter 0 is not committed to any internal use. you can configure it for any supported function; e.g., a square wave generator.
chapter 9 direct memory access operation 57 9 direct memory access operation chapter
58 PCL-818L user's manual direct memory access (dma) improves system performance by allowing external devices to transfer information directly to or from the pc's memory without using the cpu. the PCL-818L's dma capability significantly improves the system performance in high speed a/d applications. introduction to the 8237 dma controller the 8237 dma controller chip on the pc system board handles the dma operation. this chip has four prioritized direct memory access channels. channel 0 is reserved by the pc system refresh its dynamic ram. channel 2 supports floppy disk operations. channel 3 is normally used for hard disk operations. channel 1 is not reserved for any internal operations and is available for your applications. each channel has two associated control signals associated with it. the dma request signal (drq) triggers a dma operation, and the dma acknowledge signal (dack) authorizes the 8237 to start the data transfer. the 8237 dma chip has four operating modes (single, demand, block and cascade) and four control registers. these registers are: 1. operation mode register (set mode of operation) 2. address register (specify memory segment starting address) 3. word count register (specify the number of transfers) 4. initialization register (enable and disable dma channels) note that you must properly set all four registers before requesting the dma operation.
chapter 9 direct memory access operation 59 using dma transfer with the PCL-818L dma transfer is a powerful but complicated operation. different parts of the dma transfer have been covered in other parts of this manual, especially chapter 5. the following steps summarize how to use dma transfer with the PCL-818L: 1. when you configure your hardware, check your to see which (if any) pc dma channel is available (level 1 or level 3) and set PCL-818L jumper jp1 accordingly. 2. if you will be using the PCL-818L driver for your dma transfer programming, see the software drivers user?s manual for information. 3. if you choose to conduct your own dma operation, you will need to have a solid understanding of the pc, 8237 dma controller and the PCL-818L. make sure you perform the following steps in your dma transfer: a. initialize 8237 dma controller register and page register. b. send dma enable and trigger source data to the PCL-818L control register located at address base+9. c. set an external trigger pulse or pacer trigger rate. d. enable the trigger source to start the a/d conversion
60 PCL-818L user's manual
appendix b connector, switch and vr locations 63 b connector, switch and vr locations appendix
64 PCL-818L user's manual cn1 cn2 jp2 sw1 jp3 cn3 jp1 jp7 jp5 jp4 jp6 vr1 vr2 vr3 vr4 vr5 ? tp1 jp8 jp9 jp10 jp11 card connectors, switches and vr locations label function cn1 digital output cn2 digital input cn3 analog input/analog output/counter output sw1 base address jp1 dma level (1 or 3) jp2 10 mhz/1 mhz time base jp3 trig0, gate0 connection jp4 d/a reference selection (internal/external) jp5 -5 v/-10 v internal reference jp6 differential or single-ended inputs jp7 a/d input voltage range selection (5 or 10) jp8 to jp11 digital output connector, cn1 or cn3 (daughterboard ctrl.) vr1 a/d full scale vr2 a/d bipolar offset vr3 d/a full scale vr4 d/a offset vr5 pga offset tp1 test point 1
appendix c pc i/o port address map 65 c pc i/o port address map appendix
66 PCL-818L user's manual pc i/o port address map range (hex) function 000 - 1ff base system 200 reserved 201 game control 202 - 277 reserved 278 - 27f lpt2: (2nd printer port) 280 - 2f7 reserved 2f8 - 2ff com2: 300 - 377 reserved 378 - 37f lpt1: (1st printer port) 380 - 3af reserved 3b0 - 3bf mono display/print adapter 3c0 - 3cf reserved 3d0 - 3df color/graphics 3e0 - 3ef reserved 3f0 - 3f7 floppy disk drive 3f8 - 3ff com1:
appendix d calibration 67 d calibration appendix
68 PCL-818L user's manual regular calibration checks are important to maintain accuracy in data acquisition and control applications. we provide a calibration pro- gram, calb.exe, on the PCL-818L software disk to assist you in this task. the minimum equipment required to perform a satisfactory calibration is a 4?-digit digital multimeter and a voltage calibrator or a stable, noise free d. c. voltage source. you may also want a card extender, such as the advantech pcl-757 isa-bus switch/extension card. the pcl-757 transparently extends the pc-bus connector to the top of the chassis, giving safe and easy access to the PCL-818L during calibra- tion or other tasks. the calb.exe makes calibration easy. it leads you through the calibration and setup procedure with a variety of prompts and graphic displays, showing you all of the correct settings and adjustments. the explanatory material in this section is brief, intended for use in conjunction with the calibration program. vr assignment the five variable resistors (vrs) on the PCL-818L board help you make accurate adjustments on all a/d and d/a channels. see the figure in appendix b for help finding the vrs. the following list shows the function of each vr: vr function vr1 a/d full scale adjustment vr2 a/d bipolar offset vr3 d/a full scale adjustment vr4 d/a offset adjustment vr5 programmable gain amplifier offset
appendix d calibration 69 if you precisely calibrate a d/a output range, you can use the it with the calb.exe program to calibrate the card's a/d input. to calibrate the 10 v a/d range, first calibrate the 0 to 10 v d/a output. to calibrate the 5 v a/d range, first calibrate the 0 to 5 v d/a output. d/a calibration connect a reference voltage within the range 10 v to the reference input of the d/a channel to be calibrated. you can use the on-board -5 v (-10 v) reference or an external reference. adjust the full scale gain and zero offset of the d/a channel with vr3 and vr4. use a precision voltmeter to calibrate the d/a output. 1. set the d/a data register to 0 and adjust vr4 until the output voltage equals 0 v. 2. set the d/a data to 4095 and adjust vr3 until the d/a output voltage equals the reference voltage minus 1 lsb, but with the opposite sign. for example, if v ref is -5 v, then v out should be +4.9988 v. if v ref is -10 v, v out should be +9.9975 v. a/d calibration regular and accurate calibration procedures ensure maximum possible accuracy. the calb.exe calibration program leads you through the whole a/d offset and gain adjustment procedure. the basic steps are outlined below: 1. short the a/d input channel 0 to ground and measure the voltage at tp1 on the pcb (see the figure in appendix b). adjust vr5 until tp1 is as close as possible to 0 v. 2. connect a dc voltage source with value equal to 0.5 lsb (such as the d/a output) to a/d channel 0 (pin 1 on connector cn3). 3. adjust vr2 until the output from the card's a/d converter flickers between 0 and 1. 4. connect a dc voltage source with a value of 4094.5 lsb (such as the d/a output) to a/d channel 0. 5. adjust vr1 until the a/d reading flickers between 4094 and 4095. 6. repeat steps 2 to step 5, adjusting vr1 and vr2.
70 PCL-818L user's manual
user's note for pcld-818l revision a2 card the purpose of this 'user's note' is to inform you of the new jumper settings on the PCL-818L revised a2 card. if your PCL-818L card is revision a1, this note will not apply to you. the revision change is to simplify the multiplexing capability of the PCL-818L. with the new jumpers onboard, jp8, jp9, jp10 and jp11, you can select which cable controls the daughter boards connected. this is done via either the d-type 37-pin connector or the original 20-pin connector. these cables, cn1 and cn3, use digital control signal outputs d0 to d3. please contact your distributor to find out exactly which daughter boards can support this special feature. to connect daughter boards without this function, set the jumpers to the 'd' side (left hand side). with this configuration the digital signals d0 to d3 will be on the 20-pin connector cn1. this is the standard setup for the PCL-818L revision a1. the default jumper setting on the PCL-818L revision a2 is with the jumpers set to the 's' (right hand side). in this configuration, the digital output signals d0 to d3 will be on the 37-pin connector cn3. the signal pins on cn1 will now be floating. d0 d1 d2 d3 s0 s1 s2 s3 jp8 to jp11 digital output to cn3 (37-pin) jp8 to jp11 digital output to cn1 (20-pin) d0 d1 d2 d3 s0 s1 s2 s3 default connector cn3 pin assignments connector cn1 pin assignments jumper configuration 1 3 5 7 9 11 13 15 17 19 2 4 6 8 10 12 14 16 18 20 d/o 0 d/o 2 d/o 4 d/o 6 d/o 8 d/o 10 d/o 12 d/o 14 d.gnd +5 v d/o 1 d/o 3 d/o 5 d/o 7 d/o 9 d/o 11 d/o 13 d/o 15 d.gnd +12 v 2 1 4 5 6 7 8 9 10 11 12 13 15 16 14 17 18 19 20 21 3 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 a/dh 0 a/dh 1 a/dh 2 a/dh 3 a/dh 4 a/dh 5 a/dh 6 a/dh 7 a.gnd a.gnd vref s0 +12 v s2 d.gnd nc counter 0 clk counter 0 out +5 v a/dl 0 a/dl 1 a/dl 2 a/dl 3 a/dl 4 a/dl 5 a/dl 6 a/dl 7 a.gnd a.gnd da 0 out da 0v refin s1 s3 dgnd trig0 counter 0 gate pacer
2 PCL-818L user's manual


▲Up To Search▲   

 
Price & Availability of PCL-818L

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X