Download AD510 User`s Manual - RTD Embedded Technologies, Inc.
Transcript
AD510User'sManual
ffi
RealTimeDevices,
Inc.
" AccessingtheAnalog World',u
ISO9001 and AS9100 Certified
AD51O
User'sManual
ffi
REAL TIME DEVICES,INC.
Drive
820NorthUniversity
PostOfficeBox906
16804
StateCollege,
Pennsylvania
Phone:(814)234-8087
FAX:(B1a)
234-5218
Publishedby
RealTimeDevices,Inc.
820N. UniversityDr.
P.O.Box 906
StateCollege,PA 16804
Copyright@ 1991by RealTime Devices,Inc.
All rightsreserved
Prinredin U.S.A.
Rev.A 9211
TABLE OF CONTENTS
INTRODUCTION
Analog-to-D
WhatComesWith Your
WhenYou NeedHelp...
CHAPTERI - BOARDSETTINGS
Factory-Configured
SwitchandJumperSettings
P2- BaseAddress(FacorySetting:200hex(512decimal)).................
P3 - IntemrptChannelSelection(FactorySening:Disabled)
P5- ExternalTriggerIn (FacorySening:Disabled)
Sl - A/D Conversion
Rate(FactorySetting:7.5H2)
ChangingtheProgrammable
GainSeuings........
CHAPTER2 - BOARDINSTALLATION
ConnectingtheAnalogInput Pins
Connectingthe Digital VO Pins
ConnectingtheTriggerIn andTriggerOut Pins.......
i-l
i-3
i-3
i-3
i-3
i4
t-l
...............1-3
..............14
..........1-4
.......................1-5
.......................1-5
................1-6
2-1
........-.-.2-4
.............,.,,,'....24
.....2-4
Connectingthe Reset
CHAPTER 3 _ HARDWARE DESCRIPTION ............
3-l
ProgrammablePeripheral
CHAPTER 4 -
BOARD OPERATION AND PROGRAMMING
SingleConve
Continuous
ConvertMode...........
CascadingBoards.........
BA + 0: PPIPortA - ReadA/D Data@eadOnly)
BA + 1: PPI port B - ChannelSelect/DigitalOut @eadfilrite) ................
BA+ 2: PPI Port C - A/D ConroUDigrralI/O Eeadlilrite)
BA + 3: PPI ControlWord (Read,tTVrite)................
BA + 4: Status(ReadOnly) ..........
.............4.1
.........4-7
.,,....,....4-7
...................4-10
....4_ll
.....4-l l
.....................4-t2
......4-13
...........................4l3
BASIC
TurboPascalPrograms:
Turbo C
LexiconTestandDiagnosticsToo1..............
13
......................413
13
,...................413
CHAPTERS-CALIBRATION
...........5.1
APPENDIX A - AD51OSPECIFICATIONS
.........A.1
APPENDIX B - CONNECTORPIN ASSIGNMENTS.
APPENDIX C - COMPOI{ENT DATA SHEETS
...........8.1
....................C.1
APPENDTXD - LEXTCON5r0...
.........D-1
APPENDIXE-WARRANTY....
..........E.1
LIST OF ILLUSTRATIONS
1-1
r-2
1-3
t4
1-5
1-6
2-l
2-2
2-3
3-1
4-l
4-2
4-3
44
4-5
4-6
4-7
5-1
5-2
BoardLayout ShowingFactory{onfiguredSettings........
P2................
BaseAddress
Jumper,
Jumper,P3 ...............
IntemrptChannelSelection
ExternalTriggerIn, P5 ...............
RateSwitch,S1................
A/D Conversion
Gains
ConrollingtheProgrammable
P4 VO ConnectorPin Assignments
..............
AnalogInputConnection
Sampling
CascadingTwo Boardsfor Simultaneous
AD510BlockDiagram
Diagram
PPIInterconnect
Function......
SeringtheGainto 100UsingBit Set/Reset
SingleConvertModeTimingDiagram
SingleConvertModeFlow Diagram
ContinuousConvertModeTiming Diagram
ContinuousConvertModeFlow Diagram......
Boards,SingleConvertModeFlow Diagram
Cascaded
AdjusableVoltageSource.........
BoardLayoutShowingCalibration
Trimpots......
........1-3
......................14
.....................1-5
.....1-5
..........1-5
...................1-6
.......................
2-3
........................24
.................2-5
....................3-3
................4-3
.........4-5
................4-5
....................4-6
........4-7
......4-8
...........4-9
......5-3
......................54
INTRODUCTION
The AD510 multichannelintegratinganaloginput boardtums your IBM rc/XT/AT or compatiblecomputer
into a high-performancedataacquisitionand control system.Instrlled within a singleshort or full-size expansion
slot in the computer,the AD5l0 boardfeatures:
Eight single-endedanaloginput channels,
l2-bit integratingAID converterfor high stability and exceptionalnoiseimmunity,
gainsof l, 10,and 100,
Programmable
in
Trigger and rigger out for cascadingboards,
Nine TTL/CMOS digital VO lines.
The following paragraphsbriefly describethe major functionsof the board.More detaileddiscussionsof board
functionsare includedin Chapter3, HardwareDescription,andChapter4 , Board Operationand Programming.The
boardsetupis describedin Chapterl, Board Settings.
Analog-to-DigitalConversion
The analog+odigital (A7D)circuitry receivesup to eight single-endedanaloginputs andconvertstheseinputs
into 12-bit digital datawords which can thenbe readand/ortransferredto PC memory.
Theinput volage rangeis -5 o +5 vols for a gainof I (therangeis 4.5 to +0.5 volts for gain= 10;-.05to +.05
volts for gain = 100).The conversionrate is switch-selectablefor either 7.5 or 30 Ilz. The 7.5 Hz rateprovideshigh
rejection(over 60 dB) of 60 Hz line noise.
A,/Dconversionsareperformedby a l2-bit (plus sign bit showingpolarity) dual-slopeintegratingconverter.
gainsof l, 10,and 100let you discernchangesin theinput voltageas smallas 13 microvolts.
Theprogrammable
The converteddatais readanflor transferredto PC memory,onebyte at a time, throughttrePC databus.
Digital VO
The AD510 hasnine TTlrcMos-compatible digital I/O lines which canbe directly interfacedwith extemal
devicesor signalsto senseswitch closures,rigger digital events,or activatesolid-staterelays.The lines areprovided by the on-board8255 programmableperipheralinterface@PI)chip.
What ComesWith Your Board
You receivethefollowing itemsin your AD510package:
. AD510 interfaceboard
. Softwareand diagnosticsdiskettewith exampleprogramsin BASIC, Turbo Pascal,andTurbo C; sourcecode
. User'smanual
If any item is missingor damaged,pleasecall Real Time Devices' CuslomerServiceDepartmentat
(814)234-8087.If you requireserviceoutsidetheU.S.,contactyour local disributor.
In additionto theitemsincludedin your AD5l0 pckage,RealTime Devicesoffersa full line of boardaccesso(or 16
ries.Key accessories
for theAD510 includetheMX32 analoginputexpansionboardwith 16 single-ended
differential) input,channels,the TB40 terminalboardand XB40 prototypelterminalboardfor prototypedevelopment
and easysignalaccess,EX-XT andEX-AT extenderboardsfor simplified testinganddebuggingof prototype
circuitry, and the XC40 singlewire flat ribbon cableassemblyfor extemalinterfacing.
Using This Manual
This manualis intendedto help you install your new boardandget it runningquickly, while also providing
enoughdetail aboutthe board and is functionsso that you canenjoy maximumuseof its featuresevenin the most
complexapplications.We assumethat you alreadyhavean understrndingof dataacquisitionprinciplesand that you
cancustomizethe examplesoftwareor write your own applicationsprograms.
i-3
When You NeedHelp
This manualand the exampleprogams in the softwarepackageincludedwith your boardprovide enough
informationto properly useall of the board's features.If you haveany problemsinstalling or using this board,
contactou TechnicalSupportDepartnent,(814) 234-8087,during regularbusinesshours,easternstandardtime or
easterndaylight time, or senda FAX requestingassistanceto (814) 234-5218.When sendinga FAX request,please
include your company'snarneandaddress,your name,your telephonenumber,and a brief descriptionof the
problem.
CHAPTER 1
BOARDSETTINGS
The AD510 boardhasjumperandswitchsettingsyou can
changeif necessaryfor your application.The boardis factoryconfiguredwith the mostoftenusedsettings.The factorysettings
arelistedandshownon a diagramin the beginningof this chapter.
Shouldyou needto changethesesettings,usetheseeasy-to-follow
instructionsbeforeyou install the boardin your computer.
Also notethatby installingresistorsat two locationson the
gain
board,R9 andR10,you canincreasetheprogrammable
settingsof x10 andx100to anyvaluesyou choose.The procedure
for customizingthe gainis describedat the endof this chapter.
Factory-ConfiguredSwitchand Jumper Settings
Table1-1lists thefactorysettingsof the user-configurable
switchandjumperson the AD510 board.Figure1-l
showsthe boardlayout and the locationsof the factory-setjumpers.The following paragraphsexplain how to
changethe factory senings.
Table1-1- FactorySettings
Swltch/
Jumper
FunctionControlled
FactorySettlng
300 hex(768decimal)
P2
Setsthe baseaddress
P3
Connects
theA/Dend-ofconvert
signalto an
interrupt
Disabled(notconnected)
channel
P5
Connedsan externaltriggerfor simultaneous
triggering
of cascadedboards
Disabled(notconnected)
sl
Setsthe Ay'Dconversionrate
7.5Hz
l'-l
n
E
0
,.0
'l
\r
R..iim. D.vrc.., im.
fHj----'lF3
Strt.Co[.9..pr.16804 ^lEloooool
Effi
lcelr675/
L.eI-eJ
M.d. in U.Sl.
P'l
A3l
Cr2
ADs10 O.O
Ctt
DATA ACQUISIT|ON& CONTROL SYSTEM
Fig.1-1- BoardLayoutShowingFactory-Configured
Settings
El - BaseAddress(Factory Setting:200 hex (512decimal))
One of the most commoncausesof failure when you are first trying your boardis addresscontention.Someof
your computer'sI/O spaceis alreadyoccupiedby internalVO and otherperipherals.When the AD5l0 board
aBemptso useVO addresslocationsalreadyusedby anotherdevice,contentionresultsand the boarddoesnot work.
To avoidthisproblem,the AD510 hasa headerconnector,P2, which les you selectany oneof eight starting
addresses
in the computer'sVO. Shouldthe factory settingof 300 hex (768 decimal)be unsuitablefor your system,
you can selecta different baseaddress.Theseaddresses
are,from left o right on P2:
Hexadeclmal
Declmal
200
s12
240
s76
280
640
2CO
704
300
768
340
832
380
896
3C0
960
To changethe baseaddresssetting,removethejumper from the factory setting(300 hex) and,using Figure 1-2
asa guide,install it in the desiredlocation.Recordthe new baseaddressseuingon the table insidethe back coverof
this manual.
ooPocro
:tolrcraco
NC\|N(riTAiTCi)
P 2 t(\|
oo.o?ooo
I
ooooaooo
Fig. 1-2 -
o
o
a)
Base AddressJumper,P2
P3 - Interrupt ChannelSelection(Factory Setting: Disabled)
HeaderconnectorP3, locatednearthe bottom centerof the board,lets you connectthe AID converter'send-ofconvertsignalto any of thecomputer'sintemrptchannels,IRQ2 (highestpriority channel)throughIRQT (lowest
priority channel).Thejumperis storedacrossthe top two leftmostpins,asshownin Figure l-3. By placingthis
junper vertically acrossthe pins of one of the IRQ channels,the end-of-convertsignalcan be usedto generate
intemrps.
Before Eying to useintemrpts,you mustbe familiar with the procedurefor initializing the intemrpt vectorsand
the PC's interrupt controller,and settingup the intemrpt handlingroutines.Theseproceduresare beyondthe scope
of this manual,but mustbe understoodto effectively useintemrptsin your computersystem.
Also, be careful to avoid contentionwiilt otherdevicesthat may useintemrpts in your comput€rwhen you
chooseyour intemrpt channel.To avoid contention,usethe tableinside the backcover of this manualto recordthe
interrupt channelyou haveselected.
It is also very important to note that the boardintemrpt sourceis a TTL totem-pole(push/pull)type output; it is
not open-collector.
Therefore,do not connectthis intemrptto anyotherintenuptoutput!
HOaOO
a
G
P3
oooooo
NA:rtu)roN
Fig. 1-3 -
lntemrptChannelSelectionJumper, P3
P5 - External Trigger In (Factory Setting: Disabled)
P5, shownin Figure 1-4,enablesanddisablesthe externaluigger input When thejumper is set o the enabled
position, the externalfigger in pin (pin 10) at VO connectorP4 is connectedto the A/D converterso that two or
moreboardscanbe run synchronouslyin a "master/slave"configuration.Note ttratthis headerconnectorenables
and disablesthe rigger in only; it doesnot affect the trigger out
s"a
fr.|
'ulJ
.I
EXTTRIG
Fig. 1-4 -
51-
ExternalTriggerIn, P5
AID ConversionRate (Factory Setting: 7SHz)
DIP switch Sl, shownin Figure 1-5,configuresthe boardto perform A/D conversionsat a rateof 7.5 converper second(30 Hz). The four switchesoperateasa goup. Whenall of
sionsper second(7.5H2) or 30 conversions
the switchesare in the DOWN (closed)position,the conversionrale is 7.5 Hz This settingprovidesmaximum
rejectionof 60 Hz line noise.When all of the swirchesare in $reUP (open)position,the conversionrate is 30 IIz.
When changingthe settings,makesureALL FOUR swirchesare set to the sameposition.
Note that the boardhasbeenfactory-calibratedfor a7 .5Ilz rate.If you changethe rate, you may needto
recalibratethe board.Chapter5, Calibration, explainstheprocedures.
TTT!
30HZ
7.5H2
sl
Fig.1-5-A/D Conversion
RateSwitch,51
l-5
Changingthe ProgrammableGain Settings
The AD510 board hasprogrammablegainsof 1, 10,and 100.For evengeater gain flexibility, two empty
resistorlocationsareprovidedon your boardso that you can selectthe gain valuesyou want. You can set the xlO
gaininput to any valuegreater than xl0, andthex100gaininput to any valuegreater than 100.Note thatthe
ResistorR9 controlsthe x10 input and
gainscan only be increasedftom their basevalues;they cannotbe decreased.
shouldbe used0ocovergainsfrom l0 o 99. ResistorRlOcontrolsthexl00 input andshouldbe usedto setgainsof
$eater than 100.Figure 16 showshow ttreseresistorsareconnectedto the PGA. The formulaswill help you find
the correctresistancevalue for your desiredgain. Note that ttre further you get from thePGA's setgainsof l0 and
100,the more gain drift you will have,which cancauseerors in your readings.
R9= [10.8KrY(Desired
Gain- 10)]
Vnt
Vr'rz
Vour
R10= [108](Y(Desired
Gain- 100]
Values
Gain/Reslstance
Galn
R9 Value
Gain
R10Value
20
1.08KO
200
1.08KO
30
540Q
300
540cl
40
36ocl
400
36oct
50
270Q
500
270A
Fig.1-6- Controlling
the Programmable
Gains
t-6
CHAPTER 2
BOARDINSTALLATION
The AD510 boardis easyto installin your IBM PCIXT/AT or
compatiblecomputer.It can be placedin any slot, shortor fullhow to install andconnect
size.This chaptertells you step-by-step
the board.
Board Installation
Keepthe boardin its antistaticbag until you arereadyto install it in your computer.When removingit from ttre
bag,hold the boardat the edgesand do not touchthe componentsor connectors.
Beforeinstalling the boardin your computer,checkthejumper settings.ChapterI reviewsthe factory settings
and how to changethem.If you need!o changeany settings,refer to the appropriateinstructionsin Chapterl. Note
that incompatiblejumper settingscanresult in unpredictableboardoperationandenatic response.
To install theboard:
l. Turn OFF the power to your computer.
2. Removethe top coverof the computerhousing(refer to your owner's manualif you do not alreadyknow
how to do this).
4. Selectany unusedshortor full-size expansionslot andremovethe slot bracket.
5. Touch the metalhousingof the comput€r!o discharyeany staticbuildup and thenremove0reboardfrom its
antistaticbag.
6. Holding theboard by is edges,orient it so that its cardedgeOus) connectorlines up with the expansionslot
conn@torin the bouom of the selectedexpansionslol
7. After carefully positioningthe boardin the expansionslot so that the card edgeconnectoris restingon the
computer'sbusconnector,gently and evenlypressdown on the boarduntil it is securedin the slot.
NOTE: Do not force the boardinto the slot. If the boarddoesnot slide into place,removeit and ry again.
Wiggling the boardor exertingtoo muchpressue canresult in damageto the bmrd or to the computer.
8. After the boardis installed,securethe slot bracketback into placeandput the coverback on your computer.
The boardis now readyto be connectedvia the externalVO connectorat therear panelof your computer.
ExternalVO Connections
Figure2-l showsthe AD510'sP4 VO connectorpinout.Refero this diagramasyou makeyour VO connections.
AIIALOO OND
lt.c,
aD€
AINT
A|t{6
AIN5
AIIALOO OND
AIN,.
AIN3
AIN2
AINI
A'IALOG CND
N.C.
il.c,
8raTu9
tilccEn ow
oto|ltl
oNo
DIOITAL GND
tilOOEh llr
orotTAL ot{D
tct
PCt
PC5
?4
N.C.
t|.C,
N,C.
2a7
Ptt
Pa6
P33
N.C,
RESET DNV
Paa
N.C.
r12 VOLTS
.12 YOLTS
N.C.
+5 YOLTS
Dtcr"at oxD
Fig.2-1- P4yOConnector
PinAssignments
2-3
Connectingthe Analog Input Pins
Connectthe high sideof eachanaloginput to oneof theanaloginput channels,AIN1 throughAIN8, and
conn@tthelow sideto anyoneof thethreeANALOG GND signals(P4-1,7, or 12).Figure2-2 showshow these
connectionsare made.
NOTE: It is goodpracticeto connectall unusedchannelsto ANALOG GND, asshownwith channel8 in the
diagrambelow. Failure to do so may affect the accuracyof your conversionresults.
510
I/O CONNECTOR
P'
I
I
I
a
a
o
PIN 3
I lprruz'
. \OU CANCONNECT
THEGROUND
SIGNALS
TO ANYANALOG
GNOPIN
( 1 , 7 ,O R 1 2 )
!v
Fig.2-2 - Analog lnput Conneclion
Connectingthe Digital VO Pins
For all digital VO connections,PB3-7and PC4-7,the high sideof an extemalsignalsourceor destination
deviceis connectedto the appropriatesignalpin on the VO connector,and the low side is connectedto any DIGITAL GND.
Connectingthe Trigger In and Trigger Out Pins
The AD510boardhasan externalniggerinput @4-19)andoutput(P4-17)so thattwo or moreboardscanbe
cascadedandrun syrchronouslyin a "master/slave"configuration.By cascadingtwo (or more)boardsas shownin
Figure2-3,they canbe triggeredto startan A/D conversionat exactlythesametime.
Connectingthe StatusPin
The STATUS ouput canbe connectedto an externalcircuit which monitorsthe statusof the A/D converter.
Connectingthe ResetDrv Pin
The RESETDRV pin canbe usedto connecttheRESETsignalgeneratedby the PC o externalcircuitry.
2-4
510
I/O CONNECTOR
P4
B O A R O, 1
(MASTER)
T R I G G E RO U T
B O A R D1 2
(SLAVE)
TBIGGEF IN
Fig.2-3- Cascading
TwoBoards
forSimultaneous
Sampling
CHAPTER 3
HARDWARE DESCRIPTION
This chapterdescribesthefeaturesof the AD510 hardware.
The major circuits are the A/D andthe programmableperipheral
interfacewhich includesthe digital VO lines.Boardintemrptsare
alsodescribedin this chapter.
The AD510 boardhasnvo major circuits, the AID and theprogrammableperipheralinterface(PPI) which
includesthe digital VO lines. Figure 3-1 showsthe block diagramof the board.This chapterdescribeshardware
which makesup the majorcircuits.It alsodiscusses
intemrpts.
Fig.3-1 - AD510BlockDiagram
A/D Conversion Circuitry
The AD510 boardperformsanalog-to-digitalconversionson up to eight analoginput channels.The following
paragraphsdescribethe A/D circuitry.
Analog Inputs
Ttre analoginput rangeis -5 to +5 vols for a gain of l. Gain is usedto matchthe input voltagelevels being
measuredas closely aspossiblewith the board'sinput voltagerange.For analoginputs rangingbeween +500
millivolts, a gain of 10canbe used;andfor analoginputsrangingbenveen+50 millivolts, a gainof 100canbe used.
In addition,thex10 andxl00 gainscanbe increasedto any desiredvalueasdescribedat theendofChapterl.
Becauseit reducesthe input voltagerange,increasingthe gain alsoincreasesthe resolutionof the conversion.For
example,whenthegainis setto 100,voltagechangesof 13microvoltsarereflectedin the digitizeddata.Although
overvoltageprotectionto 135 volts is providedat the input, you mustbe careful,especiallywhen using the gains,
not to connectexcessiveinput voltages!o the board.
Eight single-endedanaloginput channelsareavailableon the AD510 board.The channelsare connectedto the
A/D converterthrougha Harris 508A multiplexer.The activechannelis selectedthroughsoftware,asdescribedin
Chapter4.
3-3
A"/DConverter
The dual slopeintegratingA/D converterperformsconversionsat a rate of either 7.5 or 30 timesper second,
dependingon the settingof DIP switchS1.Theoulputis a l2-bit dataword plusa signbit which tells you whether
the digital valuerepresentsa positive or a negativevoltage.
The convertersamplesthe input voltageover a window of time beforeperformingthe conversion.The converter measuresthe time requiredo chargeand dischargea capacitor.A counterand a referencein the AID chip
determinethe integrationperiod. Becausethe input signalis sampledfor a specifiedperiod insteadof being instantaneouslycapnred by a sample-and-hold
device,spikesandglitcheswhich may be presentat the input are averaged
ouL Theresultis a highly accura8e
conversion.
ProgrammablePeripheral Interface
The programmableperipheralinterface@PI) is usedfor digiral VO functions.This high-performanceTTL/
CMOS compatiblechip has24 drgitalVO lines divided into two groupsof 12 lines each:
Group A - port A (8 lines) andport C upper(4 lines);
Group B - port B (8 lines) andport C lower (4 lines).
Fifteenlinesareusedfor on-boardfunctions.Put A's eightlinesareusedo readthe 8-bit MSB andLSB
ouQutsfrom the A,/Dconverter.Port B's lower lhreelines areusedo control the channelselection.Port C's lower
four lines areused!o control the gain selectionand the A/D converter.The nine remaininglines in the groups,port
B, bits 3 through8, and port C ,tppet,are availablefor your use.Chapter4 explainshow you cancontrol theselines.
Interrupts
The AD510 boardprovidesan end-of-convertintemlpt signalwhich can be used0ointemrpt the computerwhen
an A/D conversionis completed.This signalis the inverseof the statussignalgeneratedby the A/D converterand
canbe connectedto any oneof intemrpt lines tRQ2 throughIRQT by an on-boardjumper installedon header
connectorP3. The boardis shippedwith the intemrpt signaldisabled.If you connectthe end-of-convertto one of the
intemrpt channels,an intemrpt will occurwhen the line nansitionsfrom low (converting)to high (not converting).
We recommendthat you havean understandingof how to useintemrptsin your systembeforeyou connectthe endof-convertto an IRQ channel.
34
CHAPTER 4
BOARDOPERATIONAND PROGRAMMING
This chapterdescribesthe operatingmodesandprovidesflow
diagramsanda completedescriptionof the VO mapto aid you in
programmingyour AD510 board.The exampleprogramsincluded
on the disk in your boardpackagearelisted at the end of this
chapter.Theseprograms,writtenin BASIC, TurboPascal,and
Turbo C, include sourcecodeto simplify your applicationsprogramming.
4-l
A/D Conversions
Beforeyou arereadyto starttaking A/D conversions,you mustinitialize the programmableperipheralinterface
@PI), setthe gain, and selectthe channel(whenyou initialize the PPI, the gain and channelareautomaticallysetto
1). The softwareprovidedwittt your boardcontainsexampleprogramsfor boardinitialization.
You can monitor the conversionstanrsusing the statusbit at VO addresslocation BA + 4. When bit 0 of this
word goeshigh, it meansa conversionis in progress.When it goeslow, the conversionis completed.When you are
monitoring the statusline, makesureyou seeit go high andthen low beforeyou assumethe conversionis completed.This line doesnot go high until slightly after the StartConvertline startsa conversion,which meansthat you
could reada falselow when the conversionfirst begins.(Rememberthat the statussignalis invertedto derive the
end-of-convertsignalwhich canbe monitoredthroughan IR'Qline. The endof-convert line is low during a conversion andgoeshigh when the conversionis completed.)
Initiatizing the PPI
Severalof the lines of thePPI confrol the A/D converter,selectthe channel,and setthe programmablegain. The
15 lines which are usedduring AID conversionarethe eight lines of port A (PA0 throughPA7), the threelower
lines of port B (PB0 throughPB2), and the four lower lines of port C (PC0throughPC3).Port A's eight lines are
usedto carry the converteddata.This datais output from the A,/Dconverterin two 8-bit words,an MSB andan
LSB. The threelower lines of port B are usedto selectthe channel.The four lines of port C lower are usedto control
the gain selectionand AID conversion.Figure 4-l showshow the PPI interfaceswith the converter,multiplexer,and
programmablegain amplifier.
To settheselines up so that you cancontrol the gain and channelselectand take A/D conversions,the PPI must
be initialized wheneveryou power up or resetyour system.This is doneby writing daa to the PPI control word at
I/O addresslocation BA + 3. The VO mapis definedlater in this chapter.The PPI mustbe setup like this:
D7
D6
D5
D3
D4
D2
D1
DO
X = USerdefined(seeBA+ 3 registerdefinition
laterin thischapter)
EXT
TRIGGER
IN
8255PPt
PBO.PB2
CHANNELSELECT
MUX
A/D CONVERTER
PORTA
(8 BrTS)
PORTB
PB3-7
(5 B|TS)
PC2
POFTC
PU-7
(4 B|TS)
RIVHLD
HBEN
LBEN
OIGITAL
OUT
OIGIITL
t/o
PC3
__A
ecoI cnrn
PC1J sELEcr
STATTJS
)*^
F
STATUS
OUT
Fig.4-1- PPIInterconnect
Diagram
4-3
Selectingthe Channel
You can select0reactivechannelby writing o lines PBO,PBl, andPB2 of port B, I/O addresslocation BA + l .
When you initialize the PPI, the channelselectis auomatically setto 1. The channelselectsettingsare:
AINl
PB2
0
PB1
0
PBO
0
AIN2
0
0
1
AIN3
AIN4
AIN5
0
0
1
0
1
0
AIN6
1
1
0
0
AINT
1
1
0
AINs
1
1
1
Channel
I
1
Note that when you write to port B to changettrechannelselection,you mustpreservethe other five bits of data
@83 throughPB7) as you had them if you want thoseseuingsto be unchanged.You can do this by first readingthe
port B dataand thenANDing its contentswith hex F8 (decimal248).This resetsPB0-2 while preservingPB3-8.
Then,OR this result with the desiredchannel(PB3-8mustbe 0 in your channelselectworO and write the result
back to port B (BA + 1). The exampleprogramsshowyou how 0odo this.
Settingthe Gain
You can set the gain by writing to lines PCOandPCI of port C, ICI addresslocation BA + 2. When you
initialize the PPI, the gain is auomatically setto l. The gain control settingsare:
Galn
x1
x10
x100
lnvalid
PC1
0
1
0
1
PC0
0
0
1
1
Note that when you write to port C to changethe gain setting,you must preservethe other six bits of data(PC2
ttrough PC7) as you had themif you want thoseseuingsto be unchanged.
Thereis a way to individually setand resetthe lines of port C by writing the correctdatato the control word at
addresslocation BA + 3. For example,you can individually set(to logic l) or reset(o logic 0) PCOandPCl by
writing two setsof datato the control word (not o port C!) as shownin Figure4-2. This exampleshowshow to set
the gain to 100.When the most significantbit, D7, of the control word is set to 0, it activaes the bit set/reset
function which lets you individually setor resetany one of port C's bits:
44
Sets PCOto 1:
(writtento BA +3)
Bit Select
000= PGO
SeVReset
FunctlonBlt
Set PCO
0
Sets PCI to 0:
(writtento BA+ 3)
SeVReset
Functlon Blt
Blt Select
991= pC1
ResetPCl
Fig.4-2- Setting
theGainto 100UsingBitSeUReset
Function
A"/DConversionModes
The A/D convert€rcanperform conversionsin rwo modes,SingleConvertandContirupus Convert.The board
is typicallyusedin theContinuausConvertmode.
Two lines from PPI port C, PC2and PC3, areusedto control the conversions.Theselines canbe setby writing
to PPI port C (BA + 2) or by using the singlebit set/resetfunction describedin the previoussection,Settingthe
Gain, andunderBA + 3 in theDefining theIIO Map secion later in this chapter.PC2 controlsthe StartConvert
function. WheneverPC2 is high, conversionscanbe stafted.PC3 determineswhich byte of the converteddata,tlre
MSB or the LSB, is to be readat PPI port A. WhenPC3 is low, the MSB is read;when it is high, the LSB is read.
For eachconversion,the MSB is typically readfirst, followed by theLSB.
. SingleConvert Mode
The Slzgle Convertmodelets you perform a singleA/D conversioneachtime you pulsethe Sart Convertline,
PC2,high. Figure 4-3 showsthe timing diagramfor this mode,andFigwe 44 providesa flow diagram.
Start
Convert
Done
I
PC2
lt
Status -+
Stalus= Converting
PC3
Read Data
MSB
LSB
Fig. 4-3 - SingleConvertMode Timing Diagram
4-5
Program8255PPI:
PortA in, PortsB & C-Lowout
StartConversion
PC2=1
CheckStatus
Status= 1?
StopConversion
PC2=0
CheckStatus
Status= 0?
Set PG3= 0
to enableMSB
ReadPPlPortA
for MSB
Set PC3= 1
to enableLSB
ReadPPIPoftA
for LSB
StopProgram
Fig.4-4- SingleConvertModeFlowDiagram
. ContinuousConvert Mode
The Contimous Convertmodelets you perform continuousA/D conversionsby keepingtlre StartConvertline,
PC2, high. Figure 4-5 showsthe timing diagramfor this mode,andFigure 4-6 providesa flow diagram.
Start
Convert
PC3
ReadData
MSB
Fig. 4-5 -
LSB
ContinuousConvertMode Timing Diagram
. CascadingBoards
Two or moreboardscan be cascadedand riggered so that A,/Dconversionsareperformedsimultaneouslyon
eachboard.Figure 4-7 providesa flow diagramfor cascadedoperation.Chapter2 showshow to connectthe boards
for simultaneoustriggering.
DigitalVO
The programmableperipheralinterfacehas24 digital VO lines, nine of which are availablefor your use.The 24
lines aredivided ino three8-bit ports,port A (PA0-7), port B (PB0-7),andport C. Port C is further subdividedinto
port C lower (PC0-3)andport C upper(PC4-7).PortA, the threelowestbits of port B, and port C lower arealready
usedby the board for A/D conversion,channelselection,and gain control. The rest of the port B bits (PB3 through
PB8) andport C uppercanbe usedin ttris PPI operatingmodeonly:
Mode 0 - Basic inpuVoutput.Irts you usesimpleinput and outputoperationsfor a port. Data is written to or
readfrom the specifiedport. Port B canbe usedasan outputport only.
NOTE: If you know aboutthe operationof the 8255PPI orread the includeddatasheet,thenyou may also
know that a two other modes,mode I (strobedinput/output)andmode2 (srobed bidirectionalinput/output),exist
for the chip. However,sincethesemodesrequirethe useof port C lower or port A, they are not availableon the
AD510 board.
The PPI is configuredby writing a contnolword to is internalregisterat VO addresslocation BA + 3. Sevenof
the eight bits in the control word are alreadydefinedby boardinitialization requirements.The remainingbit, bit 3,
configuresport C upperas an input or outputporL Seethe sectionon Defining theIIO Maplater in this chapterfor a
completedefinition of the PPI control word andports A, B, and C datawords.Seethe 8255PPI datasheetin
Appendix C for moreoperationalinformation.
Interrupts
The A/D converterstatussignal is invertedandsentto headerconnectorP3 as an end-of-convertsignalwhereit
signalis low wheneveran
canbejumperedto oneof six intemrptchannels,IRQ2 throughIRQ7.The end-of-convert
(ogic
progress.
is
in
When
the
signal
high
1)
intemrpt
is sentto the
A/D conversion
ransitions o a
state,an
it
is
Your
intemrpt
boardis shippedwith the
disabled.
computertelling that the conversion completed.
4-7
Program8255PPI:
PortA in, PortsB & C-Lowout
CheckStatus
Status= 1?
CheckStatus
Status- 0?
Set PC3= 0
to enableMSB
ReadPPIPortA
lor MSB
Set PC3= 1
to enableLSB
ReadPPIPortA
for LSB
SlopConversion
PC2=0
Fig.4-6- Continuous
ModeFlowDiagram
Convert
BOARDS1 & 2
Program8255PPI:
PortA in, PortsB & C-Lowout
BOARDS1 & 2
CheckStatus
g1s1us= 1?
CheckStatus
Status= 0?
Set PC3 = 0
to enableMSB
Set PC3 = 0
to enableMSB
Set PC3 = 1
to enableLSB
Sel PC3 = 1
to enableLSB
Fig.4-7- CascadedBoards,SingleConvertModeFlowDiagram
Defining the VO Map
asBA) canbe selectedby
The I/O mapfor the AD510 is shownin Table4-1. Thebaseaddrcss(designated
Oneof eightstartingaddresslocationscanbe
settingthejumperon P2, asdescribedin Chapterl, Board Seuings.
selecred.The boardis shippedwith the baseaddresssetat 300 hex (768 decimal).The following sectionsdescribe
theregistercontentsof eachaddressusedin the VO map.
Table4-1- AD510l/OMap
WriteFunction
REadFunction
ReglsterDescription
Read A/D converted data,
MSB & LSB
PPIPortA (ReadData)
Address'
(Declmal)
B A +0
Readselectedchannel(bits
Select 0-2only)
PPIPortB/Channel
Notused
Program5 digitaloutput
lines
andselectedchannel
PPIPortC (PC0-3are
reservsdfor control)
ReadPC4-PC7digitalinput
lines
control
ProgramPCO-PC3
lines& PC4-PC7
digital
outputlines
BA+2
PPlControlWord
ReadPPIcontrolsettings
ProgramPPIconfiguration
BA+3
Status
' BA = BaseAddress
ReadA/D converterstatus
Notused
BA+4
BA+1
BA + 0: PPI Port A - Read A/D Data (ReadOnly)
This addressis usedo readthe MSB andLSB of the A/D conversion,asdefinedbelow. When PC3 of the PPI
port C word is 0, theMSB is read;whenPC3is 1, theLSB is read.Bit 7 of theMSB tells you whethertheconverted
voltageis a positive or negativevalue.Bit 6 goesto 1 when the input voltageexceedsthe input voltagerange.The
tablebelow showsthe expectodconverteddatafor maximumpositiveand negativeinput voltagesand for 0 volts.
MSB
D7
D6
Fle
PolarityFlag
0 = positive
1 = negative
LSB
D5
D4
x
x
D3
D2
D1
DO
Bir11 Bh10 Birg
BirS
OverrangeFlag
0 = in range
1 = oUtof range
D7
D6
D5
D4
D3
D2
D1
DO
Bit 7
Bir6
Bir5
Bir4
Bir3
Bit 2
Bit 1
Bit 0
PolarltyFlag
ConvertedData(12blts)
0
1 1 1 1 1 1 1 11 1 1 1
+4.99878volts
't
1 1 1 1 1 1 1 11 1 1 1
4.99878volts
0
0000 0000 0000
0.0volts
4-10
Voltage
BA + 1: PPI Port B - ChannelSelect/DigitalOut (ReadAMrite)
BA + 1 prognms all eight PPI port B lines andreadsthe dataon PB0-2.PB0, PB1, and PB2, the lower three
bits, are usedto programthe multiplexerchannelselection.Five bits of digital outputdatacan be ransferred
betweenthe boardandan externaldeviceusingPB3-7.Note 0ratthis port mustbe configuredas oulput only, since
PB0-2mustbe outputlines.
A write selectsthe channelon PB0-2 and transfersthe wricen datafrom PB3-7 throughP4 to an external
device.Wheneveryou changethe channelselection,you mustbe careful to preservethe digial output line settings,
and vice versa,as necessaryfor your application.If you are writing to the channelbits and want to preservethe data
in PB3-7, you cando this by first readingthe port B dataand thenANDing its contentswith hex F8 (decimal248).
This resetsPB0-2 while preservingPB3-8.Then, OR this result with the desiredchannel(PB3-8 must be 0 in your
channelselectword) and write the databack to port B. If you arewriting to the digital oulput lines and want to
preserveyour channelsetting,you cando ttris by first readingthe port B dataand ANDing its contentswith hex 07
(decimal7). This resetsPB3-7 whilepreservingPB0-2.Then,OR this result with the daa you want to output on
PB3-7 (PB0-2 mustbe 0 in your drgrtaloutputword) andwrite the daa back to port B.
D7
D6
D5
D4
D3
OutT
Out6
Out5
Out4
Out3
D2
D1
DO
ChannelSelect
000= AlNl
001- AlN2
010= AINS
011= AlN4
100= AlN5
101= AlN6
1 1 0= A I N T
1 1 1= A I N S
BA + 2: PPI Port C - A/D Control/Digital VO (Read/Write)
BA + 2 programsall eight PPI port C lines andreadsthe dataon the port C upperlines. PCOtluough PC3 are
usedto programthe gain and !o control the AID converter.PC4 ttrough PC7 ransfer digital input and digital output
databetweenthe boardand an externaldevice.A readtransfersdatafrom the externaldevicettrough P4 andinto
PC4-7;a write transfersthe written datafrom PC4-7throughP4 o an ext€rnaldevice.
ln7
ln6
ln5
ln4
D7
D6
D5
D4
OutT
Out6
Out5
Out4
D3
D2
I
I
|
|
I
D1
DO
GainSelect
Sele
oo=xt
0 1= x 1 0
1 o= x l o o
t 1 = iinvalid
nvati
I
StartConvert
0 = no @nVert
1 = slart c€nvert
ReadA/D Data
0 = rsadMSB
1 = readLSB
4-rl
BA + 3: PPI Control Word (Read/Write)
Whenbit 7 of this word is setto l, a write programsthe PPI configurationand a readshowsthe PPI settings:
D6
07
D5
D4
D3
D2
D1
DO
-l
t-
ModeSet F."S
i
1 = aclive
!"
de Seler>t
- modet
= ffiode
= mode i
I
I
I
I
I
I
I
Port A
0 = outpul
1 = input
I
L
Port C Upper
0 = output
1 = input
I
|
|
|
|
I
i3it t
I
|
iGroupA
|
Portc
t C Lower
O = output
oul
1 = iinput
nP
Port B
0 = output
1 = input
I
|
|
I
ModeSelect
0=mode0
1=mode1
-oyl-tl
J
l---.
Whenbit 7 of this word is setto 0, a write canbe usedto individually prognm ttreport C lines:
D7
D6
D5
D4
D3
SeVReset
FunctionBit
0 = aclive
D2
D1
Blt Select
000= Pco
001= Pc1
010= Pc2
0 1 1= P C 3
100= Pc4
101= PCs
110=PC6
1 1 1= P C 7
4-r2
DO
Blt SeUBeset
Sel
0=S€
et b i t t o 0
1=setbittol
BA + 4: Status(ReadOnly)
A readprovidesttre.{/D converterstatusbit definedbelow. Whenyou starta conversion,the sbnrs line goes
high. After the line goeshigh, then watchfor it to go low, signalingtlrat the conversionis complete.
A/D Status
0 = hotconverting
1 = converting
ExamplePrograms
The softwareincludedwittr your AD5l0 boardcontainsexampleprogrcmsin BASIC, Turbo Pascal,andTurbo
C to help you get startcdusing 0reboard.Sourcecodeis also included.
TheAD5l0 boardis easilyprogrammedftom any highJevellanguage'sVO referenceinstructions.In BASIC,
theseinsEuctionsare INP and OUT; in Turbo Pascal,they areport and port; and in Turbo C, they areinportb and
oulportb.
Before using the softwareincludedwith your board,makea backupcopy of the disk. You may makeasmany
backupsas you need.The exampleprogams includedon the disk are listed below.
BASIC Programs:
SCAN.BAS
GAINS.BAS
READ.BAS
MVOLTS.BAS
8-channelscanning
changingthe gain andperformingA/D conversions
performingA/Dconvenions
performingA,/Dconversions
in millivolts
Turbo PascalPrograms:
ADC.PSL
MUX.PSL
PGA.PSL
INIT.PSL
MVOLTS.PAS
AUTO.PAS
DEMO.PAS
SCAN.PAS
performinga singleA/D conversion
selectingthe analoginput channel
sefiing the gain
initializing the board
performing A/D conversionsin millivolts
autorangingthe DVM
a simple A/D conversionprogram
8-channelscanning
Turbo C Programs:
MUX.H
INIT.H
ADC.H
PGA.H
READ.C
MVOLTS.C
scAN.c
SIMPLE.C
selectingthe analoginput channel
inilielizing ttteboard
performinga singleA,tDconversion
settingthe gain
performing AID convenions
performing A,/Dconversionsin millivolts
8-channelscanning
a simpleAID conversionprogram
Lexicon Test and DiagnosticsTool
An interactivedatacollection and plotting utility program,Irxicon, is providedasa testand diagnostics!ool.
This programis describedin Appendix D.
4-r3
4-t4
CHAPTER 5
CALIBRATION
This chaptertells you how to calibratethe AD510 usingthe
four trimpots on ttreboard.Thesetrimpotscalibratethe A/D input
voltagerangeand gain. Calibrationmay be requiredif you change
the A/D conversionratefrom 7.5 to 30H2, or wheneveryou
suspectinaccuratereadings.
5-1
This chaptertells you how to calibratethe AID convertergain and input voltagerange.The offset and full-scale
performance
for operationat1 .5I1z.If you changethe conversion
of theboard'sA/D converteris factory-calibrated
your
you
you
Any
rate,
may needto recalibrate
board.
time
suspectinaccuratereadings,you can checkthe accuracy
your
procedure
below,andmakeadjustsasnecessary.
of
conversions
usingthe
Calibrationis donewith the boardinstalledin your PC. You canaccessthe trimpots with the computer'scover
removed.Powerup the computerandlet the boardcircuitry sabilize for 15 minutesbeforeyou stafi calibrating.
RequiredEquipment
The following equipmentis requiredfor calibration:
. PrecisionVoltage Source:0 to +5 volts
. Digital Voltmeter:5-12 digits
. Small Screwdriver(for trimpot adjustment)
A voltagesourcecanbe madeusinga 9-volt batteryanda precisionlGtum rimpot asshownin Figure5-1.
9 VOLTS
+
V = 0-6volts
i
Fig.5-1- Adjustable
VottageSource
Figure5-2showstheboardlayout.Thefourtrimpotsusedfor calibrationareshaded
in theupperrightareaof
theboard.
A/D Calibration
youwill makeconnections
Duringthisprocedure,
io theanaloginputat externalVOconnector
P4.Thepin
assignments
for P4aregivenin AppendixB.
Two adjusunents
aremadeto calibratetheAID converter.
Oneis theoffsetadjustment"
andtheotheris thefullTrimpotsTR2throughTR4 adjusttheoffset,andTRl adjustthefull-scalevoltage.
scaleadjusunent.
OffsetAdjusfinent
Theoffsetadjustment
componsatss
for theinherent
gainamplifrer.
offsetoutputvoltageof theprogrammable
Threeadjustments
mustmade,onefor eachgainsetting.
5-3
fi"b;il'"il-'il*l
,00
F"u'nun
ufqr!F,;
*effile*m
u6
'050-0
EFi-rnrc
.;fi_
'l
S-t.t.Coll.9.,Pr.l680a ^16loooool
Mr(h ln U.Sl.
Crz
Effi
lceLl675/
\-/
Ls-sJ
Pl
AD510 O.Cl
Cfi
DATA ACOU|S|T|ON& CONTROL SYSTEM
A3l
Fig.5-2- BoardLayout
Trimpots
Showing
Calibration
To adjusttheoffseteror, connect0 vols to analoginputchannelAIN1 (thiscanbe doneby simplyconnecting
the analoginput to ground).Setthe gain to 1, and startcontinuousA,/Dconversions.Adjust trimpot TR2 until the
conversionoutputis zero.Thenchangethe gain o 10andrepeattheconversionprocess,adjustingTR3 until the
conversionoutput is zero.Finally, changethe gain to 100,andrepeattheprocedure,this time adjustingTR4 until the
outputis zero.
is summarized
below:
The trimpotassignment
Galn
PC1
Setting
PC0
Settlng
Trlmpot
x1
0
0
TR2
x10
1
0
TR3
x100
0
1
TR4
The offset volage is relatedsolely o the performanceof theprogrammablegain amplifie4 however,the offset
canaffect the rollover performanceof the A/D converterif it is not setto zero.Rollover is the differencein conversionresultsbetweenvolages havingthe sameamplitudebut differentpolarities.Any gainswhich do not havea zero
offsetwill give readingsthatareshiftedfrom an idealzeroreference.This meansthat thepositiveandnegative
readingsfor the samevoltagewill be slightlydifferent.This differenceis causedby theoffset.
54
Full-ScaleAdjustment
The full-scale adjusunentcalibratesthereferencevoltageusedby the A/D converterto compensatefor ttre
analoginput circuitry.
Setthe gain to 1, the channelselectto AINI, andstartcontinuousA/D conversionsand display the conversion
results.Apply the voltagesourceto AIN1 and adjustit so that it reads4.982 volts (4998.2millivolts) (seeTable
5-1). Adjust trimpot TR1 until the conversiondataflicken betweenall ls and0 in the leastsignificantbit place
(hexadecimalFFF andFFE). Changethe gain to 10,andrepeattheprocedure,this time using an input voltageof
.49982volts (499.82millivolts). Finally, repeatthe procedure,changingthe gain to 100and settingthe input volrage
at .M4982volts (49.982millivolts).
Table 5-l providesa referencefor the ideal AID converterinput voltagefor eachbit weight in eachvoltage
range.The first line is the ideal full-scale(all ones)value,and eachsuccessiveline decreases
by onebit weight.
Betweenthe full-scale voltageand the next lower bit weight is the voltagevalue for full'scale minus 1-112bits. Note
that the volage valuesin the table arein millivols.
Table5-l - A/D ConverterCallbratlonTable
ldealInputVoltage(ln mllllvolts)
A/D Bit Welght
*5V(gain=1)
*0.5V(galn= 10)
i.05V (gain = 100)
4998.8
499.88
49.987
FS= 1-1t2LSB
4998.2
499.82
49.982
2048
2500.0
250.00
25.000
1024
12s0.0
125.00
12.500
sl2
625.00
62.s00
6.2500
2s6
312.s0
31.2s0
3.12s0
128
156.250
15.6250
1.562s
64
78.12s
7.8125
0.7813
32
39.063
3.9063
0.3906
16
19.s313
1.9s31
0.19s3
8
9.76s6
0.9766
0.0977
4
4.8828
0.4883
0.0488
2
2.4414
0.2M1
0.ozM
1
1.2207
0.1221
0.0122
4095(FullScale)
5-5
APPENDIX A
AD51OSPECIFICATIONS
A-2
AD5L0 Characteristicsry6cat@2soc
lntertace
IBMPClXT/AT compatible
baseaddress,l/O mapped
Jumper-selectable
Jumper-selectable
interrupts
Analog lnput
8 single-ended
inputs
lnputimpedanoe..............
Gains,softwareselectable
Gainerror
Inputrange..
protection
Overvohage
Settling
lime.............
megohms
.........>10
1,10,100
max
tYP;1olo,
....O.soh,
................+5,
+0.5,or *0.05vohs
..t35 Vdc
psec,max
....................5
...........tcL7109
A/DConverter
withaulo-zero
...............Dua1
slopeintegrating
Type............
.........12
bitsplussign
Resolution
Hz,switch-seleciable
.........7.5/30
Conversion
rats..............
(gain= 1) .................
..*1 bit
Relative
accuracy
(gain= 1).................
Linearity
....................+1
bit (7.5Hz),t3 bits(30Hz)
bit
.........+1
Rollover
error............
Digital UO .............
CMOS 82Gss
(Optional NMOS 82s5)
.9 (4 inputor output,5 output)
Numberof lines
Miscellaneous
Outputs(PCbus-sourced)
Resetoutput
*12 volts
Digitalground
CurrentRequlrements
mA
........14
..9mA
mA
........7
+5 vohs
+12volts......
-12 vohs
Connector
40-pin,rightangle,shroudedheaderwithejectortabs
Size
Shortslot-3.875"H x 5.25"W(99mmx 134mm)
A-3
A-4
APPENDIXB
CONNECTORPIN ASSIGNMENTS
ANALOGGND
N.C.
AINS
AINT
AIN6
AIN5
ANALOGGND
AIN4
AIN3
AIN2
AINl
ANALOGGND
N.C.
N.C.
STATU9
DIGITALGNO
TRIGGEROUT
DIG]TALGI.ID
TRIGGERllt
DIGITAI GND
PC7
PC6
PC5
PC4
N.C.
N.C.
N.C.
RESETDRV
PB7
PB6
PB5
P84
P83
N.C.
N.C.
N.C.
+12 VOLTS
.12 voLTs
+5 VOLTS
D]GITALGND
g Connector
ADs L0 P4 Connector/lVlatin
Manufacturer
AD510P4 Connector
P4 Mating Connector
Fujisu
3M
Robinson
Nugent
MrL C-83503
FCN-705Q040-AUA4
[email protected]/B
3417-7M0
IDS.C4OPK.C-SR.TG
M83s0317-c9
B-3
APPENDIX C
COMPONENTDATASHEETS
Peripherallnterface
lntel82C55AProgrammable
DataSheetReprint
intel'
82C55A
INTERFACE
PERIPHERAL
CHMOSPROGRAMMABLE
r Control Word Read-BackCapability
r Direct Bit Set/ResetCaPabilitY
. 2.5 mA DC DriveCapabilityon all llO
Port Outputs
r AvailableIn 40-PinDIPand 44-PinPLCC
r Availablein EXPRESS
- StandardTemPerature
Range
- ExtendedTemPeratureRange
r Compatiblewith all Intel and Most
Other Microprocessors
r High Speed,"Zero Walt State"
Operationwith 8 MHz8086/88and
80186/188
l/O Plns
a 24 Programmable
I Low PoweTCHMOS
r CompletelyTTL ComPatible
CHMOSversionof the industrystandard8255A generalpurpose
The Intel 82C55Ais a high-performance,
lt provides
programmablel/O devicJwnicnis designedfor usewith all Inteland most othermicroprocessors.
modes
of
operation.
3
major
in
groups
used
programmed
of 12 and
in 2
ZA itO pins which may be individually
8255A'5'
NMOS
8255A
and
pin
the
compatiblewith
The 82C55Ais
ln MODE 0, each group of 12 llo pins may be programmedin sets of 4 and 8 to be inputsor outputs'In
to have8 linesof inputor output.3 of the remaining4 pinsare used
MODE1, each groupmay be programmed
bus configuration'
for handshafinf anOintenuptcontrolsignals.MODE2 is a strobedbi-directional
The 82C55Ais fabricatedon Intel'sadvancedCHMOSlll technologywhich provideslow powerconsumption
w1h performanceequal to or greaterthan the equivalentNMOS product.The 82C55Ais availablein 40'pin
DIP and 44-pinplasticleadedchip carrier(PLCC)packages.
r a3 i ! . r r i 3 3 3 r l
rfsfl
00
D'
02
l0
PC7
t!
rc
t2
0!
xc
D4
PC6
FCs
ta
06
FC,.
m
t6
PCI
It
QP€iE9i*FEF
I.GCrtuUr.S
-
'tlcssA
231256-1
Flgure1.82C55ABlockDlagram
231256'2
Flgure2.82C55APinout
Diagramsare lor Finrofer€[email protected]
siz€s are not to scal€.
3-124
S.Ptcmb.r tg67
OrdorNumb.n 23125H)Oa
82C554
Table1.PlnDescrlptlon
Symbol
PAs-o
FE
G
GND
At-o
Pln l{umber
Dlp
PLCC
1-4
2-5
Typc
vo
Nameand Functlon
POBTA,PINS0-3: Lowernibbleof an8-bitdataoutputtatch/
butferandan 8-bitdatainputlatch.
5
6
READCONTRO|:Thisinputis low duringCPUread operations.
6
7
7
I
8-9
9-10
CHIPSELECT:
A lowon thisinputenables
the82C55Ato
respondto FD andWF signals.FiDandWRareignored
otherwise.
SystemGround
ADDRESS:
Theseinputsignals,
in conjunction
ffi andWF[,
controltheselectionof oneof thethreeportsor thecontrol
wordregisters.
m
A1
Aq
0
0
0
1
0
1
1
0
0
0
0
0
0
0
WF 6
1
0
0
0
1
0
1
0
1
1
0
0
0
1
0
1
0
0
1
1
1
0
0
X
X
X
X
X
1
X
1
1
0
1
1
1
Input Operatlon (Read)
PorlA-DataBus
PortB-DataBus
PortC-DataBus
- DataBus
ControlWord
OutputOperatlon(Wrlte)
DataBus- PortA
DataBus- PortB
DataBus- PortC
!
DataBus- Control
DlsableFunction
DataBus-3-State
DataBus-3-State
PCz-l
1 0 -1 3 1 1 , 1 3 - 1 5
vo
PORTC, PINS4-7: Uppernibbleol an 8-bitdataoutputtatch/
butferand an 8-bitdatainputbuffer(no latchfor input).This port
can be dividedintotwo 4.bitportsunderthe modecontrol.Each
4-bit port containsa 4-bitlatch and it can be used for the control
signaloutputsand statussignalinputsin conjunctionwith ports
A and B.
PCo-s
PBo-z
14-17
16-19
PORTC, PINS0-3: Lowernibbleof PortC.
18-25
tlo
tlo
RESET
35
20-22,
24-28
29
30-33,
35-38
39
WR
36
40
37-40
41 -44
vcc
Dz-o
PAt-a
NC
26
27-34
1,',|.z,
PORTB, PINS0-7: An 8-bitdataoutputtatch/bufferand an Bbit data inputbuffer.
SYSTEMPOWER:* 5V PowerSupply.
tlo
DATA BUS:Bi-directional,
tri-statedatabus lines,connectedto
systemdata bus.
RESET:A highon thisinputclearsthe controlregisterand all
portsare set to the inputmode.
WRITECONTROI-:Thisinputis low duringCPUwrite
operations.
vo
PORTA, PINS4-7: Uppernibbleof an 8-bitdataoutputlatch/
butferand an 8-bitdatainputfatch.
NoConnect
23,34
3-125
intet
82C554
DESCRIPTION
82C55AFUNCTIONAL
General
peripheral
interface
The82C55Ais a programmable
sysfor usein Intelmicrocomputer
devicedesigned
tems.lts functionis that of a generalpurposel/O
peripheral
equipment
to the
componenlto interface
configumicrocomputer
systembus.Thefunctional
by the system
rationof the 82G55Ais programmed
no exlernallogicis necessoftwareso thatnormally
devicesor structures.
saryto interfaceperipheral
DataBus Buller
butleris usedto interThis3-statebidirectional8-bit
face the 82C55Ato the syslemdata bus. Datais
bythebufferuponexecution
transmitted
or received
by the CPU.Control
ol inputor outputinstructions
wordsand statusinformation
are also transferred
throughthe databusbuffer.
Read/Wrlteand ControlLoglc
The functionof this blockis to manageall of the
internal and externaltransfersof both Data and
Controlor Statuswords.lt acceptsinputsfromthe
CPUAddressandControlbussesandin turn.issues
to bothof the ControlGroups.
commands
GroupA and GroupB Controls
The functionalconfiguration
of each port is proln essence,
the
grammedby the systemssoftware.
The
GPU"outputs"a controlwordto the 82C55A.
suchas "mode",
controlwordcontainsinformation
the func"bit set", "bit reset",etc.,that initializes
of the 82C55A.
tionalconfiguration
Each of the Controlblocks(GroupA and GroupB)
accepts"commands"from the Read/WriteControl
Logic, receives "control words" {rom the internal
data bus and issuesthe propercommandsto its associatedports.
ControlGroupA - PortA and PortC upper(C7-C4)
ControlGroupB - PortB and PortC lower(C3-C0)
The control word registercan be both written and
read as shown in the addressdecode table in tne
pin descriptions.Figure6 shows the control word
format for both Read and Write operations.When
the controlwordis read,bit D7 will alwaysbe a logic
"1", as this impliescontrolword mode information.
Ports A, B, and C
The 82C55Acontainsthree8-bitports (A, B, and C).
All can be configuredin a wide varietyot functional
characteristicsby the systemsoflware but each has
its own specialfeaturesor "personality"to further
enhancethe powerand flexibilityof the 82C55A.
Port A. One 8-bit data outputlatch/butferand one
8-bit input latch bufler. Both "pull-up" and "pull'
down" bus hold devicesare presenton Port A.
Port B. One 8-bit data input/output latch/buffer.
Only "pull-up" bus hold devicesare presenton Porl
B.
Port C. One 8-bit data outputlatch/bufferand one
8-bit data input buffer(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 usedfor the controlsignaloutputsand status
signalinputsin conjunctionwith portsA and B. Only
"pull-up" bus hold devicesare presenton Port C.
for
See Figure4 fbr the bus-holdcircuitconfiguration
Port A, B, and C.
3-126
82C55A
tr orrtctroia!
oat^ ltE
or oc
rc
iil
reltr
231256-3
Flgure3.82C55AElockDlagramShowlngDataBusBufferandRead/WrlteControlLoglcFunctions
EXTERIIAL
POFI aC
PIN
NTERiIAL
OAIA
f,F
'NOTE:
231256-4
Pori pins loadedwith morethan 20 pF capacitancemay not havetheirlogiclevelguaranteedfollowinga hardwareres€t.
Flgure4. PortA, B, C,Bus-holdConligurailon
3-127
intef
82C55A
DESCRIPTION
82C55AOPERATIONAL
clt{Tiol
o,
Mode Selection
o.
Dr
o.
wono
DJ
DzlDr
Do
J
There are three basic modes of operationthat can
be selectedby the systemsoftware:
Mode 0 - Basicinput/output
Mode 1 - Strobedlnput/output
Bus
Mode 2 - Bi-directional
/
GRottr
\
xnt c llorEn]
l.ltatur
0. OUY?UI
Whenthe resetinputgoes"high" all portswillbe set
to the inputmodewith all 24 port linesheldat a logic
"one" level by the internalbus hold devices(see
Figure 4 Note). After the reset is removed the
82C55Acan remainin the inputmodewith no addi'
required.Thiseliminatesthe need
tionalinitialization
for pullup or pulldowndevicesin "all CMOS" de'
signs.Duringthe executionof the systemprogram,
any of the other modesmay be selectedby usinga
single output instruction.This allows a single
82C55A tc service a varietyof peripheraldevices
with a simplesoftwaremaintenanceroutine.
ionT I
l - IlfUT
0. OUTRn
IX)DI SELtCltOll
0. liloo: 0
I .ITOOEI
/
ciort ^
\
ioRl c (r.fr€n,
r . lN?Ut
O. OU'XTT
The modesfor Port A and Port B can be separately
defined,while Port C is dividedinto two portionsas
requiredby the Port A and Port B definitions.All of
the output registers,includingthe slatus flip'flops,
will be reset wheneverthe modeis changed.Modes
may be combinedso that their functionaldefinition
can be "tailored" to almost any l/O structure.For
instance;GroupB can be programmedin Mode0 to
monitorsimple switch closingsor displaycomputa'
tional results" Group A could be programmedin
Mode 1 to monitora keyboardor tape readeron an
basis.
interrupt-driven
tof,r a
I ' ti?UT
O. OUI?UI
mot 8tlfcfloil
O. I|ODEO
Ol . IIODE I
2
lx.IOl
rcoE 8:r fL/lG
t . lcflvl
23t256-6
Figure6. llode DeflnltlonFormat
The modedefinitionsand possiblemodecombinationsmayseemconfusingat firstbut attera cursory
reviewof the completedeviceoperationa simple,
Thedesignot the
willsurface.
logicall/O approach
82C55Ahastakenintoaccountthingssuchas etfivs PC
cientPCboardlayout,controlsignaldefinition
layoutand completefunctionalflexibilityto support
almostanyperipheraldevicewith no externallogic.
Such designrepresentsthe maximumuse of the
pins.
available
SlngleBlt Set/ResetFeature
Anyof the eightbits of PortC can be Set or Reset
usinga singleOUTputinstruction.This featurere'
appli'
in Control-based
ducessoftwarerequirements
cations.
Figure5. BasicModeDetinltionsandBus
lnterface
Port
WhenPortC is beingusedas status/controllor
the
Bit
reset
by
using
bits
can
be
set
or
these
A or B,
Set/Resetoperationjust as if theyweredataoutput
ports.
3-128
82C55A
Interupt ControlFunctlons
When the 82C55Ais programmedto operate in
mode1 or mode2, controlsignalsare providedthat
can be usedas interruptrequestinputsto the CPU.
Theinterruptrequestsignals,generated
fromportC,
can be inhibitedor enabledby settingor resetting
theassociated
INTEflip-flop,
usingthe bit set/reset
functionof portC.
Thisfunctionallowsthe Programmer
to disallowor
allowa specificl/O deviceto interrupt
theCPUwithout atfectinganyotherdevicsin the interruptstructure.
INTEflip-flopdefinition:
2912fi-7
(B|T-SET)-INTE
is SET-Interrupt
enable
(BIT-RESET)-INTE
is RESET-Interrupt
disable
Flgure7. Blt Set/ResetFormat
Note:
All Mask tlip-flopsare automatically
reset during
modeselection
anddeviceReset.
3-129
intef
82C5sA
Operatlng Modes
Mode 0 (Baslc Input/Output).This functionalconfigurationprovidessimple input and output op€rations for each of the three ports.No "handshaking"
is required, data is simply written to or read from a
specified port.
Mode0 BasicFunctionalDefinitions:
r Two 8-bit ports and two 4-bit ports.
o Any port can be inputor output.
. Outputsare latched.
o lnputsare not latched.
o 16 differentlnput/Outputconfigurations
are possiblein this Mode.
TNPUT)
MODE0 (BASTC
231256-8
MODEo (BASICOUTPUT)
231256-9
3-130
intel
82C55A
MODE0 Port Deflnltlon
A
B
GROUPA
POFTC
Da
D3
D1
Ds
PORTA
ruPPER}
#
0
0
0
0
0
0
0
0
0
0
0
u
OUTPUT
OUTPUT
OUTPUT
OUTPUT
INPUT
0
1
1
1
1
0
0
0
0
1
0
1
1
1
0
OUTPUT
OUTPUT
OUTPUT
OUTPUT
OUTPUT
OUTPUT
OUTPUT
OUTPUT
NPUT
NPUT
NPUT
NPUT
NPUT
I
1
0
I
1
1
1
1
1
1
0
IJ
0
0
0
0
1
1
1
1
0
0
0
0
0
0
1
1
1
1
1
I
'l
1
1
1
0
1
INPUT
INPUT
INPUT
GROUP
B
PORTC
PORTB
GOWER)
OUTPUT
OUTPUT
OUTPUT
INPUT
INPUT
OUTPUT
1
2
3
INPUT
INPUT
OUTPUT
OUTPUT
OUTPUT
INPUT
INPUT
OUTPUT
OUTPUT
OUTPUT
OUTPUT
INPUT
INPUT
OUTPUT
OUTPUT
13
OUTPUT
OUTPUT
14
15
INPUT
INPUT
OUTPUT
INPUT
4
5
6
7
I
I
10
11
12
INPUT
INPUT
INPUT
OUTPUT
OUTPUT
OUTPUT
OUTPUT
INPUT
INPUT
INPUT
INPUT
MODE0 Conflguratlons
cot{rRol woRo ,o
coirtRoL rrcRo a
o, or D, oa
$DrOrO.Ol02Or
I
0
o
coiltRol woio rr
0
0
olo
0
o
or
or
0
0
olo
Dr
Do
0
co?rlBoL woRo ,3
o,
or
o!
I
0
0
o.
03
0J0
ol
or
o
I
oo
INPUT
INPUT
INPUT
INPUT
INPUT
inbf
82C55A
(Continued)
ttlODE0 Configuratlons
coNtnoL roRD aa
CONTROLWORD i
o,
I
t
0
0
Dr
o
0
D.
D!
Or
Dr
Oo
0
0
0
0
Or
Oo
corltnor wonort
oorr?hol toaD a6
coNtRor woto o, Da or D.
Da
coiltlol
o!
o?
D,
o
o
0
oo
D,
toRD rto
Oa
llo
Dr
O.
O!
O,
0
I
o
0
o!
o.
ot
or
0
ooittRol ioRo at
o,
D6
!
o
D5 O.
0
0
O!
Dr
I
o
D'
DO
I
o,
D6
Dr
Do
82C55A
ilODE 0 Conflguratlonr(Continued)
@iarRotwoeo rrl
or%%o.otororoo
0
0
I
coillFo|.woaoal.
4%\DrDrDrOrDo
0
0
0
I
@flrrol rroto rtt
Dr%%O.OrOrOr%
0
0
I
lo
colflnol
o
0
0l0lt
f,oRoxt
4OrDrO.OrO:OrOo
o
I
o
0
I
0lr
lr
?ryt
f'clc.
fCt+!o
P&r'q
Operatlngtlodcr
ilODE 1 {Strobed Input/Output).This functional
provid€sa meansfor transferringl/O
configuration
datato or troma speciliedport in conjunctionwith
strobesor "handshaking"
signals.
In mode1, PortA
and Port B use the lineson PortC to generateor
acceptthese"handshaking"
signals.
Mode1 Basicfunctional
Definitions:
o TtvoGroups(GroupA andGroupB).
. Eachgroupcontainsone 8-bitdataport and one
4-bitcontrol/dataport.
. The8-bitdataportcan be eitherinputor output
Bothinputsandoutputsare latched.
. The4-bitportis usedfor controlandstatusof the
8-bitdataport.
3-'t33
intet
82C55A
lnput ControlSlgnalDeflnltlon
SE (StroOeInput). A "low" on this input
dataintothe inputlatch.
coafiaol woRD
or%%D.ororDroo
IBF (lnput BufferFullF/F)
tQ.r
I . tltut
0 . OUI"UT
that the datahas
A "high" on this outputindicates
an acbeenloadedintothe inputlatch'jnessence,
IBFis set by STBingl beinglow
knowledgement.
and is resetby the risingedgeof the RDinput.
RO
INTR(lnterruptRequest)
A "high" on this outputcan be usedto interruptthe
seMce.
CPU when an inputdeviceis requesting
INTRis set by the STEis a "one", IBFis a "on€"
.andINTEis a "one".lt is resetbythefallingedgeof
FiD.tnis procedureallowsan inputdevicelo re'
questservicefromthe CPUby simplystrobingits
dataintothe port.
INTEA
Controlledby bit set/resetof PC4.
INTEB
Controlledby bit set/resetot PC2.
ooirlROL ilORD
D,
Da Dr O.
Dt
r--'l
r tfllE I
!t!
ltlr
f,fr
rrq
231256-13
Flgure8. IIODEI InPut
231256-14
Flgureg.llODEI (StrobedInPut)
3-134
inbf
82C55A
OutputControlSlgnalDeflnltlon
6EF (OutputBuflcr Full F/R. TheOEFoutputwitl
go "low" to indicatethat the CPUhas writtendata
outto the specifiedpor!-The6EF plf wiil be set by
the risingedgeof the WR-inputand resetby ACK*
Inputbeinglow.
r-f
| |l{l€ |
tAl
J
L.
ER (lctnowledge tnput).A "low" on this input
informs
the82C55A
thatthedatafromPortA or Port
B hasbeenaccepted.
ln essence,
a response
from
the peripheral
deviceindicating
that it hasreceived
the dataoutputby the CPU.
INTR(lnterruptRequert).A "high"'onthisoutput
can be usedto intem.rpt
the CPUwhenan output
devicehas accepteddata transmittedby the CPU.
INTRis set whenAeK is a "on€",6EF is a "one"
andINTEis a "on€".lt is resetby thefallingedgeof
wF.
INTE A
Controlledby bit set/reset of PC5.
INTEB
Controlledby bit set/reset of PC2.
Flgure10.llODEI Output
rxTt
Ei
231256- 16
Flgure11.iIODE1 (StrobedOutput)
3-135
intet
82Cs5A
Combinations of MODE1
'l
definedas inputor outputin Mode to supporta widevarietyof strobed
PortA and PortB canbe individually
l/O applications.
tAr.t\
|c7
q
C('{TROI
ooillFol
Ir)RD
woRD
lcr
D, Or Ds O. Dr Dr Or Oo
sorDrD.or02orDo
tst,:
tQ.r
1 . lilPUr
0 . OUTTUT
| . |ra?ul
0. OUTPUT
RD
Ot Tturl
POFI A - (S'ROSED
?onT3-(STFO6!Dlltull
foell-t8tio6Eoil{Pwt
'IORTE - ISTFOBEDOUTA,'I
231256-17
of MODE1
Figure12.Combinations
Operatlng Modes
OutputOperatlons
ilODE 2 (Strobed Bidlrectional Bus l/O).This
functionalconfigurationprovidesa meansfor comor structureon a
municatingwith a peripheraldevice
single 8-bit bus for both transmittingand receiving
data (bidirectionalbus l/O). "Handshaking"signals
are providedto maintainproperbus flow disciplinein
a similar manner to MODE 1. lnterruplgeneration
and enableldisablefunctionsare also available.
6BF (OutputBuffer Full).The ffi outputwill go
"low" to indicatethat the CPUhaswrittendataout
to portA.
MODE2 Basic FunctionalDefinitions:
o Used in GroupA only.
e One 8-bit,bi-directional
bus port (PortA) and a 5(Port
C).
bit controlPort
r Both inputsand outputsare latched'
o The S-bitcontrolport (PortC) is usedfoi control
and status tor the 8'bit, bi-directionalbus port
(PortA).
INTE 1 Ohe INTE fllp.Flop Associatedwlth
6BT). Controlledby bit set/resetof PC6.
Bldirectional Bus l/O Control Slgnal Definltion
INTR (lnterrupt Request).A highon this outputcan
be used to interruptthe CPUfor input or outputoper'
ations.
FR (ncrnowledge).A "low" on thisinputenables
the tri-stateoutputbufferof PortA to sendout the
the outputbutferwill be in the high
data.Otherwise,
impedance
state.
InputOperations
STE (StroUeInput).A "low" on this inputloads
dataintothe inputlatch.
IBF(lnputBufferFullF/F).A "high"on thisoutput
indicatesthat data has been loadedinto the input
latch.
INTE2 (TheINTEFlip-FlopAssoclatedwith IBF).
by bit set/resetof PCa.
Controlled
3.136
inbf
82CssA
ooxrRot toRo
o!
o.
D3 o'
or-^
ffi^
FORT '
1.lilrur
0 - OUT?UT
sE^
tEFa
Gnort Br,oo€
0
0. trOOE
I . lr(D€ I
231256-18
trc
Flgure13.MODEControlWord
231256- 1I
Figure14.MODE2
D lamot
cru to r2c6aa
o tAFnoI
t€trPHEiAr TO aacitA
racra
oala Ftol
toPcitPficnat
Figure 15.MODE2 (Bidirectionat)
NOTE:
Anysequence
whereWFIoccursbeforeAffi, andSTBoccursbeforeFT is oermissible.
(INTR: tBFr iliA-SR.SrB-. FD + Ogr-. rvffiR r fif,( r ffi1
3-137
int€f
82C55A
MODE 2 AND MOOEO IOUTPUTI
MOOE 2 AND MODE O (INPUT}
tc:
txlf,^
?qrt
dF^
ffi^
lct
6ir^
tcr
E-^
DrD.DcD.Or02OrOo
DrDr\O.OrOrDrDo
f-B^
m^
ItFa
Ffe
r^)
MODE 2 AI{D MOOE T (INPUTI
UODE 2 AND MODC 1 (OUTPUT)
lG!
r{li^
tf,TR^
tart\
ft-r^
tct
6--t^
?cr
ilcRe
tcr
--r^
fc.
m^
tc.
m^
tcr
tat^
rcr
tlI^
Er'S
'or.,q
PC1
6-r.
lc2
m!
tcr
r{tR!
tco
2312fi-21
Figure 16.MODEt/4Combinatlons
3-138
82C55A
iroDE0
IN
OUT
|l{
OUT
IN
1N
IN
IN
IN
PAI
PAs I N
PAe I N
PAz I N
OUT
OUT
OUT
OUT
OUT
OUT
OUT
OUT
IN
IN
IN
IN
IN
IN
IN
IN
OUT
OUT
OUT
OUT
OUT
OUT
OUT
OUT
PBo
PBr
PBz
PBg
PBI
PBs
PBe
PBz
IN
IN
IN
IN
IN
IN
IN
IN
OUT
OUT
OUT
OUT
OUT
OUT
OUT
OUT
IN
IN
IN
IN
IN
IN
IN
IN
OUT
OUT
OUT
OUT
OUT
OUT
OUT
OUT
PCo I N
PCr IN
PCz I N
OUT
OUT
OUT
OUT
OUT
OUT
OUT
OUT
PAo
PAr
PAz
PAs
PCg
PCt
PCs
Pce
PCz
IN
IN
IN
IN
IN
MODE2
MODE1
GROUPA ONLY
€
<..+
e
MODEO
OR MODE
ONLY
vo
vo
INTRg INTRs
lBFs GFa
ffis
ffig
INTHl INTR1
1/O
INTRl
StB6
sIBl
lBFg
vo
vo
lBFa
t/o. ACRA
t/o OBF-n
Specialllode Combination Conslderatlons
Thereare severalcombinationsof modespossible.
For any combination,some or all of the PortC lines
are usedlor controlor status.The remainingbitsare
eitherinputsor outputsas definedby a "Set Mode"
command.
Duringa readof PortC, the state of all the PortC
lines,exceptthe rcK- and STB-lines,will be placed
on the data bus. In place o{ the ACK and STB line
states,flag statuswill appearon the data bus in the
PC2, PC4, and PC6 bit positionsas illustratedby
Figure18.
Througha "Write PortC" command,onlythe PortC
pinsprogrammedas outputsin a Mode0 groupcan
be written.No otherpinscan be atfectedby a "Write
PortC" command,nor can the interruptenableflags
be accessed. To write to any Port C output programmedas an output in a Mode 1 group or to
AmA
oEFa
changean interruptenableflag,the "Set/Reset Port
C Bit" commandmust be used.
Witha "Set/ResetPortC Bit" command,any Port C
lineprogrammed
as an output(includingri'iTR,ltsF
and OBF)can be written,or an interruptenableflag
can be eitherset or reset.PortG lines programmed
as inputs,includingffi and STB-lines,associated
with Port C are not affectedby a "Set/Reset Port C
Bit" command.Writinglg the correspondingPort C
bit positionsof the ACK and STB lines with the
"Set/Reset Port C Bit" command will affect the
GroupA and GroupB interruptenableflags,as illustratedin Figure18.
Curent Drlve Capability
Any outputon Port A, B or C can sink or source2.5
mA.This featureallowsthe 82C55Ato directlydrive
Dadington type drivers and high-voltage displays
that requiresuch srnkor sourcecurrent.
3-139
82C55A
Reading Port C Status
D7 D6
ln Mode 0, Port C transfersdata to or lrom the peto
ripheraldevice.Whenthe 82C55Ais programmed
function in Modes 1 or 2, Port C generatesor accepts "hand-shaking"signalswiththe peripheraldevice. Readingthe contentsof PortC allowsthe programmer to test or verify the "status" of each peripheratdevice and change the programflow accordingly.
INPUTCONFIGURATION
D2
D1
D3
D5
Da
GROUPB
GROUPA
D7
OUTPUTCONFIGURATIOTIS
D2
D1
D5 D5 Da D3
Ds
GROUPB
GROUPA
There is no specialinstructionto readthe statusinformationfrom Pon C. A normalread operationof
Port C is executed to perform this function.
Ds
Figure17a.MODEI StatusWordFormat
D7
D5
D5
D4
D3
D2
D1
D6
6-e1 INTErlBFr INTE2llNTRa
GROUPA
GROUPB
(Defined 8y Mode 0 or Mod€ 1 S€l€ction)
Figure17b.MODE2 StatusWordFormat
lnterruot Enable Flaq
INTEB
INTEA2
INTEA1
Posltion
Alternate Port C Pin Slgnal(Mode)
AeRe(OutputMode1)orSTBs(lnputMode1)
STBa(lnputMode1 or Mode2)
Affia (OuioutMode1 or Mode2
Figure18.lnterruptEnableFlagsIn ModesI and2
PC2
PC4
PC6
3-'140
82C55A
ABSOLUTEMAXIMUMRATINGS*
UnderBias.. . .0'Cto + 70'C
Ambient
Temperature
StorageTemperature ..- 65'Cto+ 150'C
0.5to + 8.0V
Voltage
Supply
...+ 4vto * 7V
OperatingVoltage
.GND-2Vto f 6.5V
Voltage
onanyInput..
Voltage
on anyOutput. .GND-0.5Vto V66 + 0.5V
. . .1 Watt
PowerDissipation
'Notice: Sfressesabovethose listad under "Abso'
lute MaximumRatings"maycausepermanentdam'
age to the device.Thisis a stressrating only and
functionaloperationof the device at these or any
otharconditionsabovethoseindicatedin the opera'
tfonalsectionsof thisspecificationis not implied.Ex'
posure to absolutemaximumrating conditionsfor
extendedperiodsmayaffect devicereliability.
D.C.CHARACTERISTICS
Temperture)
TA : 0'C to 70'C,Vcc : +5V t10%, GND : 0V (TR: -40"C to *85'C for Extended
Unlts
Test Condltlonr
Max
Mln
Symbol
Parameter
-0.5
V
InputLowVoltage
0,8
V11
Vcc
v
0.4
v
vrx
InputHighVoltage
Vol
OutputLowVoltage
Vox
OutputHighVoltage
Irt
InputLeakage
Current
r1
pA
lort
OutputFloatLeakageCurrent
r10
pA
loln
DarlingtonDriveCunent
(Note4)
mA
2.0
3.0
V66 - 0.4
t2.5
V
V
191: 2.5 mA
lOu : -2.5 mA
loH: -100pA
Vlx : V66 to 0V
(Note1)
V11: Vg6 to 0V
(Note2)
PortsA, B, C
R611: 500O
Vs6: 1.7V
lpxt
PortHoldLowLeakageCurrent
+50
+ 300
pA
V6g1 :
l.CV
PortA only
lpnn
PortHoldHighLeakageCurrent
-50
lpHto
PortHoldLowOverdriveCurrent
lpxxo
Port Hold HighOverdriveCurent
lcc
V6g SupplyCunent
lccse
V66 SupplyCunent-Standby
- 300
pA
V6U1 : 3.0V
PortsA, B, C
-350
pA
Vggl:
+350
pA
VggT : 3.0V
10
mA
(Note3)
10
pA
V6g: 5.5V
VrN: VCCor GND
PortConditions
It llP : Open/High
O/P : OpenOnly
With Data Bus :
High/Low
0.8V
eS: High
Reset: Low
PureInputs:
Low/High
NOTES:
1. PinsA1,Ao,eS, WF[,FE, Reset.
2. DataBus;PortsB, C.
3. Outputsopen.
4. Limitoutputcurrentto 4.0 mA.
3-141
intef
CAPACITANCE
TA : 25'C,Vcc :GND : 0V
crru
InputCapacitance
10
Unlts
pF
ctro
l/O Capacitance
20
pF
Parameter
Symbol
llax
Mln
Test Condltlons
plns
Unmeasured
returned
to GND
fc : 1 MHz(s)
NOTE:
tesled.
5. Samplednot 100o/o
A.C. CHARACTERISTICS
TA : 0" to 70oC,Vcc : +5V +10%, GND : 0V
TA : -40oC to +85'C for ExtendedTemperature
BUS PARAMETERS
READ CYCLE
Symbol
82C55A.2
Parameter
Mln
tRR
AddressStabteBeforeffi J
Address
HoldTimeAfterR'D
1
tnn
FD PulseWidth
tRo
tor
DataDelayfromF'D
J
FD T to DataFloating
tRv
Recovery
TimebetweenRDrW-n
tRn
Unlts
f,lax
0
ns
0
ns
150
ns
120
10
75
Test
Condltlons
ns
ns
ns
200
WRITECYCLE
Symbol
82C554-2
Parameter
llln
Unlts
ilax
Teat
Condltlons
tnw
AddressStableBeforeWF J
0
ns
twR
HoldTimeAfterWRf
Address
20
NS
PortsA & B
20
ns
PortG
tww
WF PulseWidth
100
ns
tow
DataSetupTimeBeforeWRf
100
ns
two
DataHoldTimeAfterWFlf
30
ns
PortsA & B
30
ns
PortC
3-142
intef
Symbol
82C55A
Parameter
82C554-2
Mln
Mar
Unlte
Condltlons
lwg
WFI:ltoOutput
trn
Peripheral
DataBeforeF-D
0
ns
ns
txR
0
ns
Inx
Peripheral
DataAfterffi
Affi PulseWidth
200
ns
tsr
Sm Pubewidth
100
ns
tps
Per.DataBeforeSffi nign
20
tpx
Per.DataAftsrSTEHigh
50
teo
[ffi:0toOutput
Fffi : 1 to OutputFloat
250
ns
ns
ns
ns
txo
350
175
20
Test
150
ns
tEog
WF I: l to OE F : O
A c K - : 0 t o 6 E F :r
150
ns
tstg
SfE:OtolBF:1
150
ns
tnrg
ffi:ltolBF=0
150
ns
tRtr
RD-:Oto|NTR:0
200
ns
tsr
StB:ltoINTR:1
150
ns
tnr
ffi=lto1NTR:1
150
twr
WFi:OtoINTR:0
200
ns
ns
see note 1
tRes
Reset PulseWidth
ns
s€enote2
twog
500
NOTE:
'1.INTR mayoccuras earfyas WF
I
l.
2. Pulsewidthot initialResetpulseafterpoweron mustbe at least50 pSec.Subsequent
Resetpulsesmaybe 500 ns
manimum.
g-i+g
82C554
WAVEFORMS
291zfi-22.
noDE 0 (BASTC
OUTPUT)
t31256-z3
3-144
intet
WAVEFORMS(Gontinued)
rfPUT)
MODEI (STROBED
3't
t!;
lttt
m
titur ttot_
t€nrrHtial
_ _
231256-24
noDE | (STROBED
OUTPUT)
fr
6t
ai"F
iE
ouT|trr
82C55A
WAVEFORMS(Continued)
MODE
2 (BTDIRECTIONAL)
DATA FROII
lco ro a256
IER
S?I
IBF
?gilfr{€ta!
il.ls
f,6
DATA
DAIA FAOM
]t66 TO IEiI?HIRAL
rEhr|HtnAL to t265
DAIA IRO*I
1255 TO t0a0
Notc:
whereWF occursbeforeICR ANDSiB occursbeforeFD is permissible.
Anysequence
r [Q( o ffi1
(INTR: IBFo FiFS. SfE. FD + 6EF. NiA-SR
READTIMING
WRITETIMING
xlcx nrP€oAitct
231256-28
231256-27
A.C.TESTINGINPUT,OUTPUTWAVEFORM
A.C. TESTINGLOAD CIRCUIT
231256-29
A.C. Testing Inputs Ar€ Div6n At 2.4V For A Logic 1 And 0.45V
Are MadeAt 2.0VFor A
For A Logic 0 TimingMeasurem€nls
Logic 1 And 0.8 For A Logic 0.
'Vgrf ls S€t At VariousVoltagesDuringTestingTo Guarante€
C1 IncludesJig Capacitance.
Ths Spocitication.
3-146
APPENDIX D
LEXICON 510
INTRODUCTION
Icxicon 510 is an interactiveprogramtailored specificallyto makefull andeasyuseof your AD5l0 analog
input board.It hasthe characteristicsof a highly specificdataacquisitionlanguageandsomepropertiesof an
operatingsystem.It canbe usedto acquireanalogdaa in real time and assigna time value for post-acquisition
analysis.Data canbe plotted or movedbetweenthe graphicstemplatesanddisk files. The files are MS-DOS
compatibleandcanbe accessedby the user'sprogramsto perform highly specificanalyses.The Irxicon 510
commandsetlets you characterizeyour experimentto determinettrebestacquisitionrate to use,how rapidly the
datachanges,and how muchdatais beinggenerated.
If you write your own softwarein BASIC, Pascal,or C, you can still useLexicon to selecta correctbase
addressand to verify correctoperationof the board.
DESCRIPTION
A L,exiconis a specializedvocabularyfor a particularsubject.I-exicon 510 is an ext€nsionof Forth-83,a
languagelong usedfor solving complexprocessconrol and daa acquisitionproblems.Time-critical portionsof
Lexicon,suchasVO, graphics,andBIOS callsarewrittenin assemblylanguage.I-exicon
510 is interactive,fast
executing,and lets you fully control of the AD510's hardwareresourcesso that you canbecomemore familiar wi*r
your system.Small programsthat collect dataor displayreadingscanbe usedto isolateand diagnoseany problems
suchasbaseaddresscontentionor signaldrift.
In contrastto menu-drivensoftware,Irxicon is command-driven.Like DOS, a commandtyped in responseto a
prompt is input to tlte Lexicon system,interpreted,and thenexecuted.Irxicon usesthe prompt "ok" to let you
know a commandhasbeenacceptedwithout error.For examplethe command:
lOOREADINGS
will resultin 100A/Dreadings
in bitsbeingtakenanddisplayed
thescreen.
across
NOTE: Lexicon requiresttnt all commandsbe enteredin capital letterswith at leastone spacebetween
commands.Lexicon doesnot recognizelower-caseletters.
The operand"l00" comesbeforethe operator"READINGS". Like Forth, Lexicon usesReversePolish Notation
- also calledRPN or postfix notation.The main reasonfor usinga stack-orientedlanguageis executionspeedand
easeof passingargumentsbetweencommands.In an RPN language,commandsorprograms takeor leavenumbers
asargumentsfrom that slack.
NOTE: On the AD510 board:
Gain
-4095Blts
+4095Bits
1
-5 volts
+5 volts
10
-500millivolts
+500millivolts
100
-50 millivolts
+50 millivohs
It is imporant b rememberthata commandlike READINGSin theaboveexamplemusthavea l6-bit integer
argumentprecedingit. If you type in FGADINGS with no argument,an error will result.How do you know if a
commandtakesan argumenton the stack?You mustreadtheLexicon commandlisted in the documentation.
The Lexicon commandset describedlater showseachcommandin ttrefollowing format:
READINGS ( n -)
On the IIELP screenany commandlisted with a 'n' in front of it requiresan argument.For example:
n READINGS
The n beforethe commandmeansthat a (n)umbermustbe enteredas an argument.The valid rangeof numbers
for Lexiconis -32767n +32767.
D-3
LEXICON AND DOS
The Lexicon softwareis written to run underthe MS-DOSoperatingsystemversion2.0 or greater.To insure
the softwarewill work on PC clones,muchof it is wdfien in assemblylanguageusing the BIOS and DOS software
interrupts.Insteadof communicatingdirectly with the computerhardware,the BIOS ROM or DOS take'scareof
manycommonfunctionslike drawinga pixel, readingtime, changingvideo modes,anddisk VO.
CertainLexicon 510 functions- suchastime delays- areimplementedusing BIOSIDOSintemrpts.For
example,to tell time, Lexicon performsa BIOS call 1AH to obtain the numberof l8th-secondclock ticks since
midnighr This meansthat when taking readings,the closestthey canbe discernedis 1/18of a secondapart.This is a
limitation imposedby DOS. The correcttime of day readby ttris intemrpt is dependenton the correcttime being
enteredwhen you boot your machine.
INSTALLINGLEXICON510
Beforerunning Itxicon, we recommendthat you createa separateLexicon disk. This is doneby copying the
following files containedin the LEXICON subdirecory on the programdisk ono a blank formaneddisk:
LEX5lO.COM
SETTJP.LEX
BLOCKS.BKS
SINE.DAT
Lexicon 510 is suppliedas a .COM file and mustinclude severalother files in order to operat€properly.One
file that mustbe includedis SETUP.LEX,a small file loadedafter l,exicon is booted.This file containsthe base
addressof the AD5l0, the defaultchannel,and the analoginput channel.SETLJP.LEXcanbe configuredfor other
valuesby the softwareso it canboot on an unusedI/O location.BLOCKS.BKS is the Lexicon file that containsthe
boot instructionsusedby the systemto setsomeinitial characteristicsand alsolists the IIELP screen.
Datafiles createdby Lexicon arealwaysfollowed by the extension.DAT, and havea specialintemal coding to
insurethat only I-exicon createdfiles canbe loadedby the system.SINE.DAT is an exampleof a datafile and is
includedon your disk. It wasgeneratedby usingan AD510 boardto digitize 0reoutput of a sine wave signal
generator.
To run Lexicon enterthe name:LEX5IO from DOS.Lexicon will load, zerothe internaldatabuffers,load a
setupfile, ake 15 lest AID readings,in bits, and displaya IIELP screen.It would be very helpful if you havea
voltagesourceor baneryconnectedto the input of the AD5l0 board.This will enableyou to seeif the displayed
valuesmatchand track the input voltage.
LOADING THE SAMPLEDATA
To examinethe contentsof the disk, usethe commandDIR just asyou would from DOS.To load a Lexicon file
(with the extension.DAT), use:
FLOAD < name >
This commanddisplaysthe direcory of the activedisk drive andpromps for a file name.After you entera file
name,it will be loadedinto the databuffen. The commandto display the datain the databuffer is:
PLOT
To exit thePLOT progmm,presstheESCkey.
D4
CHANGING THE DEFAULT BASE ADDRESS
If you changethe baseaddresssettingof the AD510by repositioningthejumperpin at connectorP, you must
inform Irxicon that you madethis change.The commandto do Brisis ADDR. Lexicon mustbe madeawareof this
changeor it will asemptto communicalewith the AD510 at a different addressand won't work at all. Lexicon boots
up at baseaddress5L2Qm hex). To changethe defaultbaseaddressto, for example,576 (240 hex) on boot-up,
type the following:
576 ADDR
NEW
"576" is the decimalvalueof hex 240 on jumper P2, the secondjumper settingfrom the left Next type "Y" in
responseto the question.To perform a new initialization sequence,t)4)ethe following:
LSU
STJINIT
LSU will Load SetUpand SUIMT will perform a setupinitialization of ttreAD5l0. The following table shows
the correspondingdecimalThexadecimal
equivalensof the eight P2 baseaddresses:
Heradeclmal
Ileclmal
200
512
240
s76
280
uo
2C0
704
300
768
340
832
380
896
3C0
960
USINGLEXICON510
Beforedescribingthe Lexicon 510 commandsin detail, therearea few items concerningthe operationof
Lexicon that shouldbe repeated.All commandsmustbe enteredin uppercasewith at leastone spacebetween
commands.The RETURN key must be pressedto executethe command(s).Lexicon is capableof handlingonly
l6-bit integernumbersasarguments;thatis, numbersranglngbetween-32,767and+32,767.Numbers
entered
outsidethis rangewill result in indeterminatevaluesbeingplaceon the stack.
REMEMBER:
l. Enter all commandsin upper-caseletters
2. All commandsmustbe separatedby at leastonespace
On boonrp,all numbersenteredandoutput from I-exiconarein decimal.Lexicon canalso operatein hexadecimal, oclal, and binary numberingmodes.Internally, all numbersarestoredin binary, but when enteringor displaying them,you canchoosea different numberbaseusing ilre DECIMAL, IIEX, OCTAL, and BINARY commands.
However,be awarethat Lexicon will expectyour daa input to be consistentwith the currentnumberbase.For
example,if you arein decimalmode,the hex numbersA throughF will not be accepted.lexicon can alsobe usedto
changenumbersbetweenbases.The HEX commandcanbe usedto convert theP2 connector'shex baseaddress
valuesto their decimalequivalents.The following examplesassumethe currentnumberbaseinitially is decimal.
D-5
TRY THIS:
HEX 2C0 DECIMAL .
DISCUSSION: The hex modeis selectedand ttrehex value2C0 is entered,convertedto decimalandprinted
using the DECIMAL and . commands.
The next examplesillushate how Irxicon canchangethe numberbaseof valueswhich areinput to and output
from the computer.
TRY THIS:
346HEX. DECIMAL
DISCUSSION: The number346 (n the currentnumberbase)is placedon the stack,the numberbaseis
changedto hex,and the operator. prints the top of the stack.The commandDECIMAL returnsyou to the
decimalmode.
TRYTHIS:
BINARY 1101111001DECIMAL.
DISCUSSION: Thebinarynumberbaseis selectedandtlrebinarynumber*1101111001"is enteredon the
stack.DECIMAL swirchesyou back to decimalmodeand . prints the decimalequivalenton the screen.
TRY THIS:
DECIMAL 3147BINARY . DECIMAL
DISCUSSION: The decimalmodeis selectedand the value 3147is entered BINARY switchesrhe number
baseand .prints the binary equivalenton the screen.DECIMAL changesthe modeback to base10.
What doesthe operator. do? As we saidearlier, .prints the top numberon the stackin the currentnumberbase
followed by a spaceon the screen.
TRYTHIS:
3;6.
DISCUSSION:The number346is enteredon thestack.Regardless
of ilre numbersalreadyon the stack,it will
go on top. Then it prints the numberon the screenin the numberbasecurrently selected.
Typtng . with nothing on the stackresultsin an ermr mess4ge.This is not a fatal error. Sometimesnumberscan
accumulateon the stackwitttout you realizing it. You canget rid of the excesssack numbersusingthe . command.
D-6
LEXICON COMMAND SET
The Lexicon commandsaredivided into four classes:A/D Control, OperatingSystem,File ControVHelp
are the short-handversionsof the commandswhich can
Screen,and High-Irvel Commands.letters in parentheses
keystrokes.
in
one
two
or
be entered
A/D Control. The A/D Conrol commandspermit direct contol of the AD510 board:
COMMAND
STACK
DESCRIPTION
ADC
DIFF
?ADDR
READINGS
READ (R)
IOMAP
STATUS (ST)
ADDR
CHANNEL
INIT
(-)
(-)
(-)
Prints a singleA/D result in bits
Prints the DIFFERENCE betweenreadings
Prints the presentAD510 baseaddress
Displaysn AID readings
DisplaysA/D readingscontinuously
Displaysthe AD510'sVO map
Displaysthe current systemstatus
Setsa new baseVO address
Selectsthe input channelnumber n
Initiatizes the AD510 board
( n-)
(-)
(-)
-)
n-)
n-)
-)
Operating System.The OperatingSystemcommandsconsistof utilities to changethe global systempaftmeterssuchas time delayand numberbase:
COMMAND
STACK
DESCRIPTION
BYE
MS
?DELAY
TIMER
TX
HR
?BASE
BINARY
DECIMAL
OCTAL
HEX
DIR
CLS
(-)
(-)
(-)
Exits Lexicon to DOS
Delay accordingto the value in TIMER
Prints the presentsystemdelay
Selecta time delay of n (dimensionless)
Selectstext modeon CRT
Selectshigh resolutiongraphicsmode
Displaysthe current number base
Selectsnumber baseof 2
Selectsnumber baseof 10
Selectsnumber baseof 8
Selectsnumber baseof 16
Displaysdirectory of selecteddrive
Clearsthe text screen
( n-)
(-)
(-)
(-)
(-)
(-)
(-)
(-)
(-)
(-)
File ControVHelp Screen.The File Conrol/llelp Screencommandsareused!o saveand load the extended
memoryarrayof acqufueddataand ttreSETTJParray.TheseDOS files canalso be loadedby other MS-DOS
prograrns.A utility program(SEE)permis examinationon the screenof fte extendedarray data:
COMMAND
FLOAD (L)
FSAVE(S)
SEE
NEW
LSU
HELP (H)
STACK
DESCRIPTION
(-)
(-)
Loads a Lexicon data file
Savesa Lexicon data file
Examinesdata array starting a # n
Write presentsetup to SETUP file
Loads the configuration setupfile
Displaysthe Lexicon help screen
(n- )
(-)
(-)
(-)
High-Level Commands.The High-Irvel Commandsare usedto collect andplot datain different formats:
COMMAND
STACK
DESCRIPTION
COLLECT(C)
RC
ZERO
CHART
FS
PLOT (P)
MVS (M)
SCAN
A:
B:
C:
(-)
(-)
(-)
(-)
(-)
(-)
(-)
(-)
(-)
(-)
(-)
Data collectionprogram
Resumedata collection
Zeroesdata buffers
Strip chart simulator
Full-scaleploffing program
Plots data in'buffers
Continuousmillivolt display
8-channelscanning
Selectsdrive A
Selectsdrive B
Selectsdrive C
CONTROLLINGTHE 5I"OBOARD
A usefulcommandis READ. This commandwill take A/D conversionson a singlechannelandwill continuously display them in bis on the screen.This commandalso hasa shorttrandform of 'R'. Before usingREAD, you
must selectthe appropriateanaloginput channel.For example,I CHANNEL READ will continuouslydisplay A/D
readingsfrom channell,and2 CHANNEL READ will displayreadingsfrom channel2.
Enteringthe commandREAD will causeA,/Dconversionsto be displayedasbits. Pressingany key will halt the
acquisition.Changethe input voltageto ttreAD510 boardand warchthe displayedbis valueschangeaccordingly.
Theinputrangeof the AD5 10is -5 to +5 volts,so -5 will be 4095 and+5 will be +4W6 bits for a gainof t.
To determinethe defaultbaseaddress,channel,or input gain, enterthe commandSTATUS (ST).
TRYTHIS:
l CHANNEL IO READINGS
DISCUSSION: I CHANNEL selectschannelI (AINI) as the input channel.l0 READINGS displaysl0 A/D
convenionson the screen.
READ (R)
DISCUSSION:READ (unlikeREADINGS)continuouslyperformsA,/Dconversions
anddisplaysrhemin birs
until any key is pressed.[t usesthe presentgain andchannelvaluesanddoesnot changethem.Pleasenote
that sinceREAD is often used,it hasthe shorthandform of "R". Type in "R" and the samecommandis
executed.
TRYTHIS:
D-8
TRYTHIS:
MVS
DISCUSSION: MVS, like the commandREAD, takescontinuousA/D conversionsanddisplaysthem in
millivolts. MVS works only for a gain of 1. Pressingany key hals the conversions.
TRYTHIS:
5 CHANNEL ?CHANNEL
DISCUSSION: ?CHANNEL prins the presentactiveanaloginput channel.5 CHANNEL will set the input
channelto 5 and ?CHANNEL will verify that it hasbeenset.
TRYTHIS:
DIFF
DISCUSSION: DIFF is a programthat continuouslyprins out the differencebetweentwo successivereadings.
If the analoginput signatis perfectly stable,atl thereadingswill be zero.If the signalis noisy, hasbase
addresscontention,or is rapidly changing,thennon-zerovalueswill appear.This is a gmd debuggingutility.
CHANGINGTHE DEFAI]LT VALUE
As we statedearlier, whenLexicon is loaded,a small file called SETUP.LEXis loadedand usedto initialize the
AD5l0's baseaddress,channelselection,and gain. This file canbe changedto initialize the boardto your own
specificationswith the commandNEW. NEW displaysthe currentI/O address,activechannel,and gain, and asksif
you would [ke to makethesevaluesthe senrpdefaults.If you respondwith "Y", they are written to ttre SETUP.LEX
file on the disk.
TRY THIS:
NEW
DISCUSSION: NEW takesthe presentvaluesof the I/O baseaddress,channel,and gain and writes them to the
file SETUP.LEXwhich is loadedwhen the sysremboors.
TRY THIS:
LSU SI.JIMT
DISCUSSION: LSU loadsthe setupfile from the disk into the initialization array.SUINIT is the setupinitialization procedurewhich reconfiguresthe AD510 for your new senryvalues.
LEXICON510DATA FILES
Lexicon 510 savesdaa in DOS files. It also hasthe ability to createand list ttrefiles on a disk. All Lexicon
createdfiles havethe extension.DAT and an internal codethat identifiesthe file asone createdby Lexicon. Files
wi0tout the extension.DAT and without the internalcodewill not be loaded.This specialencodingconsistsof the
extension.DAT anda decimal19 in the ttrirdbvteof thefile.
TRY THIS:
DIR *.DAT
DISCUS$ON: Like the DOS equivalent"DIR can acceptargumentsfrom the DOS commandline. This
exampleinstructsLexicon to display all files with the extension.DAT.
TRYTHIS:
FLOADSINE.DAT
DISCUSSION: The commandFLOAD (File load) will load a Lexicon file into an extendedanay so the data
canbe plotted and examined.
D-9
TRY THIS:
FSAVE < name>
DISCUSSION: The commandFSAVE (File Save)will savettredatastoredin the extendedanay ino the
specifiedfile (appendedwith the extension.DAT). It will pnomptyou for a file nameto use.The first
elementof the createdfile is the numberof daa points it contains,the secondis the number 19 (o codefor a
valid l,exicon datafile). The next elementscontaintlre systemgain and delay.The acquireddatafollows.
This commandis abbreviatedas"S".
Datais storedin the extendedanay in a specialformaf A/D result/timeMSW (Most Significant Word)/time
LSW (LeastSignificantWord). Every A/D conversionis taggedwith a 32-bit time value (from the intemal
MS-DOS timer). A 64K datafile will consistof about2|W datapoints and22,000doubleprecisiontime values.
The 32-bit time valuerepresentsthe numberof 1/18secondMS-DOSticks sincemidnight.
TRY THIS:
100SEE
DISCUSSION: The SEEcommandlets you examinea daa point and its 32-bit time tag. Fifty datapoints are
displayedin this forrnat:
Data Point. #/Time/Value (bits)
The argumentfor the commandis the sarting valueyou want 0oexamine.In this example,you will begin
lmking at datapoint 100.Note that 0refixst datapoint you can usewith the SEEcommandis an argumentof '2".
PressingPgUpTPgDnscrolls the readings;ESC will terminatethis command.
TRYTHIS:
C: DIR
DISCUS$ON: C: will selectdrive C as the selecteddrive. DIR will list the disk directorv.
LEXICON5IOPLOTTING
Irxicon includesseveralhighJevel plotting programs.Becausea limited numberof datapoints canbe plotted
acrossthe screen(approximatelyI140), ttredatapoints arebrokenup into frames.One framecanbe displayedon
the screenat one time andit consistsof two graphicsboxes.The plotting programsPLOT andFS display oneframe
of data.The PgUp,PgDn, and Homekeys are usedto diqplaythe nextlpreviousframe of the extendedmemoryanay
andreturn to the first frame.When usedwith the GRAPHICS.COMutility suppliedwirh advancedversionsof DOS,
high-qualitygraphicsoutpurscanbe dumpedo a compatibleprinter.
TRYTHIS:
PLOT
DISCUS$ON: Any datasored in the databuffen is scaledto fit into the trvo graphicsboxes.This program
displaysone ftame of daa (which is about 1140points).Pressthe PgUpTPgDn
or Homekey to seethe nexV
previousframe of datadisplayedasa point plot on the sqeen. This commandcanbe usedwithout first
FLOADing a file, but most likely you will seenothingon the display,or perhapssomerandomdataleft over
from anotherprogram.Pressingthe ESC key terminatesir The numbersalong the X-axis of eachdisplay are
thearrayindicesof thedaa points.This commandis abbreviated
as'?".
TRY THIS:
FS.
DISCUSSION: FS is a Full-Screendataplotting program.It displayshalf a frame of data.Often, datais more
easily understoodwhen a largerplot is displayed.This routine is alsoaffractivewhen daa is dumpedusing
theGRAPHICS.COMutility.
D-10
TRYTHIS:
CHART
DISCUSSION: CHART imitatesa srip chartrecorderandwill graphicallydisplay the AID readingsasa point
plot in real time. ESC terminatesthis program.
TRYTHIS:
SCAN
DISCUSSION: The SCAN programscansand displaysall eight analoginput channelsin bits at the selected
gain.To changethedelay,usethecommandTIMER. To changethegain,usethecommandslX, 10X,and
1mx.
LEXICON 510UTILITY PROGRAMS
In Lexicon, all highJevel programssuchas COt -r pg1, RC, CHART, andREAD canhavea time delay
insertedto delay betweeneachreading.To set the time delay,usethe commandTIMER. For examplethe command
5000 TIMER storesthe dimensionlessnumber5000in the variableDELAY. A delay of 5000correspondsto a
delay of about 19 secondson a4.77 MHz machine.It canbe scaledaccordinglyfor fasterCPUs.To actuallyget a
feel for how long he delay is, usethe commandMS or READ.
TRY THIS:
500TIMER READ or 5000TIMER MS
DISCUS$ON: A value of 500 is enteredinto the time delay variable.This is abouta 1.9 seconddelay between
readings.It is fasterfor higherclock speedsand will scaleup linearly.
OPERATINGSYSTEMCOMMANDS
The Lexicon OperatingSystemcommandsare usedto interfacewith the entire systemsuchas clearingthe
screenor changingthe numberbase.
cl,s (-)
Clearsthe text scr@n;works like the samecommandin BASIC.
rx (-)
Selectsthe video text mode.If your display appearssnrckin the high-resolutiongraphicsmode,enterTX to
return it to the text mode.
HR (-)
Selectsthe high-rasolutionvideo mode.
?BASE(-)
Prins the curent numberbasein decimal.
BYE (-)
Exits Lexicon and retumsto DOS.
D-l1
HIGH.LEVEL COMMANDS_ DRIVE SELECTION
A: (-)
Selectsdrive A asthe default drive.
B: (-)
Selectsdrive B as tle defaultdrive.
c: (-)
Selectsdrive C as thedefault drive.
TRYTHIS: C: FSAVE
DISCUSSION: Selectsdrive C asthe defaultdrive for listing, loading,andstoringl-exicon files.
TRY THIS: A: DIR
DISCUSSION: This commandsequenceselecbdrive A as the defaultdrive and lisrs fte directory.
D.I2
APPENDIXE
WARRANTY
LIMITED WARRANTY
Real Time Devices,Inc. warrantsthe hardwareand softwareproductsit manufacturesandproducesto be free
from defectsin materialsand workmanshipfor oneyear following the dateof shipmentfrom REAL TIME DEVICES. This warrantyis limited to the original purchaserof productand is not ransferable.
During the one yearwarrantyperiod,REAL TIME DEVICES will repair or replace,at its option, any defective
productsor partsat no additionalcharge,providedthat the productis retumed,shippingprepaid,to REAL TIME
DEVICES. All replacedpartsand productsbecomethepropertyof REAL TIME DEVICES. Before returning any
product for repair, customersare required to contactthe factory for an RMA number.
THIS LIMITED WARRANTY DOESNOT EXTEND TO A}.IY PRODUCTSWHICH HAVE BEEN DAMAGED AS A RESIJLT OF ACCIDENT, MISUSE, ABUSE (suchas:useof incorrectinput voltages,improperor
insufficient ventilation,failure to follow the operatinginstructionsthat areprovidedby REAL TIME DEVICES,
"acts of God" or other contingenciesbeyondthe conrol of REAL TIME DEVICES), OR AS A RESULT OF
SERVICEOR MODIFICATIONBY AT.IYONEOTI{ER THANREAL TII4E DEVICES. EXCEPT AS EXPRESSLYSET FORTH ABOVE, NO OTTIERWARRANTIES ARE E)GRESSEDOR IMPLIED, INCLUDING,
BI.TTNOT LIMITED TO, ANY IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESSFOR A
PARTICULAR PURPOSE,AND REAL TIME DEVICES E)PRESSLY DISCLAIMS ALL WARRANTIES NOT
STATED IIEREIN. ALL IMPLIED WARRAI{TIES,INCLUDING IMPLIED WARRANTIES FOR
MECHANTABILITY AND FTTNESSFOR APARTICULAR PTIRPOSE,ARE LIMITED TO TI{E DURATION
OF THIS WARRANTY. IN THE EVENT TI{E PRODUCTIS NOT FREEFROM DEFECTSAS WARRANTED
ABOVE, TIIE PURCHASER'SSOLEREMEDY SHALL BE REPAIR OR REPLACEIVTENT
AS PROVIDED
ABOVE. UNDER NO CIRCUMSTANCESWILL REAL TIME DEVICES BE LIABLE TO THE PURCHASER
OR A}.IY USERFOR AhIY DAMAGES,INCLUDING AhTYINCIDENTAL OR CONSEQUENTIAL DAM.
AGES,H(PENSES,LOST PROFITS,LOST SAVINGS,OR OTTIERDAMAGES ARISING OI.TTOF TI{E USE
OR INABILITY TO USE T}IE PRODUCT.
SOME STATESDO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSE.
QUENTIAL DAMAGES FOR CONSUMERPRODUCTS,AND SOME STATESDO NOT ALLOW LIMITATIONS ON HOW LONG AN IMPLIED WARRANTY LASTS, SO TIIE ABOVE LIMITATIONS OR EXCLUSIONS MAY NOT APPLY TO YOU.
THIS WARRANTY GIVES YOU SPECIFICLEGAL RIGI{TS, AND YOU MAY ALSO HAVE OTIIER
RIGIITS WHICH VARY FROM STATE TO STATE.
E-3
INDEX
A
I
A/D Conversion 3-3
ConversionModes 4-5
ContinuousConvert 4-7
SingleConvert 4-5
MSB andLSB 4-10
A/D Converter 34
ConversionRate 34
Analog Input 3-3
InputRange 3-3
VO Connections 2-3
Analog Input 24
DigiralVO 24
ResetDrv 24
Status 24
Trigger In and Trigger Out 24
VO Map 4-10
Definition 4-10
Initialization 4-3
Installation 2-3
Intempts 34, 4-7. SeealsoEnd-of-Convert
B
Board Accessories t-3
BoardBlock Diagram 3-3
Board Initialization 2-3. Seeclsa Initialization
BoardLayout l-3
C
Calibration 5-3
Full-ScaleAdjustment 5-5
OffsetAdjustment 5-3
CascadingBoards 24, 4-7
ChannelSelection 44, 4-ll
CustomerService i-3
D
L
Lexicon510 D-3
o
OvervolageProtection 3-3
P
P4VO ConnectorPinout 2-3, B-3
Programmable
Gain 1-6, 3-3
ProgrammablePeripheralInterface 34, 4-3,
4-7, C-3
Bit ser/Reset 4-4
PPI ConrolWord 4-L2
DigitalVO 24, 4-7
S
E
SimultaneousSampling24.
Seealso CascadingBoards
Specifications A-3
Status 4-I3
StatusLine 4-3
End-of-Convert 34, 4-3
ExamplePrograms 4-13
F
FactorySettings 1-3
P2, BaseAddress 14
P3,IntemrptChannelSelection 14
P5, ExternalTrigger In 1-5
Sl, A/D ConversionRate 1-5
T
G
Warranty E-3
TechnicalSupport i4
w
Gain
Gain l-6, 44. SeealsoProgrammable
Seuingthe Gain 44
Gain Settings 1-6
I-1
AD510BoardUser-Selected
Settings
Basel/OAddress:
(hex)
IRQChannelSelected:
IRQChannel#
(decimal)