MicroprocessorandInterfaces
8085architecture
RD(Output3state)
IndicatesthatselectedmemoryorI/Odeviceistoberead
anddatabusisavailableforthedatatransfer.
dd t b i
il bl f th d t t
f
WR(Output3state)
IndicatesthatdataontheDataBusistobewrittenintothe
selectedmemoryorI/Olocation
DataissetupatthetrailingedgeofWR
TristatedduringHoldandHaltmodes
g
SO,S1(Output)(statussignal)
SO S1 (Output) (status signal)
DataBusStatus.Encodedstatusofthebuscycle
S1
S0
HALT
WRITE
READ
FETCH
TheseinterruptshavehigherprioritythanINTR
SOD(output)
SOD (output)
Serialoutputdataline
TheoutputSODissetorresetasspecifiedbythe
Th
t t SOD i
t
t
ifi d b th
SIMinstruction
Power supply
Powersupply
Vcc
+5voltsupply
Vss
GroundReference
Clock frequency
Clockfrequency
X1,X2(Input)
, ( p )
CrystalorR/Cnetworkconnectionstosettheinternal
clock
GeneratorX1canalsobeanexternalclockinput
Generator X1 can also be an external clock input
insteadofacrystal
Inputfrequencyisdividedby2togettheinternal
operating freq enc
operatingfrequency
CLK(Output)
Clock
ClockOutputforuseasasystemclockwhenacrystal
Output for use as a system clock when a crystal
orR/CnetworkisusedasaninputtotheCPU
TheperiodofCLKistwicetheX1,X2inputperiod
InternalArchitectureof8085
Microprocessor
ArithmeticLogicUnit
A ith ti L i U it
ALUperformstheactualnumericalandlogic
operationsuchasadd,subtract,AND,OR,etc.
p
UsesdatafrommemoryandAccumulatortoperform
operationandstorestheresultinAccumulator.
Registers
Registers
8085
8085hassixgeneral
has six generalpurpose
purposeregisterstostore
registers to store
8bitdata
IdentifiedasB,C,D,E,H,andL
Identified as B C D E H and L
Thesecanbecombinedasregisterpairs BC,
DE d HL toperform16bitoperations
DE,andHL
f
16 bi
i
programmercanusetheseregisterstostore
orcopydataintotheregistersbyusingdata
copyinstructions.
Accumulator
Accumulator
Accumulator
Accumulatorisan8
is an 8bit
bitregisterthatisapart
register that is a part
ofarithmeticlogicunit(ALU)
Usedtostore8bitdataandtoperform
Used to store 8 bit data and to perform
arithmeticandlogicaloperations
Resultofanoperationisstoredinthe
R l f
i i
di h
accumulator
AccumulatorisalsoidentifiedasregisterA
Flags
ALU
ALUincludesfiveflip
includes five flipflops,
flops,whicharesetor
which are set or
resetafteranoperationaccordingtodata
conditionsoftheresultintheaccumulator
andotherregisters
Zero(Z)
Carry(CY)
Sign(S)
Parity(P)
AuxiliaryCarry(AC)
Flags
Flags
Flagsarestoredinthe8
are stored in the 8bit
bitregistersothat
register so that
theprogrammercanexaminetheseflags(data
conditions) by accessing the register through
conditions)byaccessingtheregisterthrough
aninstruction
microprocessorusestheseflagstotestdata
conditions
Timing diagram
Timingdiagram
Timing
Timingdiagramisthedisplayofinitiationof
diagram is the display of initiation of
read/writeandtransferofdataoperations
under the control of 3status
underthecontrolof3
statussignalsIO/M,S
signals IO/M S1,
andS0
Uniquecombinationofthese3statussignals
Unique combination of these 3 status signals
identifyreadorwriteoperationandremain
valid for the duration of the machine cycle
validforthedurationofthemachinecycle
Machinecyclestatusandcontrol
signals
l
Processor cycle
Processorcycle
For
Forexecutinganyprogram,2stepsare
executing any program 2 steps are
followedsequentiallywiththehelpofclocks
Fetch
Execute
SSumofthefetchandexecutecycleiscalled
f th f t h d
t
l i
ll d
theinstructioncycle
Opcode
Op
codefetchcycle
fetch cycle
1st machinecycleofanyinstructionisalways
machine cycle of any instruction is always
anOpCodefetchcycle
Inittheprocessordecidesthenatureof
In it the processor decides the nature of
instruction
Itisofatleast4
It is of at least 4states
statesandmaygoupto6
and may go up to 6states
states
DuringM1cycle,theprocessorputstheprogram
counter contents on the address bus and reads
countercontentsontheaddressbusandreads
theopcodeoftheinstructionthroughread
process
Opcode
Op
codefetchcycle
fetch cycle
T1,TT2,andT
and T3 clockcyclesareusedforbasic
clock cycles are used for basic
memoryreadoperationandtheT4 clockand
beyond are used for its interpretation of the
beyondareusedforitsinterpretationofthe
opcode
Basedontheseinterpretations,theP
Based on these interpretations the P
proceedsfurtherfor1or2machinecycleof
memory read and writes
memoryreadandwrites
OPCODE FETCH
OPCODEFETCH
AlowIO/Mmeansmicroprocessorwantstocommunicate
withmemory
ThePsendsahighonstatussignalS1 andS0 indicating
fetchoperation
ThePsends16bitaddress.ADbushasaddressin1st
clockofthe1stmachinecycle,T1
AD7 toAD
to AD0 addressislatchedintheexternallatchwhen
address is latched in the external latch when
ALE=1
ADbusnowcancarrydata
InT
In T2,theRDcontrolsignalbecomeslowtoenablethe
the RD control signal becomes low to enable the
memoryforreadoperation
ThememoryplacesopcodeontheADbus
OPCODE FETCH
OPCODEFETCH
Thedataisplacedinthedataregister(DR)andthenitis
transferredtoinstructionregister(IR)
DuringT3,theRDsignalbecomeshighandmemoryis
disabled
DuringT4,theopcodeissentfordecodinganddecodedin
T4.
TheexecutionisalsocompletedinT
The execution is also completed in T4 iftheinstructionis
if the instruction is
singlebyte
Moremachinecyclesareessentialfor2or3byte
instructions. The 1st machine cycle M1 is meant for
instructions.The1stmachinecycleM1ismeantfor
fetchingtheopcode.ThemachinecyclesM2 andM3 are
requiredeithertoread/writedataoraddressfromthe
memoryorI/Odevices
y
/
Read Cycle
ReadCycle
The
Thehighorderaddress(A
high order address (A15 A8)andlow
) and low
orderaddress(AD7 AD0)areassertedon1st
low going transition of the clock pulse
lowgoingtransitionoftheclockpulse
A15 A8 remainsvalidinT1,T2,andT3 i.e.
duration of the bus cycle but AD7 AD0
durationofthebuscycle,butAD
remainsvalidonlyinT1
ALEisassertedatthebeginningofT
ALE i
d
h b i i
f T1 ofeach
f
h
buscycleandisnegatedtowardstheendofT1
Write Cycle
WriteCycle
After
Aftertheterminationoftheloworderaddress,at
the termination of the low order address at
thebeginningoftheT2,dataisassertedonthe
address/databusbytheprocessor
/
y
p
WRcontrolisactivatednearthestartofT2 and
becomes inactive at the end of T3
becomesinactiveattheendofT
TheprocessormaintainsvaliddatauntilafterWR
is terminated. This ensures that the memory or
isterminated.Thisensuresthatthememoryor
porthasvaliddatawhileWRisactive