Real Time Devices DM400 User manual

Artisan Technology Group is your source for quality
new and certied-used/pre-owned equipment
• FAST SHIPPING AND
DELIVERY
• TENS OF THOUSANDS OF
IN-STOCK ITEMS
• EQUIPMENT DEMOS
• HUNDREDS OF
MANUFACTURERS
SUPPORTED
• LEASING/MONTHLY
RENTALS
• ITAR CERTIFIED
SECURE ASSET SOLUTIONS
SERVICE CENTER REPAIRS
Experienced engineers and technicians on staff
at our full-service, in-house repair center
WE BUY USED EQUIPMENT
Sell your excess, underutilized, and idle used equipment
We also offer credit for buy-backs and trade-ins
www.artisantg.com/WeBuyEquipment
REMOTE INSPECTION
Remotely inspect equipment before purchasing with
our interactive website at www.instraview.com
LOOKING FOR MORE INFORMATION?
Visit us on the web at www.artisantg.com for more
information on price quotations, drivers, technical
specications, manuals, and documentation
Contact us: (888) 88-SOURCE | sales@artisantg.com | www.artisantg.com
SM
View
Instra

DM40OlDMs400
UsertsManual
ffi RealrimeDevices,
Inc.
"Accessing
theAnalogW
orld',
I
IS
SO
O9
90
00
01
1
a
an
nd
d
A
AS
S9
91
10
00
0
C
Ce
er
rt
ti
if
fi
ie
ed
d

