Professional Documents
Culture Documents
ffi RealTimeDevices,
Inc.
" Accessing
theAnalog World',"
User'sManual
ffi
REALTIMEDEVICES,INC.
Drive
820 NorthUniversity
PostOfficeBox906
StateCollege,Pennsylvania16804
Phone: (814')234-8087
FAX:(814)234-5218
Publishedby
RealTime Devices,Inc.
820 N. University Dr.
P.O.Box 906
StateCollege,PA 16804
Printedin U.S.A.
Rev.B 9241
TABLE OF CONTENTS
Page
INTRODUCTION
How to Use This Manual....... .................i-2
When You Need Help. .........i-2
tl
LTSTOF ILLUSTRATIONS
Figure Page
i-1 Typical LaboratorySetup.......... ......i-l
1-1 AD2000 Board Layout........ ...........1-2
L-2 BaseI/O AddresHeaderConnectff,I2 .................14
1-3 AID Conversion WordFormat........ ....................1-10
2-l AD2000FunctionalBlock Diagram ....2-l
2-2 EOC Timing Diagram. ..................2-z
3-1 AD2000 Board Layout........ ...........3-l
3-2 D I P S w i t c h5 1 . . . . . . . . . . . . . . .................32
3-3 PIT VO HeaderConnector I{l ............3-3
34 PlTFunctionalBlockDiagram ..........34
3-5 IntemrptHeaderConnecorP4 ...........3-5
34 IntemrptHeaderConnecorP5 .. ....... . . 3-5
3-7 InterruptHeaderConnectorPT ...........3-6
3-8 EOCMonior Header Connector P6.............. ........36
3-9 AID ConverterVoltageRangeHeaderConnectorP9 .................. 3-6
4-r PPIModeDefinitionFormat........ .....4-2
5-1 AD2000 Board Layout........ ...........5-1
,lt
iv
LIST OF TABLES
Table Page
1-1 AD2000BoardFunctions andSettings ..................1-3
t-2 AD2000VO Map...... .... 1-5
5-1 A/D ConverterBit Weights ...............5-3
5-2 A/D ConverterReadingsfor GainCalibrarion.. ....... 5-3
INTRODUCTION
This manualshowsyou how to operateandprovidestechnicaldatafor RealTime Devices'AD2000 multifunctiondata
acquisitionboard.The AD2000features12-bithigh-speed multichanneldifferentialor single-ended analog-o-digital
conversion.This versatileinterfaceallows your IBM PCIKT/AT or compatible computer to effectively operatein the
real-timeenvironment of data acquisitionand controlto and
sense generate
analog and digital Figure
signals. i-l shows
a typical laboraory setup using a PC for datacollection.
0N
rU0SKSrnrl
[RSORnT0RT
llflf,OtltflRt tBMPCor sIrTUf nE
CompEtible
S l g n a lc o n d l t l o n l n gD s c g u i s l t l o nd, o t a r e d u c t l o n ,
grdphlcs,onalgsls,conlrol, data storsge
RUTOHRTION
L R BOERTORT
i-1
How to UseThis Manual
Thismanualis designedto helpyouinstallandgetyourAD2000runningquickly,while alsoincludingsufficientdetail
abouteachboardfunction. Begin by readingChapterI in ordero useyour boardasquickly aspossible.This chapter
andtheaccompanyingdemonstration softwareincludedwithyourAD2000packagewillallow youto promptlyuseyour
interface.To fully understandandcontrol the AD2000 functions, read 2
Chapters through 4. Chapter5 containsboard
calibrationprocedures.
The chaptersand appendixesin this manualaredescribedin denil below.
Chapter1, "Quick Start--Geuing Your AD2000 Running," providesthe instructionsnecessaryto
insall theboardanduseits basicfunctions.Theinformationcontainedin this chapterdoesnot cover
how !o changethe boardseurp,exceptfor thebaseICI address.
Chapter2, "Functional Description,"providesa block diagnm and a functional discussionof the
board.
Chapter3, 'Tumper Settings,"describeseachheaderor jumper circuit on the board and how it is
controlled.
Chapter4, "ProgrammingYour AD2000,' describeshow the board canbe programmedusing the
demonstrationsoftware.
Chapter5, "Calibration Procedures,"providesinstructionsfor boardcalibration.
Appendix A, "AD2000 Specifications,"containsa completelisting of boardspecifications.
Appendix B, "ConnectorPin Assignments,"conlainsthe pinous of the externalVO connecorsand
the matingconnectors'part numbers.
Appendix C, 'Component Data She€ts,"contains manufac[rers' data sheetsfor major board
components.
Appendix D, "Configuring the AD2000 for SIGNAL*MATH," containsinformation aboutseuing
boardjumpers and and initializing the board to run the SIGNAL*MATH acquisitionand analysis
program.
Appendix E, "Configuring the AD2000 for ATLANTIS," coniainsinformationaboutsettingboard
jumpersto run the ATLANTIS dataacquisitionandreal-timemonitoringprogram.
Appendix F, "Warranty," containsboardwarrantyinformation.
i-2
CHAPTER 1
RUNNING
QUICK START_GETTING YOUR AD2OOO
To get startedusingyour AD2000 interfaceboard,you must:
- Selectby jumpera baseI/O addresswhich doesnot contendwith any ottrerperipheraldevice.
- Installtheboardino yourPC.
- Connecta signalto oneofthe analoginputchannels.
- Run the AD2000 software.
Unlessyou haveotherrequirements,thesestepsareall that are necessaryto useyour AD2000 board.
This chapterexplainshow to insrallyoru AD2000anduseits basicfunctions.You will learnhow to:
. Changethe baseVO addresssetring,
. Install the boardin your PC,
. Initialize the board,
. Selectthe analoginput channeland gain,
. Take an A/D reading.
This chapterallows you to immediately start using the basic functions of your AD2000 board for daa collection
applications.This chapterdoesnot explainhow !o controlthemoreintricateboardfunctionssuchastheprogrammable
intervaltimer,thevariousdigitalVOconfigurations,orintemrpts, nordoesitexplainhowto changehardware-controlled
I/O
seuingsexceptfor the base address. The functionsnot covered herearedescribedin Chapters2 through4.
Additional items, suchas the AD2000 2-cableset (order numberXK40-l), extenderboardsor SIGNAL*MATH or
ATLANTIS applicationsoftware,areavailablefor this boardandare includedon an as-orderedbasis.
All signalson your board are madeeasily accessiblewith Real Time Devices' XB40 VO extenderboard and XC40
expansioncable.The extenderboardhastwo 20-pinterminalstripsanda prototypeareato supportany specialcircuitry
you mayrequireto conditionthesignals.For example,if you areprototypingsolid-staterelaysor optoisolalors,this can
easily be done with an XM0. The expansioncable terminatesin a 40-pin wire-wrap headerconnectorsuitablefor
installationin standard0.1 inch spacingperf-boardmaterialavailablefrom mostelectronicdisributors.
The Hardware
The AD2000 interfaceboard is shownin Figure l-1. A completelisting of the board specificationsis containedin
Appendix A. The AD2000 hasseveralfeatureswhich are user-controlledthroughhardwareor software.Most of the
hardware-controllablefeaturesarejumper-contnolled;theremainingare switch+onnolled.
Allofttreboardcomponentsaremountedona5.5-inchprintedcircuitboardwhichfitsinany unusedexpansion
slot(short
or full-size) in an IBM PC/XT/AT or compatiblecomputer.Two 4Gpin connectorson the board, P8 and Pl5,
accommodateall of theboard'sextemalI/O. In operation,theseconnectorsarecabledsothat all S0linesareaccessible
at the rearpanelof ttrecomputer(seethe boardinstallationinstructionslater in this chapter).
l-l
*-Sy-1lU;tH.t5= U L
lH l-.2-r * ;--7=,. l+ I
* -l
--
ru tui=sr
A -F-"
EIJ=Ff,--d
-r E?
tP2
:nl
ilc- 12-BitA/D Board
L-2
Table 1-1-AD2000 Board Functions and Settlngs
AnalogInputChannelType 8 differential
channels To select16 single-ended
channels,seeS1 discussion,
Chapter3
AnaloglnputChannel lable
Software-control See "Selectingan Analog
Selection InputChannel,"Chapter1,
anddemodisk
AnaloglnputGainSelection lable
Software-control See"Settingthe InputGain,"
Chapter1, anddemodisk
AnaloglnputVoltageRange whenordering To changethesesettings,
User-specified see
and Polarity 51 and P9 discussions,
Chapter3.
-Convert(EOC)Monitor Connectedto PA7
End-of See P6 discussion,
Chapter3.
Digitall/O
16 l/OLinesfromPPI lable
Software-control See"Programmingthe PPl,
Chapter4 anddemodisk
Programmable Inverval
Timer
(PlT)Circuitry
Modes lable
Soflware-control See"Programmingthe PlT,"
Chapter4 anddemodisk
l/O Conliguration Clocklnput:5MHz See P3 discussion,
Chapter3
GateInput:+5 V
ClockOutput:To PB
l-3
FigureI -2 showsthebaseI/O address headerconnector, P2,with thejumperinstalledat thefactory-setlocationof 300
hex.Thejumpermustbeinstalledvertically acrossone of theeightpairsofpinsonP2.ThehexadecimalbaseVOaddress
settingconespondingto each pair of pins,from is
left to right, as follows:
For example,if thebaseI/O address is changedto 280hex,thenfor the 12operations listedin Table1-2,BA equals280.
Thus,to sendthechannelselectionandgaindatato port B of thePPI,its addressof BA + 1 becomes281 hex.
If thefactorysettingof 300hexwill causecontentionin yoursystem,positionthejumpertothedesiredbaseVOaddress
setting.OnceyouhavesetthebaseI/O address, makea noteof its valueon thetableinsidethebackcoverof thismanual.
You will needto know this settingfor usein your programs.
N g)
o
o o
o
P2
Fig. 1-2 - Base l/O AddressConnector,P2
t-4
Table 1-2-AD2000 l/O Map
PPI
PortA 0 0 0 0 0 R/W 0
PortB (ChannelSel&Gain) 0 0 0 0 1 W 1
PortC 0 0 0 1 0 R/W 2
ControlWord 0 0 0 1 1 w 3
l/D Conversion
Circuitry
Start12-bitConversion 0 0 1 x 0 w 4or6
Start8-bitConversion 0 0 1 x 1 w 5 or7
ReadMSB 0 0 1 x 0 R 4or6
ReadLSB 0 0 1 x 1 R 5or7
lntervalTimer
Programmable
Counter0 1 0 1 0 0 R/W 14
Counter1 1 0 1 0 1 R/W 15
Counter2 1 0 1 1 0 R/W 16
ControlWord 1 0 1 1 1 W 17
NOTE:x = don'tcaresetting
l-5
c. Re-at6chtheclampto thebracketusingthehardwaresuppliedwith your AD2000,securing
the ribbon cablesin place.
4. l.J:tercheckingthat the cablesare correctly installedon the board,orient the board inside the
computerso that thecablesextendthroughtherearpanelopeningandthe cardedgeconnector
lines up with the expansionslot connector.Then,pressdown on the metalbrackettab and the
top of the boarduntil the boardis firmly seatedin the expansionslot connector.
5. Securethe bracketbackin placewith the screwandput the coverback on your computer.
The Software
The AD2000 operatesunder softwarecontrol. Programmingincludesthe analoginput channelselectionand gain,
control of the the A/D conversion,the programmableperipheralinterface,and the programmableinterval timer. The
analoginput channelandgain selectionsandtakingan A7Dreadingarecoveredin this chapter.Digital I/O control and
control of the programmableinterval timer are more complex,and are de.scribedin Chapter4, "ProgrammingYour
AD2000."
Regardlessof what programminglang"age you use, you can write programstlat conEol the AD2000 board. The
demonstrationdisk which accompaniesyour AD2000 containsexamplesin Turbo C, Turbo Pascal,and BASIC.
Nearly all modernMS-DOS-basedPC languageshaveI/O referenceinstructions.Theseare the insructions to control
thedataransfers to andfrom theI/O ports.Consultyour programminglanguagereferenceto find theseinstnrctionsfor
your favorite language.Listed below are the VO referenceinstructionsusedby somecommonlanguages.
DemoDisk
Included with your AD2000 is a demo disk which providesprogramminginstructionsand exampleprogramsfor
controlling the functionsof your interfaceboard.This demodisk is divided ino directories,eachof which is named
accordingto the languageusedto write 0re programsit contains.The files within eachdirectory coniain example
programsanda documentationfile witi generalinformation.In addition,your demodisk containsa README.DOC
file which providesprogramminginformation for your board.
Eachexampleprogxamshowsyou how to controla particularboardfunction,suchasselectingan input channelor input
gain, controlling the A/D converter,controlling digital data Eansfers,and seuing the timer/countercircuitry. These
programsshouldbe usedto becomefamiliar with thesefunctions.
l-6
Initializing Your AD2000
BeforeyoucanoperatetheAD2000,it mustbe initialized.This stepmustbe executedeverytime you startup,reset,or
rebootthecomput€r.This setsup thePPI to properlycommunicate with theA,/Dconvertercircuitry.If theboardis not
andwill probablylock up,requiringyouto rebootyoursystem.
initialized,it will notrespondto thesoftwarecommands
As describedearlier,theAD2000uses12addresslocationsin thecomputer'sI/O space,Theseaddresslocationsstart
with tle baseI/O address(BA) andgo throughBA + 17(hex).BA + 8 throughBA + 13arenotused.Tablel-2 provides
theAD2000I/Omap,definingwhatfunctioneachof the12addresses controls.RecallthatthebaseI/O addressis factory-
setat 300 hex.On thedemodisk, thebaseI/O addressis usuallystoredin thevariable"board."Rememberto usetlre
correctbaseVO addressin tle demodisk programsor yourown programs.Thedemodisk explainshow to changethe
baseI/O addressin the programs.
The AD2000 is inirialized by simply writing a control byte lo the PPI control registermappedat the VO locationbase
address+ 3 (hex).The conrol bytemustconformto this generalform:
This ensuresthatthe eightI/O linesmakingup port B of thePPI,which areusedto controlthe multiplexerand gain
circuitry,areconfiguredasoutputs.Thedon'tcare(x) positionscontrolthedirectionof theremaining16digitalI/O lines
availableon thePPI.Theselinescanbe confrguredasinputs,outputs,or in othermorecomplexconfigurations.
For example,whenthecontrolbytebit patternis:
100000000 (decimal128)
out base_address+3,
I 28
out base_ad&ess+2,data
data= inp(base_address+2)
Note thatport A, bit 7 (PA7) of the PPI is factory-setto monitorthe end-of-convert(EOC)signal.The PPI mustbe
programmedso thatport A is an inputif you aregoingto monitortheEOC signalthroughPA7. Theconnolbyte must
thenconformto thegeneralform of lxx! x00x,wheretheunderlinedI is thedatabit which setsup port A asaninput.
A functionaldescriptionof thePPIis containedin Chapter2,'Functional Description,"andhardwareconfigurations
are
describedin Chapter3, "JumperSettings."Informationabouthow you cancontrolthediginl I/O linesis containedin
Chapter4, "ProgrammingYour AD2000,"andis not coveredherebecauseof its complexity.
As mentionedearlier,theeightlinesof port B areusedto selecttheanaloginputchannelandgain.The four LSBs,PB
(forPortB) 0 throughPB3,controlthechannel selection,andthe
fourMSBs,PB4throughPBT,control thegainselection.
Thebit assignment of thisport is:
t-'7
MSBs LSBs
7654 3210 P P IP o r t B ( B a s e A d d r e s s + 1 )
\-rJ +.-'
gainselect channelselect
BA + I (hex) selectsport B
0001 1111 sesgainto2xandchannelo
16
l-8
1. Readthecurrentstateof port B:
curent_state= inpoase_address+1)
2. Preservetheupperfour bits sincetheycontaingaindata:
current_s[ate= current-slateAND $F0
3. LogicallyOR thecurrent_statewith thedesiredchannelnumberminus 1:
curenr-state curent_stateOR (channel- l)
=
4. Write it backout to port B:
l,current_state
out base_address+
100BASE-ADDRESSTo= 768
110CHANNELVo =2
=
120STATUSTo INP(BASE-ADDRESSTo+ l)
130STATUSTo= STATUSToAND &HFO
140STATUSTo= STATUSToOR (CHANNELTo-l)
150OUT BASE-ADDRESSTo + I,STATUSTo
0000 = gain of I
0001= gainof2
0010= gainof 4
0100= gainof 8
1000= gainof 16
1. Readthecurrentstateof port B:
current-state= inp(base_address+
1)
2. heserve the lower four bits sincetheycontainchannelinformation:
current-sCate= CUrrg[t-StateAND $0F
3. Ingically OR thecurent_statewith a bit pattemthatactivatesthedesiredgain:
current_state= currgnt_State oR gain bit pattern:
lx bit pattern= 0
2x bitpattern= 16
4x bit pauern= 32
8x bit Pattern= 64
l6xbitpattern= 128
4. Write the current_stateback to port B:
out base_addrcss+ l,current-state
r-9
A BASIC programto seta gainof 2 is:
100BASE-ADDRESSTo = 768
110GAINTo= 2
120STATUSTo= INP(BASE-ADDRESSTo+ l)
130STATUSTo= STATUSToAND &H0F
140IF GAINTo= I GOTO 160
150STATUSTo= STATUSToOR (GAINTo* 8)
+I,STATUS7o
160OUT BASE-ADDRESSTo
+ 4 (or 6):
1. Starta l2-bitconversionby writing o base-address
out base-address+4,0
(Note that the valueyou sendis not important.The act of writing to this I/O location is the key
to startinga conversion.)
2.Delay at least20 microseconds or monitorPPI port A or C, bit 7 for a transition.Polling
permits the fastestdataacquisition.
3. Readtheleastsignificantbit from base-address + 5 (or 7):
--
lsb%o inp(base-address%o +5)
4. Readthemostsignificantbit from base_address + 4 (or 6):
=
msbTo inp(base-address7o +4)
5. Combine them into ttre 12-bitresultby shiftingtheLSB four bits o theright. The MSB must
alsobe weightedconectly:
resultVo- (msb7o* 16) + (lsb7ol16)
For a l2-bit conversion,the A/D datareadis left justified in a l6-bit word,with theleastsignificantfour bis equalto
zero,asshownin Figurel-3. Because of ttris,thetwobytesof A7Ddatareadmustbescaledto obtaina validA/D reading.
Onceit is calculated,thereadingcanbecorrelatedlo a voltagevalueby scalingit, in thecaseof bipolarinputranges(t5
or +10 volts),andthenmultiplyingby theappropriate bit weight,asshownin thetableat thetopof thefollowingpage:
MSB LSB
D15 014 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 DO
D B 1 2DB11 D B l O D89 D88 D87 D86 D85 D84 D83 D82 DB1 0 0 0 0
l-10
Input Range ScaleFactor Bit Weight
+5 volts Subtract
2M8 2.4414mY
+10 volts Subnact2048 4.8828mV
0 to +10 volts None 2.4414mY
t-11
CHAPTER 2
FUNCTIONALDESCRIPTION
Thischapterdescribes Figure2-1showsablockdiagnm of ttteboard.
themajorfunctionsof theAD2000interfaceboard.
The functionsdiscussedin the following sectionsare:
. Analog-to-digitalconversioncircuiry
. Programmableperipheralinterface(PPI) circuiry
. Programmableinterval timer (PIT) circuitry
Analog-to-DigitalConversionCircuitry
The main function of the AD2000 interfaceboardis to provide high-speedanalog+odigital conversioncapability for
dataacquisition.The analog-to-digital(AlD) conversioncircuitry receivesinpus from eight differential or 16 single-
endedanalogchannels, selectsoneactivechannel,andperforms ananalog-to-digitalconversionof thevoltagevalueread
at that channel.The conversionthroughputrateis typically 38 kIIz.
Multiplexers
Two eight-bit analogmultiplexersareusedto connecteitheroneof 16 single-endedor one of eight differential analog
channelso the gain circuiry. The leftmostthreeswitcheson DIP swirchS1 setup themultiplexerat IC locationU9 !o
receiveeither single-endedor differential inputs.Whenthesethreeswitchesare up, the multiplexer is configuredfor
single-endedinputs,andwhentheyaredown, themultiplexeris configuredfor differential inputs.Note thatthesethree
swirchesare alwayssetas a gloup to the sameposition(see"Sl SwitchSettings,"Chapter3). A channelis selected
throughsoftwarecontrol, by writing to port B of the PPI, asdescribedin Chapterl.
16AilAlG NruTS
€V TO+$r
0 TO+10\,
-'l0VTO+t0V
tlFF./ t5 s.t
Fig.2-1- AD2000Functional
BlockDiagram
2-l
Gain Control Circuitry
Theprogrammable gaincontrolcircuiry canprovideagainfactorof 1,2,4,8,or 16.Thegainselectionis madeby writing
to port B of the PPI, asdescribedin Chapter1. The gain facor is conrolled by the settingof four analogswitches.For
againof2,4,8, or 16, thiswriteoperationwill closeoneof thefourswitches;foragain factorof 1,all switchesareopen.
Note that programming gain facors other tlnn the five listed hereis not recommended.
A"/DConverter
TheA/D converteris a high-speed l2-bit conversionIC whichperformsconversions in approximately20 microseconds.
Eight-bit conversionscanalsobe performedwhenspeedis morecritical thanresolution.An eight-bit conversiontakes
about 13 microseconds,allowing rapid conversionsof dynamicanaloginputs.The convertersupports10- or 20-volt
analoginput signals;however,it cannotsupporta 20-volt unipolarinputrangebecauseits supplyvoltagein theAD2000
applicationis only +12 volts. The analoginput voltagenmgessupportedby the AD2000 arelisted in the specifications
in AppendixA. Calibrationcircuiry is includedfor unipolarandbipolar calibrationof the A/D converter.Calibration
proceduresaredescribedin Chapter5.
An 8- or 12-bitconversionis initiatedby a write operationto theappropfutelO address.Oncea conversionis begun,
the conversionstatuscanbe monitoredby readingthe AID converterstatus(STS)signalwhich is ouput from the A/D
converterIC andinvertedbeforebeingmadeavailableto othercircuitry on theboardasttteend-of-convert@OC)signal.
The EOC signal canbe monitoredby one of nro digital input lines on the PPI, PA7 or PC7. Note that if either line is
selectedasthe EOC monitor, a jumper mustbe installedfor the selectedline on P6 andthat line mustbe configuredas
an input. The EOC signalis factory-setto be monitoredthroughPA7 on P6. The EOC signalis low (logic 0) during a
conversion.Figure 2-2 showsthe EOC timing diagram.Also, the three-state A/D outputbuffersremainin a high-
impedance state,and,therefore,datacannotberead. Whileaconversion anytransitionsof thedigitalinpus
is inprogress,
whichcontroltheconversionwill beignored,sothattheconversion cannotbeprematurelyterminatedor restarted. Once
theconversionis complete@OCis now high,or logic 1),theA/D datacanbereadin two bytes,theMSB andtheLSB,
in anyorder.Fora l2-bitconvenion,tie dataisleft-justifiedin a l6-bit word.In thecaseof aneight-bitconversion, the
datais completelycontainedin theeight-bitMSB.
Referto Chapterl, "Taking an A/D Reading,"andthe demodisk for moreinformationaboutusingthe AID converter.
A/Dcs
v
Eoc- tl
r---, fi-
Data 14
Fig.2-2-EOC TimingDiagram
aa
ProgrammablePeripheralfnterface
The hogrammablePeripheralInterface@PI) provides16TTL/CMOS digital VO lines which canbe configuredin a
numberof waysto supportuserrequirements.Thelinesavailablefor digital I/O areport A andport C. The8255PPI has
antalof 24 digitalI/O lines,eightof whichareusedto connoltheA/D channelselectionandgaincircuiry, andtherefore
arenotavailableto theuser.Theremaining16linesareavailableatextemalVO connecorPl5. The24linesaregrouped
into threeeight-bit ports,port A, port B, and port C. Port C is further suMivided into two four-bit ports,port C lower
(PC0-PC3)andport C upper(PC4-PC7)in certainmodesof operation.The PPI datasheetis includedin Appendix C.
The eight bits ofport B arereservedfor A/D channelselectionandgain control, andcannotbe configuredfor I/O use.
PortsA and C can be configuredin any of the threeoperatingmodesdescribedbelow:
Mode 0 - Basic input/outpur Providessimple input and output operat"ions for eachport. Data is
written to or readfrom a specifiedport.
Mode I - Srobed inpuUoutput.Providesa meansfor transferringlO datzto or from port A or port
B in conjunctionwith strobesor handshaking signals.
Mode2 -Suobedbidirectional input/output.Providesabidirectionalmeansof communicating with
anotherdeviceon a singleeight-bitbus.Handshaking signalsaresimilarto mode1.Thismodeapplies
to port A only.
In mode0, all four ports (A, B, C lower, andC upper)areavailableasVO lines. Sixteenconfigurationsarepossiblein
tlfs mode,andanyportcanbeconfiguredasaninputoranoutput.Theouputsarelarched,buttheinpusarenotlarched.
In modeI , thefour portsaregfoupedinto two groups.Eachgrcupcontainsoneeight-bitdataport (port A or port B) and
onefour-bit control/dataport (port C lower or port C upper)which is usedfor controlandstatusof theeight-bitport. The
eight-bit dataport in eachgroup canbe configuredasan input or an outpul Both inputsand outputsare latched.
In mode2, port A is an eight-bitbidirectionalbusandport C is a five-bit controlport PortB cannotbeusedin this mode,
but is availablefor usein mode0 or modeI while port A is in mode2. Both inputsandoutputsarelarched.
The PPI is configuredby writing a control word to the appropriateVO addresslocation, as describedin Chapter4,
"ProgrammingYour AD2000."
The control word canalsobe usedto individually setor resettheport C bis. This featureallows any bit of port C to be
setor resetwithout affecting the otherport C bits. The datasheetincludedin Appendix C explainsthis feature.
ThePPIcanalsobeusedo generateinterupts in modeI or mode2operation.Inthesemodes,theintemrptenable (INTE)
maskis usedto enabletheINTRA andINTRB interruptsignals.NotettrattheINTRB signalfor PPIcannotbe usedsince
portB of thisPPIis alwaysconfiguredasmode0 outputandis reservedfor channelselectionandgaincontrol.Intemrpt
functionsare further explainedin the datasheetin AppendixC.
The AD2000 boardprovidesa headerconnectorwhich canjumper the A/D converterend-of-convert(EOC) signal!o
a PPI bit whereit canbe monitoredto provide A/D conversionstatus.The EOC signalcanbejumperedto eitherPA7
(portA, bit 7) or PC7(portC, bit 7). Thedefaultsettingof thejumperis PA7.Theport usedto moni[orttreEOC signal
mustbe configuredasa mode0 input port.
2-3
A 5 MlIz crystaloscillatoron the AD2000 canbe usedto clock any timer/countercircuit Or, the timer/countercanbe
clockedbyasourceexternalto theboardthroughexternalVO connectorPl5.Ratesof dc to 8 MIIzcan beusedaoclock
thetimerrcounters.
Eachtimer/countercanbe configuredfor oneof six modesof operation.Thesemodesare:
Mode0 - Interrupton endof count.TheOUT signalchangesfrom low to highwhentltecountdown
is completed.
Mode1- Re-triggerable one-shot.A low-levelpulseriggeredby theGT inputis outputon theOUT
pin.
Mode2-Rategenerator.
Mode 3 - Squarewavegenerator.
Mode 4 - Sofnrare-triggeredstrobe.
Mode 5 - Hardware-triggeredstrobe(re-triggerable).
Thetimer/countercountmodes, aswell asthecounttype(binaryor BCD),read/writemode,andcounter/timerselection
mode,areall part of the control word which is written o the PIT control registerto initialize tle circuir When the PC
is poweredup, thetimer/countercircuits arenot defineduntil theappropriatecontrolwordsarewritten to thecircuits !o
programthemforoperation.Initializationisrequired onlyonceafterapower-upresetoccurs. Detailedinformation about
thePIT, including theconnol word format,is given in thedatasheetin AppendixC. AppendixD containsprogramming
notesfor somePIT applications.
The threetimerrcountercircuifs areindependent.However,they canbe cascadedfor countdownswhich arelongertlnn
one 16bit field cansupporLFor example,TCO'SOUT signalcanbe connected to TCI's CK signal,andTCl's OUT
signal can be connectedto TC2's CK signal.When configuredttris way, the PIT can accommodateextremelylong
countdowns.This configurationis describedin the applicationnotesin Appendix D.
Oneof the threetimer/counteroutputs,TCOOUT, TCI OUT, or TC2 OUT, canalsobe usedasa PC intemrpt. These
signalsarebroughtout to boardheaderconnectorP5whereone(andonly one)canbe.selectedfor connertion[o anyone
IRQ channel,RQ2 throughIRQ7. Chapter3, "JumperSettings,"and Chapter4, "ProgrammingYour AD2000,"
describetheseintemrptsin moredetail.
24
CHAPTER 3
JUMPERSETTINGS
Thischapterdescribes theAD2000boardsettingsyoucancontrolon DIP switchSI andvariousheaderconnectors. You
canusethischapterto tailor your board'sfunctions to yourspecificapplicationbefore installing it in your or
computer,
to changetheboard'sconfigurationas you learn more about.its operation
and specialfeatures. In this you
chapter, will
leamabouteachsettingandhowto setswitchesor installjumpersto achievethedesiredoperationof yourboard.Before
changingany settings,you shouldhavea functionalknowledgeof the circuit you are settingup (seeChapter2).
Remember thatall of thesettingsdescribed in thischapterhavebeenfaclory-set,or, asin thecaseof theintemrptsignals,
aredisabled.Therefore, do you not have to do any furtherset-upof ttreboardin orderfor it to operatein your system
in
asdescribed Chapter 1. The descriptions thischapterallow you to changefactorysettings,or to tailor your board
in
to takefull advantage of built-in versatility.
its
ThereareoneDIP switchandseveralheaderconnectorswhich allow you to controlvariousboardfunctions.Theseare
shownin theboardlayoutof Figure3-l andarepresented asfollows:
Sl * AnalogInput SignalType DIP Switch
P2 - BaseI/O AddressHeaderConnector
P3 - ProgrammableInterval Timer (PIT) I/O HeaderConnector
P4, P5, andP7 - Intemrpt HeaderConnectors
P6 - Endof-Convert(EOC)Monitor HeaderConnector
W - A/D ConverterVoltageRangeHeaderConnector
H,H'Flffiffif
Y r 6 . \ t
G
\ I WPE POL CA
l"ll-li
lll l:;rTld
=Jll |;r-"nf
-
t
llUilc pqr (-)c,.
Yl,*jB?."?.
Fig.3-1- 4D2000BoardLayoul
3-1
51 - AnalogInput SignalType DIP Switch
DIP switchSl, shownin Figure3-2,configuresthe multiplexersfor single-ended or differentialinputsandselectsa
unipolaror bipolarinput volage range.The fint threeswitcheson Sl operateasa group.Whenthesearein the UP
position,themultiplexersareconfiguredfor single-ended inpus; whentheyarein theDOWNposition,themultiplexers
areconfiguredfor differentialinputs.Notethatthesethreeswitchesmustall be setto thesameposition(UP or DOWN)
for the multiplexersto functionproperly.Theremainingswitch,Sl-4, controlsthe input voltagepolarity.Whenthis
switchis in theUP position,theinputvoltagerangeis unipolar;whenit is in theDOWN position,thevoltagerangeis
bipolar.This switch,coupledwith thevoltagerangeselectionseton headerconnectorP9,determines theanaloginput
voltagessupportedby theAID converter.Notethatwheneverthepolarily is changed,theAID convertercircuitry should
be calibratedas describedin Chapter5. The switch settingsareclearly labeledon the board to eliminateerrorswhen
configuringS1.
TYPE POL
1
S.E.
DIFF.
NNEE +l-
3-2
XTAL
EC0 ls
+5V
EGO ls
co0
cTo
cK1
XTAL
ls
ls
EC1
+5V
EG1
l3
col
co1
cK2 l:
XTAL
EC2 ls
+5V
EG2 ls
c02
c02 ls
Fig.3-3 - PIT l/O HeaderConnectorP3
Counter Inputs:
XTAL - This input to all threetimer/countercircuits is from the 5 MlIz crystaloscillator,labeledYl, locatedin the
upperleftareaoftheboard.By connectingXTAL to theCKxinputontherightsideof theconnectorwithajumperplaced
horizontallybetweenthe pins, the 5 MHz clock is appliedto the timer/countercircuit. If requiredby your application,
theXTAL frequencycanbe changedby installinga differentcrystaloscillaor at Y I . Note, however,that themaximum
frequencyat which the PIT will operateis 8 MHz.
ECx-This inputallowsanexternalclock,otherthantheXTAL signal,to controlthetimingof thecorresponding timer/
countercircuir This pin canbe horizonally jumperedto theCKx input on theright sideof theconnector,in placeof the
XTAL souce. The ECx signals are brought onto the board through externalVO connectorPl5 (seeTable B-3 in
AppendixB).
GateInputs:
+5V - This input, if connectedo theGTx input by placinga jumperhorizontallybetweenthe two pins,placesthe
associatedtimer/countercircuit in an enabledstateat all times.
EGx -This inputcanbehorizontallyjumperedto theGTx inputontherightsideof theconnector!oprovideanextemal
gateinputinsteadof the+5 volts input TheEGx signalsarebroughtontotheboardthroughexternalVO connectorPl5
(seeTableB-3 in AppendixB).
CounterOutputs:
COx - This output canbe horizontallyjumperedto the correspondingOUT pin on the right sideof the connectorso
that theclock outputsignalcanbe routedto externalI/O connectorP15(seeTableB-3 in AppendixB).
CO" - This outputcanbe horizonallyjumperedto thecorrosponding OUT pin on theright sidoof the connectorto
providetheinverseof theclock outputsignalto externalI/O connectorPl5(seeTableB-3 in AppendixB).
3-3
CKx - This input connectstheoutputof onetimer/counterto theclock input of thenexttimer&ounter.CKx is provided
for TCl andTC2 only, andis connecM to theoutputof theprevioustimer/counter(tCO or TCI) by placinga jumper
horizontallybetweenthepins.Theseconnectionsareusedto cascadethe timer/countersfor longertime delaysthanare
supportedby a single timer/countercircuit.
P15 P3 8255PtT
U5
*ro1--kl-
EC0
*sv---Id
EGO t)o
co0 <d
c-ool
o
cKll I
XTALI
EC1
+sv-aQ
EG1
co1 <------rc
co1lo
XTALIO
EC2 t>o
..5y-€
EG2
co2 {-O .4,
to'r-u
34
P4 - EXTINT and PPI INTRA Interrupts
HeaderconnectorP4 is usedto selectEXTINTorPPIINTRA for connectionto oneof thecomputer'sintemtptchannels
IRQ2 throughIRQ7. EXTINT is providedto accommodatean interrupt signalgeneratedexternalto the AD2000 and
routedontotheboardthroughexternalI/O connectorP15(seeTableB-3 in AppendixB). PPI INTRA (labeledPC3on
theboard)is generatedby thePPI.Thisintenuptis generated
duringPPImode1or mode2 operationonly.Oneof these
two signalscanbejumperedto oneof theavailablecomputerintemrptchannels IRQ2 throughIRQTby firstplacinga
jumperverticallyacrossttrepinsof thesignalchosenandthenplacinga secondjumperverticallyacrossthepinsof the
selectedIRQ channel.Figure3-5 showsheaderconnectorP4with jumpersinstalledsothatPPIINTRA is connected to
RQ2.
F
z
FGI IRQ
xc) ( o t )st
ul o. I\
P4
P5 7
6
5
4
3
2
ol
118
21-{
Fig.3-6 - InterruptHeaderConnectorP5
Yl - ND End-of-Convert(EOC)Interrupt
HeaderconnectorP7, shownin Figure3-7,is usedto jumpertheA/D converter'send-of-convert (EOC)signalto one
of thecomputer'sintemrptchannelsIRQ2throughIRQ7.TheEOCsignalis connected to an RQ channelby installing
a singlejumperhorizontallyacrossthepins of theIRQ channelselected.
Figure3-7 showstheEOC signalconnected
ro IRQ4.
3-5
7
6
5:0
4o
3
2
P6 - End-of-Convert(EOC)Monitor HeaderConnector
As describedabove,the A/D converterend-of-convert@OC) signalcanbe usedto generatean intemrpL If this signal
isnotusedasanintemrpt,itcanbeusedasastatusmonitoroftheA/Dconversionprocess. HeaderconnectorP6provides
twolinesthroughwhich tleEOCcanbemonitoredfromthePPI,PATorPCT. Oneofthesenvodigitall/Olinesisselected
for EOC monitoringby installingajumper horizontallyacrosstheappropriatepair of pins.The digital VO line selected,
PA7 or PC7, mustbe configuredasa mode0 input (seeChapter4, "ProgrammingYour AD2000"). Figure 3-8 shows
P6 with a jumperinstalledin thefactory-setpositionfor EOC monioring throughPA7.
!
o
!
{
P9 - A/D ConverterVoltageRangeHeaderConnector
HeaderconnectorP9, showninFigure3-9,is usedtoselecttheanalog inputvoltagerangeof theA7Dconverter.Ajumper
is installedvenically acrossthe pins markedlOV to supporta l0-volt range(0 to 10 volts or -5 to +5 vols), or across
thepinsmarked20V to supporta 20-voltrange(-10 to +10 volts).The settingof ttrisjumper,coupledwith thesetting
of DIP switch S14 which selecsa unipolaror a bipolarrange,determinestheinput voltagerangeof theAID converter.
P9 is configuredat the fac[ory accordingto thecustomer'sspecificationsfor theinput voltagerange.The valid seuings
of P9 and Sl-4 are summarizedin the able below:
3-6
CHAPTER 4
4-L
D7 D6 D5lD4lD3lD2lD1lD0
I
GROUPB
PORTC (LOWER)
I = TNPUT
0 = OUTPUT
PORTB
1= INPUT
0 = oUTPUT
MODESELECTION
0 = lvlODE0
1 = [4ODE1
GROUPA
PORTC (UPPER)
1 = INPUT
O= OUTPUT
PORTA
1= INPUT
O= OUTPUT
MODESELECTION
00 = MODE0
01 = MODE1
lX = I/IODE2
MODESETFI.AG
1 = ACTIVE
Fig.4-1- PPIModeDefinition
Format
4-Z
Your specificrequirementswill determinehow the individualtimer/counters shouldbe conhgured.The datasheet
includedin AppendixC providestheinformationrequiredto controlthepIT.
Thesoftwareincludedon thedemodisk showsexampleprogramsfor controllingsomeof thePIT operatingmodes.In
addition,sometypical applicationsarepresentedin theprogrammableinterval timer applicationnotesin AppendixD.
Includedare examplesrequiring two or morecouniersto be cascaded.
Thesignalsgenerated by theOUT pinsfor anyof thecountersmaybe connected to oneof thePC's intemrptchannels
usingjumpersinstalledatconnectorP5. Referto the"HardwareIntemrpts"sectionbelowfor moreinformationon using
theOUT signalsto generateintemrpts.
HardwareInterrupts
Threejumper connectors,P4, P5, and P7, are provided on the AD2000 to enableintemrpts generatedby the A/D
converter,thePIT,thePPI,andanexternalsourcetothePC'sintemrptchannels IRQ2throughIRQ7.Chapter3,"Jumper
Settings,"explainshow theseheaderconnectorscanbe configured.
Beforeyou attemptto useinterrupts,be sureyou arefamiliar with ttreprocedurefor initializing theintemrpt vectorsand
thePC's interupt controller,andseuingup theintemrpt handlingroutines.ReferenceI in AppendixE providesa good
descriptionof thePC's systemintemrpts.
PPI Interrupts
ThePPIINTRA(PC3)intenuptgeneratedinPPl model andmode2operationcanbejumperedtoanyof thePCintemrpt
channelsIRQ2 throughIRQ7. Thetiming of this intemrptis shownon thePPI datasheetincludedin AppendixC.
ThePPI intemtpt mustbe enabledby writing a "1" to the INI|E maskbil of thePPI asdescribedin the datasheetunder
"Intenupt,ControlFunctions."The INTE maskbit is disabledduringpower-upresetand wheneverthe PPI modeis
changed.
PIT Interrupts
One of ttreOUT0, OUTI, or OUT2 signalsgeneratedby the PIT can be jumperedto a PC intemrptchannelusing
connectorP5.
When usinga PIT OUT signalasan intemrpt"you mustbe very carefulto ensurethat the PC system'sprogrammable
interruptcontroller@IC) is properlyconfiguredto ignoreintemrptson the selectedintemrptchannelimmediatelyafter
power-up.This is necessarybecausethePIT mustfirst be initialized to define the desiredmode(s)of operation. Prior
to initialization,themode,count,andoutputof all countersareundefined.If thesysteminterruptsarenot disabled,the
counteroutputsmay causeerraticsystembehavior.
4-3
44
CHAPTER5
CALIBRATION PROCEDURES
This chaptercontainscalibrationproceduresfor theA/D converterinput voltagerangeandtheA/D convertergain.The
offsetandfull-scaleperformance of theAD2000A/D converteris factory-calibrated
accordingto thespecifications
that
weregivenwhenyourorderwasplaced.Thegaincircuitryis alsofactory-calibrated beforetheboardis shipped.The
following procedureallows you to quickly verify the accuncy of thesecircuits.This procedureshouldbe done
approximately everysix months,wheneverinaccuratereadingsaresuspected, or whenevertle voltagerangeis changed.
Calibrationis performedwith a properlyconfiguredAD2000installedin thePC.Apply powerto thecomputerandallow
the AD2,000circuitry to stabilizefor 15 minutes.
RequiredEquipment
The following equipmentis requiredfor calibration:
. hecision VoltageSource:0 to +10 volts
. Digital Voltmeter: 5-U2 Ctrgit
. SmallScrewdriver(for aimpot adjustment)
Figure5-I showstheboardlayout.Thetrimpotsreferencedin thefollowing proceduresaregroupedin theupperleft area
of the board.
Fig.5-1 - AD2000BoardLayout
A/D Calibration
During this procedure,connectionsmustbe madeto someof theanaloginpus on externalI/O connectorP8, available
at the rearpanelof thecomputer.The pin assignments for this connectoraregivenin TableB-2, AppendixB.
Two adjusrnentsarenecessaryto completelycalibratetheA/D converterfor unipolaror bipolar operation.Theseaffect
theoffsetandfull-scaleperformance of theAD2000circuiry. BothcalibrationstepsareperformedusingtrimpotsTR5
and TR6 or TR6 and TR7. Trimpot TR5 or TR7 is used!o zerothe offset error of the A,/I) converterand trimpot TR6
is usedfor full-scaleadjustment.In thefollowingprocedure,useanaloginputchannel1 andsetit for a gainof 1. This
5-r
is accomplished by writing all zeroesto I/O addresslocationBA + l. Be certainttratposition4 of switch51 is setfor
the desiredpolarity and thejumper on connectorP9 is setfor l0V.
Unipolar Calibration
Two adjustments arenecessary to calibratetheA/D converterfor theunipolarvoltagerangeof 0 to + l0 volts,onefor
offsetandonefor full scale.To adjusttheoffset,a very low analoginputvoltage,shownunderthe "Offset"headingin
the following table,is connectedto thechannelI input of themultiplexer@8-1).Thegroundreferenceof this signal
shouldbe connectedto P8-2.While continuouslydisplaying12-bitA/D conversions, adjustTR7 until the AID data
flickersbetweenthe two valueslistedin the tableunder"Offset."
After theoffsetadjustmentis made,TR6 is usedo adjustthefull-scalevalue.While thefull-scaleinput voltagelisted
in the tableis not the actualfull-scalevoltagefor an ideal0 to +10 volt range,it is ttremaximumvoltageat which the
A/D conversionis guaranteedo be linear.Any valueabovethis voltagemaynot belinearandthusmayadverselyaffect
calibration.After connectingthe full-scale voltagelisted in the table to the channel1 input, adjustTR6 until the data
flickersbetweenthe two valuesin theable under"Full Scale."
UnipolarCalibration
(0 to +10voltsranqe)
Offset(TRn Full Scale(TR6)
Inout Volaee +1.22070millivolrs +9.49829volrs
A/D Data 000000000000 1 1 1m
1 l10010
00m m00 0001 1110 10110011
Bipolar Calibration
Whetheryou areselectingthebipolarinputvoltagerangeof -5 to +5 voltsor - l0 to + 10vols, thefollowingcalibration
procedurecanonly be performedwith theboardconfiguredfor a -5 to +5 volt input voltagerange.This meansthat the
jumperonheaderconnectorP9 mustbeinstalledacross thel0Vpins.If youareusing0re -10to+10voltrange,reposition
the jumper on P9 acrossthe 20V pins after you perform the calibrationproceduresbelow.
Two adjustmentsarc necessaryo calibratethe A/D converterfor bipolar voltageranges,onefor offset andonefor full
scale.To adjusttheoffset"connectthevoltageshownundertle "Offset"headingin thetablebelowto thechannelI input
of the multiplexer.While continuouslydisplayingl2-bit AID conversions, adjustTR5 until thedaa flickersbetween
thetwo valueslistedin thetableunder"Offset."Next,connectthefull-scalevoltagelistedin thecableto thechannelI
input andadjustTR6 until thedataflickersbetweenthetwo valuesin thetableunder"Full Scale."
Bipolar Calibration
(-5 to +5 volts or -10 to +10 voltsranse)
Offset ffR5) FuIl Scale(TR6)
Inout Voltaee 4.99878vols +4.99634volts
A/DDaa 0m 00000000 1 1 1 1l l 1 1 l l 1 0
000000000001 1 1 1 11 1 1 11 1 1 1
5-2
Table5-l - A/D ConverterBlt Welqhts
fdeal Innut Voltace (millivolts)
A/D RitWeisht +5 Volts +10 Volts 0 to +10 Volts
4095(Full-Scale) +4997.6 +9995.1 +9997.6
2M8 0000.0 0000.0 +5000.0
rgu -2500.0 -5000.0 +2500.0
5t2 -3750.0 -7500.0 +1250.0
256 4375.0 -8750.0 +625.00
r28 4687.5 -9375.0 +312.50
& 4M3.8 -9687.5 +156.250
32 492r.9 -9843.8 +78.125
16 49ffi.9 -992r.9 +39.053
8 4980.5 -99ffi.9 +19.5313
4 49n.2 -9980.5 +9.7656
2 4995.t -99W.2 +4.8828
I 4997.6 -9995.r +2.4/.14
0 -sO(n.0 -10m0.0 0.0000
5-3
54
APPENDIX A
AD2OOO
SPECIFICATIONS
AD2OOO
SPECIFICATIONS
(TypicalN25"C)
A-l
Operatingtemperature 0 to +70oC
Storagetemperature. . -40 to +85"C
Humidity..... 0 tn %)Vonon-condensing
A-2
APPENDIX B
P8 3M yr1-7M0
P15 Mil c-83503 M8?sOit-os
DIFF / SE
I AINI+ / AIN1 2 GND
J AINI- / AIN9 4 GND
5 AIN2+/ AIN2 6 GND
7 ArN2- / AIN10 8 GND
9 AIN3+ / AIN3 l0 GND
11 AIN3- / AINI1 t2 GND
r3 AIN4+ / AIN4 t4 GND
15 AIN4- / AIN12 r6 GND
T7 AIN5+ / AIN5 l8 GND
19 AINs- / AIN13 20 GND
2r AIN6+ / AIN6 22 GND
23 AIN6- / AINI4 24 GND
25 AINT+ / AINT 26 GND
27 AINT- / AINI5 28 GND
29 AIN8+ / AIN8 30 GND
3l AIN8. / AINI6 32 GND
JJ N.C. 34 GND
35 N.C. 36 GND
JI +12 VOLTS 38 GND
39 .12 VOLTS 40 GND
B-1
Table B-3-PI"5 Connector Pin Assignments
I GND 2 EXTINT
3 PA7 4 PA6
5 PA5 6 PA4
7 PA3 8 PA2
9 PAl l0 PAO
11 GND t2 GND
13 PC7 t4 PC6
15 PC5 l6 PC4
I7 PC3 l8 PC2
19 PC1 20 PC0
2l GND 22 GND
23 EXTCLKO 24 EXTGATEO
25 CLKOUTO/CLKOUTG 26 GND
27 EXTCLKl 28 EXTGATEl
29 CLKOI-]"TI/CLKOUTI. 30 GND
31 EXTCLK2 32 EXTGATE2
33 CLKOUT2 / CLKOUT2- 34 GND
35 +5 VOLTS 36 +5 VOLTS
37 GND 38 GND
39 +12 VOLTS 40 -12 VOLTS
B-2
APPBNDIX C
teI r I r I I r i ttt
cs ltsET
dD 0o
Al I D'
N l0
7C' It
rc NC
Po6 0a
rc5 l4 03
PAl t5 o5
t6 o7
tt
PPFEE9FiEFE
}EClaB'IG
231256-1
Flgure1.82C55ABlock Diagram
231256-2
Pinout
Figure2.82C55A
Diagramsare lor pin relerence only. Package
siz€s ar€ not to scale.
S.ptcmbcr 19t7
3-124 Ordcr llumbcn 23 | 2564o.4
82C55A
Table 1. Pln
Symbol PlnNumber
Dlp Type Nameand Function
PLCC
PAg-o 1-4 2-5 t/o POFT A, PINS0-3: Lowernibbleof an 8-bitdata outputlatch/
butferand an 8-bitdatainputlatch.
m 5 6 I READCONTROL: Thisinputis lowduringCpUreadop€rations.
m 6 7 I CHIPSELECT: A towon thisinputenables the82C5SA to
respondto RE andWFIsignals.ffi andWRareignored
otherwise.
GND 7 8 SystemGround
Ar-o 8-9 9-10 ADDRESS: Theseinputsignals, in conjunction
F-DandWF[,
controltheselectionof oneof thethreeportsor thecontrol
wordregisters.
A1 As m wF' cs InputOperatlon(Read)
0 0 0 1 0 PortA-DataBus
0 1 0 1 0 PortB-DataBus
1 0 0 1 0 PortC-DataBus
I 1 0 1 0 ControlWord- DataBus
OutputOperatlon(Wrlte)
0 0 1 0 0 DataBus- PortA
0 1 1 0 0 DataBus- PortB
1 0 1 0 0 DalaBus- PortG
1 1 1 0 0 DataBus- Control
DisableFunctlon
x X X X 1 DataBus-3-State
X X 1 1 0 DataBus-3-State
Pcz-l 10-13 11.13-15 vo PORTC, PINS4-7: Uppernibbleof an 8-bitdataoutputlatch/
butfer and an 8-bit data input butfer (no latch for input).This port
can be dividedinto two 4-bit ports underthe mode control.Each
4-bit port containsa 4-bit latch and it can be used for the control
signaloutputsand statussignalinputsin conjunctionwith ports
A and B.
PCo-g 14-17 16-19 t/o PORTC,PINS0-3: Lowernibbteof portC.
PBo-z 18-25 20-22, uo PORTB, PINS0-7: An 8-bitdataoutputlatch/butferand an g-
24-28 bit data input butfer.
Vee 26 29 SYSTEMPOWER:* 5V PowerSuppty.
Dz-o 27-34 30-33, t/o DATABUS:Bi-directional,tri-statedatabuslines,connectedto
35-38 systemdatabus.
RESET 35 39 RESET: A highonthisinputclearsthecontrotregisterandall
portsaresetto theinputmode.
wF' 36 40 WRITECONTROI,.:
Thisinputis towduringCpU write
operations.
PAz-a 37-40 41 -44 tlo PORTA, PINS4-7: Uppernibbleot an 8-bitdataoutputtatch/
butferandan8-bitdatainputlatch.
NC 1,12, No Connect
23,34
3-125
intet 82C5sA
3-126
intef 82C55A
m
il
te&l
231256-3
Flgure3.82C55ABlock DlagramShowlngDataBuaBuffer and Read/WrlteControlLogtcFuncilong
I'{TEFI{AL
oATA ll{
IiITgRNAL
o^t (xrr
SITEFIIAL
OATA
'NOTE: wn
231256-4
Port pins loecledwith morethan 20 pF capacitanc€may nol havetheir logic level guaranteed following a hardwaro reset.
3-127
intef 82C55A
DESCRIPTION
82C55AOPERATIONAL coartFoLwonD
o, or D6 oa o2 Dl oo
ModeSelectlon
that can
J
Thereare threebasicmodesof operation
be selectedby the systemsottware:
Mode0 - Basicinput/outPut / oiolr! \
Mode1 - StrobedInPut/outPut
Mode2 - Bi-directionalBus foRTc tKncnl
l. lxPul
0.oUlruT
Whentheresetinputgoes"high"allportswillbe set
to theinputmodewithall24 portlinesheldat a logic foel 3
"one" levelby the internalbus holddevices(see t . lt{PUT
0. OUttUT
Figure4 Note). After the reset is removsdthe
82C55Acanremainin the inputmodewithno addi' XODEEELEC'IOII
0. li{)OC0
Thiseliminates
required.
tionalinitialization the need I . l,lOOEI
basis.
interrupt-driven
Flgure 6. Mode Deflnltlon Format
SlngleBlt Set/RegetFeature
Anyof the eightbits of PortC can be Set or Reset
usinga singleOUTputinstruction. This featurere'
ducessotware requirements in Gontrol'basedappli'
cations.
231256-5 WhenPortC is beingusedas status/controllor Port
A or B,thesebitscanbe setor resetby usingtheBit
andBus
5' BasicModeDefinltions Set/Resetoperationiustas if theyweredataoutput
:.::,-
F.-.r\r-
- -.-.Iigli" lnterface ports.
3-128
intef 82C55A
3-129
intet
operailngModes Mode0 BasicFunctional Definitions:
portsandtwo 4-bitports'
Mode0 (BastcInput/output).Thisfunctionat con- :o l:o
figurationprovideisimple'inputano outputopera- AnY-t^o't
portcanbe inputor output'
tionsfor eachof the three ports.No "handshaking" r Outputsare latched.
is required,data is simplywrittento or readfrom a . Inpirtsare not latched.
specified port'
o 16 ditferentInput/output are pos-
configurations
siblein thisMode.
MODE0 (BASTCINPUT)
231256-8
MODEo (BASTC
OUTPUT)
231256-9
3-130
A B GROUPA GROUPB
Da D3 D1 D6 PORTA PORTC PORTC
(UPPER) # PORTB
GOWER)
0 0 0 0 OUTPUT OUTPUT 0 OUTPUT OUTPUT
0 0 0 1 OUTPUT OUTPUT 1 OUTPUT INPUT
0 0 1 0 OUTPUT OUTPUT 2 INPUT OUTPUT
0 0 1 1 OUTPUT OUTPUT 3 INPUT INPUT
0 1 0 0 OUTPUT INPUT 4 OUTPUT OUTPUT
0 1 0 1 OUTPUT INPUT 5 OUTPUT INPUT
0 1 1 0 OUTPUT INPUT 6 INPUT OUTPUT
0 1 1 1 OUTPUT INPUT 7 INPUT INPUT
1 0 0 0 INPUT OUTPUT 8 OUTPUT OUTPUT
1 0 0 1 INPUT OUTPUT I OUTPUT INPUT
1 0 1 0 INPUT OUTPUT 10 INPUT OUTPUT
1 0 1 1 INPUT OUTPUT 11 INPUT INPUT
1 1 0 0 INPUT INPUT 12 OUTPUT OUTPUT
1 1 0 1 INPUT INPUT 13 OUTPUT INPUT
1 1 1 0 INPUT INPUT 14 INPUT OUTPUT
1 1 1 1 INPUT INPUT 15 INPUT INPUT
MODE0 Gonliguratlons
ooNrnot i,oio r0 GOfT|TROLWORO a2
coflTFor Yronotr
D, Da Oi O. O: Dr Or
3-131
o, o. 05 o. ot o, or Do
I o 0 0 0 0
0 0 0 I
3-132
inbf 82C55A
IIODE0 ConllguraUona(Continued)
co,llnol woRorta
o, oa or o. Dt D: Or Oo Dr 03 03 O. Dr Or Or Oo
rl0l0lllll0ltl0
Mode1 BasicfunctionalDefinitions:
Opcretlngtodcr
o Two Groups(GroupA and GroupB).
ilODE 1 (Strobed Input/Output).This functional o Eachgroupcontainsone8-bitdataportandone
configurationprovidesa meansfor transferringl/O 4-bitcontrol/dataport.
datato or from a specifiedport in coniunction
with
strobesor "handshaking" o The 8-bitdataport can be eitherinputor output
signals.In mode1, PortA
and Port B use lhe lineson PortC to generateor Bothinputsandoutputsare latched.
acceptthese"handshaking" signals. r The4-bitportis usedfor controlandstatusof the
8-bitdataport.
3-133
intef 82C554
InputControlSlgnalDeflnltlon
STE (strobe Input). A "low" on this input loads
dataintothe inputlatch. coiltaol woiD
Dr Dr Or O. D, 02 D! DO I trtE !
m^
Li- .i
IBF(lnputBufferFullF/F) tQ.r t!F^
t . ltatt l
A "high"on this outputindicates thatthe datahas 0. OUttUt
beenloadedintotha inputlatch;in essence, an ac- |l{tR^
knowledgement. IBF is set by STBinpg!beinglow RD
and is resetby the risingedgeof the RD input.
r/o
INTR(lnterruptRequest) mE r t;oiYll
INTEA
Controlledby bit set/resetof PCa.
INTEB 231256-13
l|t
It
txtt
ntr?lc- - -
tttfiStal
231256-14
3-134
intef 82C55A
OutputControlSlgnalDeflnltlon
OBF(OutputBuffer Fuil F/F). TheOEFoutputwitl
go "low" to indicatethat the CPUhas writtendata ooirraol roto
outto the specifiedport.The6EF ptp wiil be set by
the risingedgeof the WF inputand resetby ER cf^
Inputbeinglow. r_- 1
I lillE I
tal &-x^
l---J
ffi (AcfnowledgeInput).A "low" on this input
informsthe 82C55AthatthedatafromPortA or port ltfTRa
B hasbeenaccepted. In essenc€,
a response from
the peripheral
deviceindicatingthat it hasreceived
the dataoutputby the CPU.
Flgure10.MODEI Output
231256-16
Flgurell.llODE 1 (StrobedOutput)
3-13s
int€f 82C55A
of MODE1
Comblnatlons
definedas inputor outputin Mode 1 to supporta wide varietyof strobed
PortA and Port B cbn be individually
l/O applications.
?ar'?\
?c. rc7
?c! fc.
OONTBOLv,OFD
fca tc!
Er.r
?srto
?cr .rt
Fcl |lfr
,!co tNlR!
231256-17
of MODE1
Flgure12.Comblnatlons
3-136
int€f 82C55A
ooiltRot vfoRD
o, D. D! O:
oo-^
ffi^
toaY I
1 .INArT
0 - OUTTUT m^
tSFa
GhOT'BNODE
0'rrcDt 0
I - IrOOEI
231256-18
tlo
Flgure13.MODEControtWord
231256-19
Flgure14.MODE2
D t^tror
c?uto tzctta
rcr
str
tBf
ttit?HtnaL
Bts
lln
3-137
intef 82C55A
tlri^ rcr
tar,t\
6?^ rg cf^
|lF^ q t!t^
tBr+i!
r+.t\
|c? 6-f^
fc' 5-r^
?cr -i^ tcr E-r^
tt tB! tE".tq
RO iE-r lct
tn tit?hr fco
Figure 16.i/IODE1ZCombinatlons
3-138
intef 82C55A
ModeDeflnltlonSummary
MODEO MODE1 MODE2
!N OUT !N OUT GROUPA ONLY
PAo I N OUT IN OUT
PAr IN OUT IN OUT
PAz I N OUT IN OUT
PAg IN OUT IN OUT
PAa IN OUT IN OUT €
PAs IN OUT 1N OUT
PAo tN OUT IN OUT
PAz IN OUT IN OUT
PBo IN OUT IN OUT
PBr IN OUT IN OUT
PBz IN OUT IN OUT
MODEO
PBs IN OUT IN OUT
OR MODE1
PBa IN OUT IN OUT
ONLY
PBs IN OUT 1N OUT
PBe IN OUT IN OUT
PBz IN OUT IN OUT
Pco IN OUT INTRs INTRs vo
PCr IN OUT lBFs oBFB t/o
Pcz IN OUT sTEs Affis l/o
PCg IN OUT INTR1 INTRI INTR6
PCa IN OUT SfEa t/o sfBa
PCs IN OUT lBFl vo lBFa
PCe IN OUT vo 7ffia AfKA
PCt IN OUT uo oBFA oEFA
3-139
intef 82C55A
GROUPA GROUPB
(Defined
ByMode0 or Mode1 S€l€ction)
Flgure17b.MODE2 StatusWordFormat
3-140
intet 82C55A
'Notice:Slressasabovethoselistedunder "Abso-
ABSOLUTE MAXIMUM RATINGS-
lute MaximumRatings"maycausepermanentdam-
AmbientTemperatureUnderBias....0"Cto + 70'C age to the device.Thisis a stressratingonlyand
StorageTemperature -
. . . 65'Cto + 150.C functionaloperationof the deviceat theseor any
supplyVottage 0.5to + 8.0V o,!!::,":!-1't,* abovethoseindicatedin theopera-
tionalsectionsof thisspecificationis not implied.Ex-
operatingVoftage . ' . . + 4V to + 7V posure to absolutemaximumrating conditionsfor
Voltageon anylnput.. . .GND-2V to * 6.5V extendedperiodsmayatfectdevicereliability.
VoltageonanyOutput. .GND-0.5Vto V66 + 0.5V
PowerDissipation . . .1 Watt
D.C. CHARACTERISTICS
T A = 0 ' C t o 7 0 o C , V C C+: 5 V + 1 0 % , G N D : 0 V f i R : -40'Cto t85'CforExtendedTemperture)
Symbol Parameter Mln Max Unlts TestCondltlons
Vt lnputLowVoltage -0.5 0.8 V
Vrn lnputHighVoltage 2.0 Vcc v
Vor OutputLowVoltage 0.4 V lgL : 2.5 mA
Vox OutputHighVoltage 3.0 V lox -2.5 mA
Vss - 0.4 V lox -100pA
I11 InputLeakageCunent *1 pA V1N= Vgg to 0V
(Note1)
lopl OutputFloatLeakageGunent r10 pA V;1 = Vg6 to 0V
(Note 2)
loln Darlington
DriveCunent i2.5 (Note4) mA PortsA, B, C
R6: 500o
Vexl: 1.7V
lpnt PortHoldLowLeakageCunont +50 +300 pA V9g1 : 1.0V
Port A only
lpxn Port Hold High LeakageCunent -50 -300 pA Vggl = 3.0V
PortsA, B, C
lpxuo PortHoldLowOverdrive
Cunent -350 pA V9gr1: 0.8V
lpnro PortHoldHighOverdrive
Gunent +350 pA Vggl : 3.0V
lcc V66 SupplyGunent 10 mA (Note3)
lccsa V66 SupplyCunent-Standby 10 y"A V66 : 5.5V
Vrru= VCCor GND
PortConditions
ll llP = Open/High
OIP : OpenOnly
WithDataBus:
High/Low
Fs: High
Reset= Low
PureInputs:
Low/High
NOTES:
1. PinsA1,Ao,tF, WF, FE, Reset.
ts: <__.-.--- -.?. Data8tlqjfartg-E*-c-._
3. Outputsop€n.
4. Limitoutputcunenl to 4.0 mA.
3-14'l
inbr 82C55A
CAPACITANCE
TA : 25'C,Vcc : GND: 0V
Symbol Parameter Mln Max Unlts TestCondltlons
crH InputGapacitance 10 pF Unmeasured plns
returnedto GND
cvo l/O Gapacitance 20 pF
fc : 1 MHz(s)
NOTE:
5. Samplednot 100o/o
tested.
A.C. CHARACTERISTICS
TA : 0'to 70oC,Vcc : +5V 110%,GND= 0V
TR : -40"C to *85'C for Extended
Temperature
BUSPARAMETERS
READCYCLE
82C554.2 Teat
Symbol Parameter Unlts
llfn llax Condltlonr
tan AddressStableBeforeF-DJ 0 ns
tRR AddressHoldTimeAfterFDf 0 ns
tRn RD PulseWiOtn 150 ns
tno DataDelayfromFDJ 120 ns
tor FDT to Daa Fbating 10 75 ns
tnv RecoveryTimebetweenHD/WH 200 ns
WRITECYCLE
82C55A-2 Teet
Symbol Parametsr Unltr
tln iler Condltlonr
taw AddressStrableBeforeWF t 0 ns
twn AddressHold Time AfterWR f 20 ns PortsA & B
20 ns Port C
tww W-RPulseWidth 100 ns
tow DataSetupTimeBeforeWRf 100 ns
two DataHoldTimeAfterWHT 30 ns PortsA & B
30 ns PortC
g-'t42
intef 82C55A
OTHERTIMINGS
3-143
WAVEFORMS
xloDE0 (BAslcINPUn
291256-22
lroDEo (BAslcouTPuT)
81256-23
int€t 82C55A
WAVEFORMS(continued)
rroDE1 (STROBED
TNPUT)
r!f
|'{in
tFo
il?urFnff___
?titi{tnat
2312fi-24
roDE I (STROBED
OUTPUT)
(5'
tTt
act
qmtt
3-145
intef 82C55A
WAVEFORMS(continued)
rroDE2 (BIDIRECTIONAL)
DATA iifi
l2t6 TO rO0
Notc:
AnvsequencewhereWFiocctrs beforercR ANDSfE occursbeloreFD is permissible.
(INTR- IBFo fiIASR. SfB. FD + 6EF. NtIffi o flffi offi1
231236-28
231256-27
231256-29
= 231256-30
A.C.Teafirg lnputsA?€DrivenAt 2.4VFor A Logic1 And 0.45V 'Vgp ls S€t At VsriousVoltagesDuringT€stingTo Guarantee
For A Logic 0 Timing MeasurornentsAte Made At 2.0V For A
Looic 1 Ancl0.8 For A Logic0. Th€ Sp€cification.Cs IncludesJig Capacitance.
3-146
IntervalTimer
lntel82C54Programmable
DataSheetReprint
intel'
82C54
CHMOSPROGRAMMABLE TIMER
INTERVAL
I Compatlblewlth all Intel and most I ThreeIndependent16-bltcounters
other mlcroprocessors I Low PowerCHMOS
r HfghSpeed,"Zero Walt State" - lcc : 10 mA @8 MHzCount
Operatlonwlth 8 MHz8086/88and frequency
80186/188 r CompletelyTTL Compatlble
I HandlesInputs from DC to 8 MHz r Slx ProgrammableCounterModes
- 10 MHz tor 82C54-2
r Binaryor BCDcountlng
r AvallableIn EXPRESS
- StandardTemperatureRange I StatusReadBack Command
- ExtendedTemperatureRange I Avallableln 24-PlnDIPand 28-PlnPLcc
CHMOSversionof the industry
Thelntel82C54is a high-performance, standard 8254counter/limerwhichis
designedto solvethe timingcontrolproblemscommonin microcomputer systemdesign.lt providesthree
independent16-bitcount€rs,eachcapableof handlingclockinputsup to 10 MHz.All modesare software
programmable.The 82C54is pincompatible withth€ HMOS8254,andis a supersetof the 8253.
Six programmable
timermodesallowthe 82C54to be usedas an eventcounter,elapsedtime indicator,
programmable andin manyotherapplications.
one-shot,
The82C54is fabricated on lntel'sadvanced whichprovideslow powerconsumption
CHMOSlll technology
withperformance HMOSproduct.
equalto or greaterthantheequivalent The82C54is availablein 24-pinDIP
and 28-pinplasticleadedchipcarier (PLCC)packages.
6
f
t0
fD ll
m
|lr.t5tl'tl
Ao
Ar
231214-3
PIASTICLEADEDCHIPCARRIER
O, I Ycc
Oa ? m
Or 3 22 m
D. a Ir e5
Ot 5 ,0 Ar
D, t rt Ao
Dr , tl ctr 2
Do a tt oul 2
ctr 0 I c/ttc 2
our 0 t0 cLt r
2312U-1 OATEO ll OA?E1
Flgure 1.82C54Block Dlagram oro i2 OUI r
231244-2
Dogramsarelor pinret€r€nc€only.
Packag€siz€sarenot to scal€.
Ffgure2.82C54Pinout
Srpt.mb€r 19E9
3-83 O?d.r Iumbcn 2gfzffiOS
intef 82C54
3-84
intef 82C54
FO
wt
z
E
231244-4
3-85
intef 82C54
82C54SYSTEMINTERFACE
231244-6
The 82C54is treated by the systemssoftwareas an
Flgure5.IntemalBlock Diagramof a Gounter arrayof peripherall/O ports;threeare countersand
the fourth is a control register for MODE program-
The status register, shown in the Figure, when ming.
latched,containsthe currentcontentsof the Control
Word Register and status of the output and null Basically,the select inputsAq, A1 connectto the Ag,
count flag. (See detailed explanationof the Read- A1 addressbus signalsof the CPU.The CS can be
Back command.) derived directly from the address bus using a linear
select method.Or it can be connectedto the output
The actual counteris labelledCE (tor "CountingEle- of a decoder, such as an Intel 8205 for larger sys-
ment"). lt is a 16-bitpresettablesynchronousdown t€ms.
counter.
3-86
intef 82C54
DESCRIPTION
OPERATIONAL Programmingthe 82C54
Countersare programmedby writinga ControlWord
General and then an initialcount.The controlword formatis
shownin Figure7.
Atter power-up,the state of the 82C54is undefined.
The Mode, count value,and output of all Counters All ControlWords are writteninto the ControlWord
are undefined. Register,whichis selectedwhen A1, Ao : t1. The
ControlWord itselfspecilieswhich Counteris being
How each Counteroperatesis determinedwhen it is programmed.
programmed.Each Counter must be programmed
beforeit can be used.Unusedcountersneed not be By contrast,initialcountsare writteninto the Coun-
programmed. ters, not the ControlWord Register.The A1, Ag in-
puts are used to select the Counterto be written
into.The formatof the initialcount is determinedby
the ControlWordused.
ControlWord Format
A1,As:11 6:O ffi:1 WFi:0
D7 D5 D5 Da D3 D2 D1 Ds
scl sc0 RW1 RW0 M2 M 1 MO BCD
Figure7. ControlWordFormat
3-87
intet 82C54
A1 Ao A1 Ae
ControlWord- 0
Counter 1 1 ControlWord- Gounter2 1 1
LSBof count- 0
Counter 0 0 ControlWord- Counter1 1 1
MSBof count- 0
Counter 0 0 ControlWord- Counter0 1 1
ControlWord- Counter1 1 1 LSBof count- Counter2 1 0
LSBof count- Counter1 0 1 MSBof count- Counter2 1 0
MSBof count- Gounter1 0 1 LSBof count- Counter1 0 1
ControlWord- 2
Gounter 1 1 MSBof count- Counter1 0 1
LSBof count- 2
Counter 1 0 LSBof count- Gounter0 0 0
MSBof count- 2
Counter 1 0 MSBof count- counter0 0 0
A1 A9 A1 Ao
ControlWord- Counter0 1 1 ControlWord- Gounter1 11
CounterWord- Counter1 1 1 ControlWord- Counter0 11
GontrolWord- 2
Counter 1 1 LSBof count- Counter1 01
LSBof counl- Counter2 1 0 ControlWord- Counter2 11
LSBof count- Counter1 0 1 LSBof count- Counter0 00
LSBof count- 0
Counter 0 0 MSBof count- Counter1 01
MSBof count- Counter0 0 0 LSBof count- Counter2 10
MSBof count- Counter1 0 1 MSBof count- Counter0 00
MSBof count- Counter2 1 0 MSBof count- Counter2 10
NOTE:
In all four examples,all countersare programm€dto read/writetwo-bytecounts.
Theseare only four of manypossibleProgramming seguenc€s.
3-88
inbr 82C54
Command
Descrlptlon Results
D7 D5 D5 Da D3 D2 D1 De
'l a
0 0 0 0 1 0 Read back count and statusof Countand statuslatched
Gounter0 for Counter0
1 1 1 0 0 1 0 0 Readbackstatusof Gounter1 Statuslatchedfor Counter1
1 1 1 0 1 1 0 0 Read back statusof Counters2, 1 Statuslatchsdfor Counter
2, but not Counter1
1 1 0 1 1 0 0 0 Read back count of Counter2 Countlatchedfor Counter2
.t
1 0 0 0 1 0 0 Readbackcountand statusof Countlatchedfor Counter1,
Counter1 but not status
1 1 1 0 0 0 1 0 Readbackstatusof Counter1 Command ignor€d,status
alreadylatchedfor Counter1
Figure 13.Read-BackCommandExample
3-90
inbr 82C54
| -l * l* l' I I I 3I I I i I s lF|::l
ModeDefinitions
Cw- l0 Lll rt
The followingare definedfor use in describingthe
operationof the 82C54.
CLK PULSE:a risingedge,then a fallingedge, in
that order,of a Counter,sCLK input.
TRIGGER:a risingedge of a Counter'sGATE in-
put.
COUNTERLOADING:thetransferof a countfrom
the CR to the CE (refer to l"l"l - l" l3 | : I I | : i ? l3 lt:l
the "Functional Descrip-
tion") Cwr l0 Ltl rt
NOTE:
GATE : 1 enablescounting;GATE : O disables The FollowingConventions ApplyTo All Mode Timing
counting.GATE has no etfect on OUT. Diagrams:
1. Counters are programmedfor binary (not BCD)
Afterthe GontrolWordand initialcountare writtento gollting and lor Reading/Writingt€ast significantbyte
a Counter,the initialcountwill be loadedon the next (LSB)only.
2. The counleris alwaysselected(dS ahays low).
CLK pulse.This CLK pulsedoes not decrementthe
3. CW standsfor "ControlWord"; CW = 10 meansa
count,so for an initialcount of N, OUT does not go controlword of 10, hex is writtento the counter.
high until N + 1 CLK pulsesatter the initiatcount is 4. LSB standslor "Least SignilicantByte', of count.
wriften. 5. Numbersbelowdiagramsare countvalues.
The lowernumberis the leastsignilicantbyte.
lf a new count is writlen to the Counter,it will be The uppernumberis the most significantbyte. Since
loadedon the next GLK pulseand countingwill con- the counteris programmedto Read/WriteLSB only,
tinuefrom the new count.lf a two-bytecount is writ- the mostsignificantbytecannotbe read.
N standslor an undelinedcount.
ten, the lollowinghappens: Verticallinesshowtransitions betweencountvalues.
1) Writingthe firstbyte disablescounting.OUT is set
low immediately(no clock pulse required). Figure15.Mode0
2) Writingthe secondbyte allowsthe new count to
be loadedon the next CLK pulse.
3-91
inbf 82C54
lf a new countis writtento the Counterduringa one- After writing a Control Word and initial count, the
shot pulse,the currentone-shotis not affectedun- Counterwill be loadedon the next CLK pulse.OUT
less the Counter is retriggered.In that case, the ooes low N CLK Pulsesafter the initialcount is writ-
Counter is loaded with the new count and the one- ien. This allowsthe Counterto be synchronizedby
shot pulse continuesuntilthe new count expires. softwarealso.
wr
FT
cLt
ctx
o^rE
O TE
oul
out
l - l - | r l * | r I I l t l t | 3 l : t l 3| : I
wt
r[ cLx
clx o^rt
ollE our
CW r t2 Lt! :2 L5! rr
ctx
9t
ollE
ctx
out
GAIE
l.l.l.l" i: l3 i: ll l: l: l3 I
231244-10
our
NOTE:
l-i- ir r,xIIi:lllt:|il: l:I A GATEtransitionshould not occur one clock prior to
231244-9 terminalcount.
Figure16.Mode I Figure17.Mode2
3-92
inbr 82C54
Writinga new count while countingdoes not atfect OUT will be highfor (N + 1)/2 countsand tow for
the curent counting sequence.lf a trigger is re. (N -1)/2 counts.
ceivedafter writinga new count but beforethe end
of the currentperiod,the Counterwill be loadedwith
the new count on the nsxt CLK pulse and counting
will continuefrom the new count. Othenrvise, th6
itr
ilr
MODE3: SQUAREWAVE MODE
cycles.
l' lr li l" l: lt lt l: lt l: l: ls l: l: I
GATE : 1 enablescounting;GATE : 0 disables
counting.lf GATEgoes low whiteOUTis low,OUT is 9t
set high immediately;no CLK pulse is required.A
triggerreloadsthe Counterwith the initialcount on ctr
out
After writing a Control Word and initial count, the
Counterwill be loadedon the next CLK putse.This l'l"l"l.lll:ltlil:l|:i 3l
allows the Counter to be synchronizedby software
|:l
231214-11
also.
NOTE:
Writing a new count while counting does not atfect A GATEtransition
shouldnot occurone clockpriorto
terminalcount.
the current counting sequence.lf a trigger is re-
ceived after writing a new count but before the end
of the current hall-cycle of the square wave, the Figure18.Mode3
Counterwill be loaded with the new count on the
next CLK pulse and countingwill continuefrom the MODE4: SOFTWARETRtccERED STROBE
new count.Othenrise,the new count will be loaded
at the end of the currenthalf-cycle. OUT will be initiailyhigh.When the initiatcounr ex_
pires,OUT will go low for one CLK pulse and then
Mode 3 is implementedas follows: go highagain.The countingsequEnceis ,,triggered"
by writingthe initialcount.
Evencounts:OUT is initiailyhigh.The initialcountis
loadedon one CLK pulse and then is decremented GATE : 1 enablescounting;GATE : 0 disables
by two on succeedingCLK pulses.When the count counting.GATE has no effect on OUT.
expiresOUT changesvalue and the Counteris re_
loadedwith the initiatcount. The above processis After writing a Control Word and initial count, the
repeatedindefinitely. Counterwill be loadedon the next CLK pulse.This
CLK pulsedoes not decrementthe couni,so for an
odd counts:oUT is initiallyhigh. The initialcount initial count of N, OUT does not strobe low until
minusone (an even number)is loadedon one CLK N + 1 CLK pulsesafter the initialcount is written.
pulseand then is decrementedby two on succeed-
ing CLK pulses.One CLK putseafter the count ex- lf a new count is written duringcounting,it will be
pires, OUT goes low and the Counteris reloaded loadedon the next CLK putseand countiig wiil con_
with the initial count minus one. SucceedingCLK tinue from the new count. lf a two-bytecorint is writ-
pulsesdecrementthe countby two. Whenthe count ten, the followinghappens:
expires,OUT goes high again and the Counteris
reloadedwith the initialcountminusone.The above
processis repeatedindefinitely.So for odd counts,
3-93
intet 82C54
1) Writingthe first byte has no etfect on counting. After writingthe ControlWord and initialcount' the
counterwill not be loadeduntilthe CLK pulseafler a
2)Writing the secondbyte allowsthe new count to
trigger. This CLK pulse does not decrementthe
be loadedon the next GLK Pulse.
count, so for an initial count of N' OUT does not
strobe low until N + 1 CLK pulses after a trigger.
This allows the sequenceto be "retriggered"by
software.OUT strobes low N+1 CLK pulses after
A triggerresultsin the Counterbeingloadedwiththe
the new count of N is written.
initial count on the next CLK pulse. The counting
sequenceis retriggerable.OUT will not strobe low
for N * 1 CLK pulsesafter any trigger'GATE has
wr no etfect on OUT.
w!
EI
ctx
ctx
oat: gAT:
our
cLx ctr
o/lt€ GAIE
out
ouY
l"l,.l"l-l: lololo
lzlrlalr
lo lolFFl
lolrrl
231244-12 ' .',:1.''
rI: IrIr |3r::r
:,'.:':.l,"'
Figure 19.Mode 4 *E
clx
MODE 5: HARDWARETRIGGEREDSTROBE
(RETBIGGERABLE) crlt
3-94
intef 82C54
COUNTER
IIODE
MIN mAx
COUNT COUNT New counts are loaded and Counters are decre-
0 1 0 mentedon the fallingedge of CLK.
1 1 0 The largeg!possibleinitial count is O;this is equiva-
2 2 0 lent to 216 tor binary counting and 104 for'BCD
counting.
3 2 0
4 1 0 The Gounterdo€s not stop when it reacheszero. ln
Modes0, 1, 4, and 5 the Counter"wrapsaround"to
NOTE: the highestcount,eitherFFFFhex for binarycount-
0 is equivalentto 216 lor binary countingand 10a for ing or 9999 for BCD counting,and continuescount-
BCDcounting ing. Modes2 and 3 are periodic;the Counterreloads
itself with the initial count and continues counting
Figure22.ilinlmumandilarlmum InlUalCounts from there.
3-95
inbf 82C54
3-96
inbf 82C54
A.C. CHARACTERISTICS
(continued)
WRITECYCLE
Symbol Parameter 82C54 82C54-2
Unlts
Min ilax Min Max
tew AddressStableBeforeWFij 0 0 ns
tsw 6 StauleBeforeWFIJ 0 0 ns
twR AddressHoldTimeAfterWFII 0 0 ns
tww WR PulseWidth 150 95 ns
tow DataSetupTimeBeforeWFIf 120 95 ns
two DataHoldTimeAfterWFf 0 0 ns
tnv ComqandRecovery Time 200 165 ns
3-97
intet 82C54
WAVEFORMS
231244-14
READ
2312U-15
231244-16
3-98
inbf 82C54
CLOCKAND GATE
23121/-17
' Lrst byto ot counl belngwiten
A.C.TESTINGINPUT,OUTPUTWAVEFORIII A.C.TESTINGLOADCIRCUIT
INPUT/OUTPUT
I orvrcr I
| '*17
I I i cI r . t l r r
J
23124-10
A.C.Tecring:InputBar€ drivonat 2.4V tot I togic"1" and 0..f5V 23121,4.-19
for a logic "0." Timingmee8ur€mentE
aro msd€!t 2.0Vtor s bglc Cl - 150pF
'1" ud 0.8Vlor a logic C1 includer fig cepedtanca
"0."
3-99
APPENDIX D
FOR SIGNAL*MATH
CONFIGURING THE AD2OOO
D-2
Jumper Settings
WhenrunningSIGNAL*MATH, you haveto changesomeof the AD2000'son-boardjumpen from their
facory-set positions.Before using SIGNAL*MATH on the AD2000 board,checkthe following jumpers:
.F2- Baseaddress
. P3 - 8254 timer/counterI/O configuration
. P4,P5 &YI - Intemrpts
. P6 - End-of-ConvertMonitor
Theboardlayoutis shownin FigureD-1.
IHH_lililqrulmftffi
f"'
Uu
ffi_=_LrUli[: ? |
P8
Oreffi
Ifgf t- .--. l-l
P2 - BaseAddress
SIGNAL*MATH assumesthat the baseaddressof your AD2000 is the factory settingof 300 hex (768 deci-
mal).If you changethis setting,you must run the ADAINST programandresetthebaseaddress.
NOTE: When using the ADAINST program,you can enterthe baseaddressin decimalor hexadecimal
notation.Whenenteringa hex value,you mustprecedethenumberby a dollar sign(for example,$300).
D-3
P3 - t254 Timer/Counter VO Configuration
The 8254 mustbe configuredwith the six jumpersplacedbetweenthe pins as shownin Figure D-2. After
setling drejumpers,verify that eachis in theproperlocation.Any remainingjumpersmust be rcmovedfrom the P3
headerconnector.
XTAL
ls
Els
ECo
+5V
E@ l-q
coo
coo
cK1
XTAL
ECr ls
Elr le
+5V
EG1
co1
6T
cJ<2
XTAL
l*
Els
rcz
+5V
ECi2 l"s
cg2
co2
P5 7 P7
6
5 7
4 6
3 o s-
2 o
]U 40
ol 3
r lO
:t5 2
P6- End-of-Convert
Monitor
placeajumperbetween
WhenrunningSIGNAL*MATH, EOCandPA7,asshownin FigureD4.
Fig.D-4- End-of-Convert
MonitorJumper,P6
D4
RunningADAINST
After thejumpersare setand the AD2000 boardis installedin the computer,you arereadyto configure
SIGNAL*MATH so that it is compatiblewith you board'ssetings. This is doneby running the ADAINST driver
installationprogram.After running theprogram,openAD2000.EXEfrom the Opena File menu.You will seea
screensimilar to the screenshownin Figure D-5 below. The factory default serings are shownin the illustration.
Your seuingsmay or may not matchthe default settings,dependingon whetheryou havemadechangesto these
seuingsbefore.
BaseAddress. The board'sbaseaddresssettingis enteredin the upperright block, as shownin the diagram.
The factory settingfor all Real Time Devicesboardsis 3CI hex (768 decimat).The baseaddresscanbe enteredasa
decimalor hexadecimalvalue (hex valuesmust be precededby a dollar sign (for example,$3m). Refer to your
board'smanualif you needhelp in determiningthe correctvalue0oenter.
EOC IT (End-of-Convert Interrupt). In this block, enterthe IRQ channelnumberwhich correspondsto your
jurnperse$ingon P7.
Timer IT (Timer/Counter Interrupt). In this block, enterthe IRQ channelnumberwhich correspondsto your
jurnpersettingon P5.
LabTech SW IT (LABTECH NOTEBOOK SoftwareInterrupt). This setsthe softwareintemrptaddress
whereLABTECH NOTEBOOK's labLINX driver is installed.The facory seningis $60. This settingcanbe
ignoredwhenrunning SIGNAL*MATH.
A./DParameters. Six A/D boardparameters
arelisted:resolution,numberof channels,activeDMA channel,
gain, loss,and input voltagepolarity.
Endof-Convert Timer/Counter
Interrupt
Channel lnterrupt
Ghannel BaseAddress
Software
lnterrupt
Address
A/D Unipolar/
Bipolar
Select D/AUnipolar/
Bipolar
Select
Fig.D-5- ADAINST.EXE
Screen
D-5
Resolutionand numberof channelsarefixed by theprogramfor your board.
The DMA channelnumberblock is not valid on the AD2000,andshouldbe left blank.
The next two blocks, gain and loss,are providedso that you can makeadjustmentsfor external gain or loss,
other than the programmablegain settingsavailableon the board.If your input signalis externallyattenuated,then
you canadjustfor this by settinga valueother than I for loss.Ifyou havean externalgain facbr, thenyou can
adjustfor this condition.Numbersmustbe enteredaswhole decimalvalues.The factory default sesingfor gain and
lossis 1.
For a bipolar input range,an X shouldbe placedbeforeBipolar on the screen(default setting).For unipolar
ope.ration,removethe X.
D/A Parameters. Thesesix blocksarenot usedon the AD2000,and shouldbe left blank.
D-6
APPENDIX E
FOR ATLANTIS
CONFIGURING THE AD2OOO
Jumper Settings
WhenrunningATLANTIS, you haveo changesomeof theAD2000'son-boardjumpersfrom their facory-set
positions.Before using ATLANTIS on the AD2000 board,checkttrefollowing jumpen:
. F2 - Baseaddress
. P3 - 8254 timer/counterVO configuration
. P4,P5 &Yl - Intemrpts
. P6 - End-of-ConvertMonitor
Theboardlayoutis shownin FigureE-1.
ffiu*"rnu."n.
ECI
i5V
EGI
col
cor
ga
(TA
EC2
i6V
EG2
P2 - BaseAddress
ATLANTIS assumesthat the baseaddressof your AD2000 is the factory settingof 300 hex (seeChapter1). If
you changedthis setting,you must run tlte ATINST progxamandresetthe baseaddress.
NOTE: The ATINST programrequiresthebaseaddressto be enteredin decimalnotation.
E-3
P3 - 8254Timer/Counter UO Configuration
T1ne8254mustbe configuredwith the six jumpersplacedbetweenthe pins as shownin Figure E-2. Aftnr
settingthejumpers,verify that eachis in ttreproperlocation.Any remainingjumpersmust be removedfrom the P3
headerconnector.
XTAL
ECo
+5V
l*
EC{ 1.9
c@
coo
cK1 ls
XTAL
ECl ls
EIr I-e
+5V
EG1
co1
6T
cte.
XTAL
l*
Els
EC2
+5V
EG2 ls
c@.
ffi
Fig.E-2- 8254Timer/Counter
Jumpers,P3
P4,P5& P/ - Interrupts
To selectanRQ channelandanintemrptsourcefor ATLANTIS,youmustinstalltwojumpersonP5,the
outputintemrptheader.
timer/counter JumpersmustbeinstalledacrosstheOUT2pinsandacrossthepinsof your
desiredIRQchannel. FigureE-3showsOUT2jumperedto IRQ3.lvlakesurettratnojumpersareinstalledacrossthe
IRQpinson headerconnectors P4andP7.
[]i
l-l ;
Ll ilc
-ConvertInlerruptJumper,P7
Fig.E-3- End-of
P6 - End-of-ConvertMonitor
WhenrunningATLANTIS, placea jumperbetweenEOC andPA7, asshownin Figure84.
Fig.E-4- End-of-Convert
MonitorJumper,P6
E4
APPENDIX F
WARRANTY
F-2
LIMITED WARRANTY
F-3
AD2000 User-SelectedOptions
(hex) (decimal)
PITOUT2 IRQCI{ANNEL: