1 Microprocessor Architecture
1 Microprocessor Architecture
MicroprocessorandInterfaces
Microprocessorarchitecture
Architecture
Architecture
Programmable
Programmabledigitaldevice
digital device
Manipulatesdataandcommunicatewith
peripherals
Operatesonpredesignedsetofinstructions
Architecturereferstothelogicdesignofthe
microprocessor
Programming a microprocessor
Programmingamicroprocessor
Microprocessor
Microprocessorcanbeprogrammedto
can be programmed to
performfunctionsongivendatabywriting
specific instructions into its memory
specificinstructionsintoitsmemory
Readsoneinstructionatatime,matchesitwith
its instruction set, and performs the data
itsinstructionset,andperformsthedata
manipulationspecified
Resultisstoredbackintomemoryordisplayedon
esu s s o ed bac
o e o y o d sp ayed o
anoutputdevice
Microprocessor functions
Microprocessorfunctions
Classification
Classificationoffunctionsperformedbya
of functions performed by a
microprocessor
Microprocessorinitiatedoperations
Microprocessor initiated operations
Internaloperations
Peripheral(Externallyinitiated)operations
Peripheral (Externally initiated) operations
Memoryread
Memory
read
Memorywrite
I/Oread(getdatafromainputdevice)
/O
d(
d
f
i
d i )
I/Owrite(senddatatoaoutputdevice)
Alltheseoperationsrequirecommunication
All
these operations require communication
withaperipheralormemorylocation
MPU Peripheralcommunication
MPU
Peripheral communication
Communication
Communicationprocessbetween
process between
microprocessorandperipheraldevicesconsist
of the following three steps
ofthefollowingthreesteps
Identifyperipheralormemorylocation(usingits
address)
Transferinformation(data/instructioninbinary
form)
o )
Providetimingandsynchronizationdetails
Address bus
Addressbus
16bitswide(A
6 b ts de ( 0,,A1, ,
,A155)
8085canaccesslocationswithnumbersfrom0to
65536,Atotalof64Kaddresses
Unidirectional
Informationflowsoutofthemicroprocessorandinto
the memory or peripherals
thememoryorperipherals
When8085wantstoaccessaperipheralora
memory location it places the 16bit
memorylocation,itplacesthe16
bitaddresson
address on
theaddressbusandthensendstheappropriate
controlsignals
Data bus
Databus
8bitswide(D
8 bits wide (D0,D
D1,,D
D7)
Bidirectional
Informationflowsbothwaysbetweenthe
I f
ti fl
b th
b t
th
microprocessorandmemoryorI/O
8085
8085usesthedatabustotransferthebinary
th d t b t t
f th bi
information(data)
8085canmanipulate8bitsofdataatatime
Widthofdatabus==nbitmicroprocessor
Control bus
Controlbus
Made
Madeupofanumberofsinglebitcontrol
up of a number of single bit control
signals
Synchronizationsignals
Synchronization signals
Timingsignals
Memoryread/writesignal
Memory read/write signal
I/Oread/writesignal
Storingdata
Storing
data
Arithmeticandlogicoperation
Testforconditions
f
di i
Sequencingtheexecutionofprogram
Storingdatatemporarilyinstack
Register description
Registerdescription
Accumulator(A)
Accumulator (A)
Usedforstoringtheresultofanyoperation
Flags
UsedbyALUtoconveysomeinformation(zero,carry,
etc.))
B,C,D,E,H,L
Generalpurposeregisterstostoreintermediatedata
General purpose registers to store intermediate data
H,L
Alsousedasmemorypointer
Also used as memory pointer
Example program
Exampleprogram
2000
06
MVIB, 76h
2001
78
2002
3E
2003
F2
2004
80
ADDB
2005
76
HLT
MVIA,F2h
Interrupt
Microprocessorsoperationsareinterruptedand
Microprocessors operations are interrupted and
theitexecuteswhatiscalledaserviceroutine
Routine
Routine handles
handles theinterrupt,(performthe
the interrupt (perform the
necessaryoperations),thenthemicroprocessor
returnstoitspreviousoperationsandcontinues
p
p