DM400/DM5400
Userts
Manual
ffi
REAL
TIMEDEVICES,
INC.
PostOffice
Box906
StateCollege,
Pennsylvania
16804
Phone:
(814\234-8087
FAX:
(81a)
234-5218

Published
by
Real
TimeDevices.Inc.
P.O.
Box906
StateCollege,PA 16804
Copyright@1994byReal
Time
Devices,Inc.
All rightsreserved
hintedin
U.S.A.
IIt 18t96

INTRODUCTION
Digital+o-Analog
Conversion
(-2
Module)....... ..................i-3
WhatComes
Application
Software
CHAPTER 1 - MODULE SETTINGS ...................1.1
Factory-Configured
Switch
andJumperSettings ...............1-3
P3
- 8254Timer/Counter
Sources
(Factory
Settings:See
Tablel-1& Figure
l-2) ......................................l-4
P4
- Intemrpt
Channel
Select
(Factory
Setting:JumperG;Intemrpt
Channel
Disabled) .........1-5
P5
- DMA Request/DMA
AcknowledgeChannel
(Factory
Setting:
Disabled) ........................
l-6
P6
- Analog
InputVoltageRangeandPolarity
(Factory
Setting:t5 volts) .........1-7
P8
- DAC I Output
VoltageRange
(Factory
Setting:+5to
-5
volts)........... ........1-7
P9
- DAC2OutputVoltageRange
(Factory
Setting:+5to
-5
volts)........... ........1-7
Sl - BaseAddress
(Factory
Setting:
300hex
(768
decimal))
................. ..............1-8
Pull-up/Pull-down
ResistorsonDigital
VOLines ..............1-9
Gx,Resistor
CHAPTER2 -INSTALLATION ........2.I
Connecting
the
AnalogInput
Pins ............24
Connecting
the
TriggerInand
TriggerOutPins,CascadingModules ....................2-4
Connecting
the
AnalogOutputs
(2 Module) .................2-6
Connecting
the
Timer/Counters
and
Digital
VO............... ..................2-6
Runningthe540ODIAG
Diagnostics
Program ...................2-6
CHAPTER 3 _ HARDWARE DESCRIPTION
Digital
VO,Progmmmable
Peripheral
Interface...... ......'....3-5
i-l
3-1
Thbleof Contents

CHAPTER 4 - MODTILE OPERATION AND PROGRAMMING ..........4.I
BA +0: ReadStatus/StartConvert
(Read/Write) .........4-4
BA + l: Read
A/DData/Update
DACOutputs
(ReadAVrite)
................... .............4-4
BA+2:
BA +3: Scan/Burst
@ead/lVrite) ............4-5
BA +4: PPI
PortA - DigitalVO
(ReadAVrite)
.............. .................4-5
BA+
5: PPI
Port
B- Channel/Board
Functions
Select
(ReadAVrite)
.............. .........................4-5
BA+6: PPI
Port
C
- Digital
VO
(Read/Write)
................ ...............4-6
BA+7: 8255
PPI
Control
Word
(Write
Only)........... .......................4-6
BA+8: 8254
Timer/Counter
0(Read/lVrite)
................. ...................4-8
BA+9: 82!4Timer/Counter
I (Read/Write)
................. ...................4-8
BA+ l0: 8254
Timer/Counter2@ead/Write)
................. .................4-8
BA+ l1: 8254Control
Word
(Write
Only)........... .......4-8
BA+ 12:D/AConverter
I LSB
(Write
Only)
........... ........................4-9
BA+ 13:
D/A
ConverterI MSB
(Write
Only)........... .......................4-9
BA + 14:Clear
IRQ
Status/D/A
Converter
2LSB
(Read/Write)
............. ..............4-9
BA + 15:Clear
DMADone
Flag/D/AConverter2MSB
(Read/lVrite) .................4-9
Clearingand
SettingBits
in
aPort........... ....................4-10
Initializing
Enabling
and
Disabling
theExternal
Trigger ........'.4-13
Enablingand
DisablingIntemrpts ......4-13
Startingan
A./DConversion ................4-15
MonitoringConversion
Status
(DMADoneor
End-of-Convert)............... .......4-15
Reading
the
Converted
Data ...............4-16
Programmingthe
PacerClock
.......... .......................4-1'l
What
8259
Programmable
Intemtpt
Controller '....'....'......4-18
IntemrptMask
Register
(IMR) .......'...4-18
End-of-Intemrpt
(EOI)
Command ......4-18
WhatExactly
Happens
Whenan
IntemrptOccurs? .'.....'.............4-18
Using
Interrupts
inYour
Programs
........... .-.----........4'19
Writingan
IntemrptService
Routine
(ISR)............ ...'.'................4-19
Saving
the
StartupIntemrpt
Mask
Register
(IMR)andIntemrpt
Vector .....-....4-20
Restoring
the
Startup
IMR andIntemrpt
Vector .....4'21
Common
Interrupt
Mistakes ...............4-21
Data
Transfers
Using
Choosinga
DMAChannel ...'..............4-21
Allocating
aDMABuffer ...-.-.-.---...-...4-21
Calculating
thePageand
Offset
ofa
Buffer .......'....4-22
Setting
the
DMA Page
Register .-...-....4-23
DMAMask
DMA Mode
Programming
the
DMA Controller ..-..4-25
Programming
the
400/5400
forDMA..... ................'4-25

Monitoringfor
DMADone............ .....4-25
CommonDMAProblems............... ....4-26
ExampleProgramsandFlowDiagrams ......4-29
Single
ConvertFlowDiagram
(Figure
4-8).............. ....................4-31
DMAFlowDiagram
@gure
4-9).............. .............4-32
Interrupts
Flow
Diagram
(Figure
4-10)
........... ........4-33
D/AConversionFlowDiagram
(Figure
4-11)............ ..................4-34
CHAPTER5 - CALIBRATION
BipolarRangeAdjustments:
-5
to
+5Volts............ ........................5-5
BipolarRange
Adjustments:
-10
to
+10Volts............ ....................5-6
APPENDX A-4OOI54OOSPECIFICATIONS ......A.1
APPENDX B -P2 CONNECTOR
PIN ASSIGNMENTS B-1
c-l
D-1
APPENDX C- COMPONENTDATA SIMETS
APPENDX D _ WARRANTY ..........
tIt

iv

l-1
1-2
l-3
t-4
1-5
l-6
1-7
l-8
l-9
1-10
1-11
t-12
1-13
t-14
2-l
aa
2-3
3-l
4-l
4-2
4-3
4-4
4-5
4-6
4-7
4-8
4-9
4-10
4-ll
5-1
ModuleLayout
ShowingFactory-ConfiguredSettings................... ...............1-3
8Z54Timer/Counter
Sources
Jumpers,P3................ .................1-4
8254TimerlCounter
Circuit
BlockDiagram ........1-5
IntemrptChannel
SelectJumper,
P4.............. ......l-6
PullingDown
theIntemrpt
Request
Line............. .....................1-6
DMARequest/DMA
AcknowledgeChannelJumper,
P5................ ..............1-6
AnalogInput
Range
and
PolarityJumper,
P6................ ............1-7
DAC1
Output
Voltage
RangeJumper,
P8
............. ...................1-7
DAC2Output
Voltage
Range
Jumper,
P9
............. ...................1-7
BaseAddress
Switch,Sl ................ ,.....................1-8
Pull-up/Pull-down
ResistorCircuitry ...................1-9
Adding
Pull-upsand
Pull-downstoDigital
VOLines .............1-10
Gain
Circuitry
and
FormulasforCalculating
Gxand
f ................... ......'..'...1-l
I
Diagram
forRemoval
ofSolder
Short............ ....1-12
PZVOConnector
PinAssignments
............. ...'.....2'4
Single-Ended
InputConnections
............ .".'.'.......2-5
Cascading
Two
BoardsforSimultaneous
Sampling .................2-5
4C{lll54C[
Block
Diagram ...'.'.......'...3-3
8254
Programmable
Interval
Timer
Circuit
Block
Diagram -.-.-3-4
A/D
Conversion
TimingDiagram,
AllModes.... .'...........".'....4-13
Timing
Diagram,
SingleConversion
............ .-....4-14
Timing
Diagram,
Multiple
Conversions .............4-14
Timing
Diagram,
Channel
Scanning...... .....'.......4-15
Timing
Diagram,
Burst........... .-.-.-.4-15
Pacer
Clock
Block
Diagram ...----.-..4'17
8254
Programmable
Interval
TimerCircuit
BlockDiagram .'.4-27
Single
Conversion
FlowDiagram ...'..'........""""4-31
DMAFlow
Diagram ..............""""4-32
Interrupts
Flow
Diagram .....'..""""4-33
D/AConversion
Flow
Diagram .....4-34
List ofIllustrations

vt

INTRODUCTION
i-l

i-2

The
DM400andDM5400
analog
VOdataModules@
turn
your
IBM PC-compatiblecpuModuleruorother
PCII0/'computer
intoahigh-speed,high-perfonnancedataacquisitionand
control
system.Ultra-compactfor
embeddedand
portable
applications,
each
400/5400series
module
features:
. l6 single-ended
analog
input
channels,
. 12-bit,
5microsecondanalog-to-digital
converterwith 100
kHzthroughput,
. t5, tl0, or0to
+10
volt
inputrange,
. Resistorconfigurable
gain,
. Programmable
automatic
channelscanning,
. Programmableburst
mode,
. On-demandDMA transfer,
. Triggerin andtrigger
outforexternaltriggeringorcascadingboards,
. 16TTUCMOS8255-based
digital
VOlines
which
can
beconfigured
withpull-up
orpull-down
resistors,
. Three
l6-bit timer/counters
(two
cascadedforpacer
clock),
. Two l2-bit digital-to-analogoutput
channels
withdedicated
grounds
(-2
modules),
. 15,0to+5,or0to+10
voltanalog
outputrange,
. +5voltsonlyoperation
(DM5400
only),
. Example
programs
inBASIC,Turbo
Pascal,andTurboCanddiagnostics
software.
Note
thatthe
differencebetweenthe
DM400
and
DM5400isthe
power
supplyrequirements:
theDM400
requires
+12and
+5volts
and
theDM5400
requires+5volts
only.
Thefollowing
paragraphs
briefly
describethe
major
functionsofthemodule.
A more
detailed
discussionofmodulefunctions
isincluded
inChapter
3,Hardware
Operation,and
Chapter4,Operationand
Programming.Themodule
setup
isdescribed
inChapter
l, Module
Settings.
Analog-to-DigitalConversion
The analog-to-digital(A/D) circuitry receivesupto l6 single-ended
analog
inputsandconverts
theseinputs
into l2-bit digital datawords which canthenbereadand/ortransferred
toPCmemory.Themodule is factory setfor
single-endedinput channels.
The analog
input voltagerangeisjumper-selectable
for bipolarrangesof -5 to +5 volts or -10 to +10 volts,or a
unipolarrangeof 0 to +10 volts.Thernoduleis factorysetfor -5 to +5 volts. Overvoltage
protectionto t35 volts is
provided attheinputs.The high-perfonnance
A/D convertersupports
resistor
configurablegaincircuitry sothatyou
cancustomizetheinput gainto anyvaluegreater
than l.
A./Dconversions
areperformedin 5 microseconds,andthemaximum throughput
rateis 100kHz. Conversions
arecontrolled throughsoftware,
by anon-board
pacer
clock, or by anexternal
triggerbroughtontothemodule
throughtheVO connector.
Theconverted
datacanbetransferred
to PCmemoryin oneof two ways: throughthePCdata
busor by using
direct memory access
(DMA). The mode of transfer is software-selectableandthe DMA channel is chosenby
jumper settings
on themodule.ThePC databusis usedto read
and/ortransfer
data,onebyteat atime, to PC
memory.In theDMA transfer
mode,you canmakecontinuous
transfersdirectly to PCmemory without going
throughtheprocessor.
Digitat-to-Analog
Conversion
('2 Module)
Thedigital,to-analog @/A) circuitry features
two independent
l2-bit analog
outputchannels
with individually
jumper-selectable
outputnrnges
of -5 to +5 volts,0 to +5 volts,or 0 to +10 volts.Datais programmed
into aD/A
converrer
by writing two 8-bit words,theLSB andtheMSB. TheLSB contains
the8lower bits (D0 throughD7)
andtheMSB contains
the4 upperbis (D8 throughDl l). D/A conversions
areautomaticallyniggeredfor both
channels
through asinglewrite operation.
Access
throughDMA is not available'
8254
Timer/Counter
An 8254
programmable
intervaltimer
contains
threel6-bit,8-MHz
timer/counters
tosuppolt
awiderange
of
timing andcounting
functions.
Two of thetimer/counters
arecascaded
and
canbeused
internally
for thepacer
clock.
The
thirdisavailable
forcounting
applications,
orit can
becascaded
totheother
twotimer/counters.
i-3

Digital VO
The400/5400has16TTUCMOS-compatible digital VO lineswhich canbedirectly interfaced
with external
devicesor signals
to sense
switch closures,
triggerdigital events,
or activate
solid-state
relays.Theselines are
provided by theon-board8255programmable
peripheral
interface
chip.Pads
for installing andactivatingpull-up or
pull-down resistorsareincludedon themodule.Installationprocedures
aregiven attheendof Chapterl, Module
Settings.
What Comes
With Your Module
Youreceivethefollowing
itemsinyour
module
package:
. DM400-1,DM400-2,
DM540Gl orDM5400-2
interfacemodule
withstackthrough
busheader
. Mounting
hardware
. Example
programs
inBASIC,Turbo
Pascal,andTurbo
Cwithsource
code& diagnostics
software
. IJser's
manual
If anyitemismissingordamaged,
please
call
RealTimeDevices'
Customer
Service
Department
at
(814)
234-8087.
If you
require
serviceoutside
theU.S.,
contact
your
local
distributor.
ModuleAccessories
In addition to theitemsincludedin your modulepackage,RealTime Devicesoffersafull line of software
and
hardware
accessories.
Call your localdistributor or our mainoffice for moreinformation aboutthese
accessories
and
for helpin choosingthebest
itemsto support
your module'sapplication.
Application Software and Drivers
Our custom application software packages
provide excellent data acquisition andanalysis support. Use
SIGNAL*VIEWTM for real-timemonitoring anddata
acquisition,
andSIGNAL*MATHTM for integrated
data
acquisitionandsophisticated
digital signalprocessing
andanalysis.
rtdl-inxru andrtdlinxA'{B driversprovide full-
featured
high level inrerfaces
between
the400/5400andcustom
or third party software,
including LabtechNote-
book,NotebookD(E, andLTlControl. rtdlinx source
code
is available
for aone-timenominal fee.
Hardware Accessories
Hardwareaccessories
for the400/5400includethelvDG2 analog
input expansion
boardwhich canexpand
a
singleinput channel
on your moduleto 16differential or 32 single-ended
inputchannels,
theOPseries
optoisolated
digital input boards,
theMR seriesmechanical
relayoutputboards,
theORl6 optoisolated
digital input/mechanical
,"iuy outputboard,theT516 thermocouple
sensor
board,
theTB50 terminalboard
andXB50 prototype/terminal
boardfoieasy signalaccess
andprototypedevelopment,
theDM14 extender
boardfor testingyour modulein a
conventionaldesktop
computer,and
XT50 twistedpair wire flat ribbon cableassembly
for external
interfacing'
OptionalConfi
gurations
Other
configurations
of the
400/5400
are
available,
suchas
verticalconnectors
onsomeorallVOconnectors
or
anon-stackthrough
bus
connector.
Ifyou need
anoptional
configuration
foryour
requirements,
pleaseconsult
the
factory.
Using
ThisManual
This manualis intended
to helpyou install your newmoduleandgetit runningquickly, while alsoproviding
enough
detail aboutthemoduleandits functionssothatyou canenjoymaximum use
of its features
evenin themost
"o-fl"* applications.
We assume
thatyou already
haveanunderstanding
of dataacquisitionprinciples andthat you
caniustomize theexamplesoftwareor write your own application
programs.
i-4

WhenYouNeed
Help
' Thismanualand
the
example
programsinthe
software
package
included
withyour
module
provide
enough
informationtoproperlyuse
allof themodule's
features.
If youhaveany
problems
installingorusingthis
dataModule,contact
our
Technical
Support
Department,
(814)
234-8087,
duringregular
business
hours,eastern
standardtime
oreastern
daylight
time,orsendaFAX requesting
assistance
to(814)234-5218.
When
sending
a
FAX request,
pleaseinclude
your
company's
nameandaddress,
your
name,
your
telephone
number,andabrief
descriptionof theproblem.
r-f


CHAPTER1
MODULESETTINGS
TheDM400 and
DM5400 have
jumper andswitchsettings
you
canchange
if necessary
for your application.
Themoduleis fac-
tory-configuredas
listedin Table l-1 andshown
onthelayout
diagram
in thebeginningof thischapter.
Should
you need
to
change
thesesettings,
usethese
easy-to-followinstructions
before
you stack
themodulewith your computer
system.
By installingresistor
packsandsoldering
jumpersin thede-
sired
locations
in theassociated
pads
asdescribed
neartheendof
thechapter,
you canconfigurethe 16user
available
digital VO
linesto bepulledup or pulleddown.
The final section
describes
how to installtwo resistors
anda
trimpot to set
theresistorconfigurable
gainto thevaluerequired
for your application.
A padfor installingacapacitor
is also
in-
cludedin thegaincircuitry for creating
alow-pass
filter.
l-l

t-2

Factory-Configured
Switch
andJumperSettings
Table
l-1 liststhefactory
settingsoftheuser-configurable
jumpers
andswitch
ontheDM400andDM5400
modules.
Figure
l-l showsthe
modulelayoutand
thelocationsof thefactory-set
jumpers.
Thefollowing
paragraphs
explain
howto change
thefactorysettings.
Pay
specialattention
tothesetting
of S1,
thebase
address
switch,to
avoidaddresscontention
when
you
firstuse
your
moduleinyour
system.
Table
1-l - Factory
Settings
Swltch/
Jumper Function
Controlled Factory
Settings
(Jumpers
lnstalled)
P3 Setsthe
clocksources
forthe
8254timer/counters;
selects
A/D
triggersource;
selectsGATE
2source
Jumpers
installed
onCLK0-OSC,
CLK2.OT1,
PCLK.PCK,
TRIG-OT2.GT2.EG2
P4
Connects
oneoffour
softwareselectable
interrupt
sources
toan
interruptchannel;
pulls
tri-state
butfer
toground
(G)
formultiple
interruptapplications
Jumper
installed
on
G(ground
for
butfer);
interrupt
channels
disabled
P5 Sets
the
DMArequest
(DRQ)
and
DMA
acknowledge
(DACK)
channel Disabled
(DMA
channel
not
selected)
P6 Setsthe
analoginput
voltage
range
and
polarity -5to +5 volts
P8 SetstheD/Aouput
voltagerangeforDAC
1t5 G5
to+5volts)
P9 SetstheD/Aoutput
voltagerange
for
DAC
215G5
to+5volts)
S1 Sets
the
baseaddress 300
hex
(768
decimal)
Fig.1-1
- Module
Layout
Showing
Factory'Configured
Settings
fo@
go
oEO otf tr
oooooooo
oooooo
oooooooo
oo oo
OEr OO
33 PAL
33
oooooooo
oooooo
oooo
oooooo
oo oo
oo823loo
oooooo
oooo oooooo
oooooooo
oo oo
OEr OO
OO s2ss OO
oo oo
oooooooo
oooooo
1-3

P3- 8254Timer/Counter Sources(Factory Settings: See
Table 1-l & Figure 1-2)
This headerconnector,shownin Figure l-2, letsyou select
theclock sources
for the 8254timerlcounters,TCO
andTC2. TCOandTCI arecascaded
to form thepacer
clock.This header
is alsoused
to configurethepacer
clock
input, trigger input, andGATE 2 sources.
Figure l-3 shows
ablock diagramof thetimer/countercircuitry to help
you in making theseconnections.
Theclock source
for TCOandTCI is selectedby placinga
jumper onOSCor XCK in theCLKO sectionof the
header.
OSCis theon-board8-MHz clock andXCK is anexternal
clock source
you canconnect
throughthe
external
VO connector
(P2-45).
To theleft of theCLK0 pinsarethree
pairsof pins grouped
asCLK2 in thediagrams.These
pins areusedto
select
theclock source
for TC2. OTl connects
theoutputof TCI (thepacer
clock output)to theclock input of TC2.
Installing a
jumper herecascades
all three
timer/counters,afeature
necessary
whenusingSIGNAL*MATH or
SIGNAL*VIEW softwarefor dataacquisitionandcontrol.OSCis theon-board
8MHz clock, andXCK is con-
nected
to thesame
extemalclock source
asCLK0-XCK (P245).
The next groupof pinson thisheader,calledPCLK, letsyou usetheon-board
(internal)pacer
clock or an
external
pacerclock connected
throughtheTRIGGER IN pin on theVO connector
(P2-39)tocontrol A./Dconver-
sions.A jumper mustbeplacedonPCK in orderto usetheinternalpacerclock (outputfrom TCI). Or, you can
placethe
jumper across
TRIG andconnect
anyexternal
pacer
clock source
to P2-39to triggertheA/D converter.
TheTRIG pins selectthehardware
source
used
to triggertheburstmodewhentheexternaltriggerenable
bit at
BA + 5 is enabled.Burstscanbetriggered
from one
of threehardwaresources:
TRIG, anexternaltrigger signal
routedonto the boardthroughP2-39; OT2, theoutputfrom timer/counter
2; orEG2, anexternal
gate
(EXT
GATE 2) signalroutedonto theboardthroughP246. Whenthetriggerenable
bit atBA + 5 is disabled,
burstsare
triggered
throughsoftware.
The last groupof pins,GT2, select
thegate
source
for timer/counter
2's gate
input.Thisjumper is provided so
thatyou candisconnect
theGATE input for thethird timer/counter
from theEXT GATE 2 pin attheVO connector
andtie the gate
high if you areusingtheEXT GATE 2pin asatriggersource.
PCLK CLl(2 CLKo (Ihese
labelsnotonboard)
58958
xo..xo
Fig.
1-2
-8254 Timer/Counter
Sources
Jumpers,
P3
P3
?H$s**i
l-4
:I:I::I::I:I
This manual suits for next models
1
Table of contents
Other Real Time Devices I/O System manuals