2CP05: COMPUTER ORGANIZATION AND ARCHITECTURE
CREDITS - 4 (LTP:3,0,1)
0
Microprocessors
Moore’s law : cofounder of intel corporation
Number of transistors per integrated circuit would double
every 18 months
SSI: gate available as IC
MSI: more than 100gates in signle IC (counter)
LSI: more than 1000 gates
VLSI and SLSI (super large scale)
Since the invention of 4004 processors are designed with
2300 transistors and 640bytes of memory and 108khz : LSI
Now we have processor more than 700 million transistors
that can address one terabyte of memory and that can
operate at 3.3GHZ frequency
1
2
Organization of microprocessor based system
Block diagram of microprocessor based system
It include three component : microprocessor, I/O and
memory
These components are organized around a common
communication path called a bus
I/O is also known as peripheral
3
Microprocessor
It is a clock driven semiconductor device consist of
electronics logic circuits manufactured by using either a LSI
or VLSI technique
It is capable of performing various computing functions and
making decisions to change the sequence of program
execution
Microprocessor has ALU, register array and control unit
ALU perform arithmetic operations as addition/subtraction
and logic operations as AND, OR and exclusive OR
Identified by letters such as B, C,D,E,H and L. these
registers are used to store data temporarily during the
execution of a program and are accessible to users through
instructions
4
microprocessor
Control Unit : it provides the necessary timing and control
signals to all the operations in the microprocessor. It
controls the flow of data between the microprocessor and
memory and peripherals
Memory : RAM and ROM
Input device : on-off keys, Matrix keyboard and ADC
Output device: seven segment LED and LCD display
System bus : it is a communication path between
microprocessor and memory and I/O
All peripherals and memory share the same bus, however
microprocessor communicate with only one device at a time.
The timing is provided by the control unit of the
microporcessor
5
Microprocessor
It recognize and operate in binary numbers
The word is defined as the number of bits the
microprocessor recognizes and process at a time.e.g 8085
word length is 8 bit or one byte and processor is called 8 bit
Group of 4bits is called nibble
Each microprocessor has a fixed set of instructions in the
form of binary patterns called a machine language
E.g. 8 bit microprocessor can have language of 256 words.
8085 utilized 246 such bit pattern and forming 74 different
instructions
However it is difficult for human to communicate in the
language 0s and 1s. Therefore the binary instructions are
given abbreviated names called mnemonics and program
written using mnemonics called assembly language for a given
microprocessor. Assembler is used to convert assembly
language to machine language or hand coding is used
6
Machine language and assembly language are microprocessor
specific so called low level langauges
Assembly language is specific to a given machine so general
purpose languages such as C, C++ etc have been devised, a
program written in these languages are called higher level
languages
7
8085 programming model
Microprocessor can be represented in terms of its hardware
(physical electronics components) and programming
model(information needed to write programs)
One segment includes ALU, Accumulator, instruction
decoder and flags
Second segment consists of 8 bit and 16bit registers
Three buses: 16bit unidirectional address bus, 8bit
bidirectional data bus and control bus
Hardware model
8
Programming model
9
Programming model
It includes six registers, one accumulator and flag register
It has two 16 bit registers: stack pointer(SP) and program
counter (PC)
Registers : six general Purpose Registers to store 8 bit data
: B,C,D,E,H and L. they can be combined as register Paris :
BC, HL and DE to perform 16bit operations
Accumulator is part of ALU identified as A. used to hold one
of the operand in ALU and to store result
Flags : ALU includes five flip-flops which are set or reset
after an operation according to data conditions of the result
in the accumulator and other registers. They are called Zero
(Z), carry(CY), Sign(S), parity(P) and auxiliary carry(AC) flag
10
11
12
instruction
An instruction is a binary pattern designed a microprocessor
to perform a specific function
The entire group of instructions called the instruction set,
determines what functions the microprocessor can perform.
Instruction set of 8085 can be classified into following five
functional categories
1. data transfer
2. arithmetic
3. logical operations
4. branching operations
5. machine control
13
Data tranfer
Between registers e.g. MOV A,B
Specific data byte to register or memory location
E.g. MVI B,35H
LXI H,2500H
MVI M,25H
Between memory location and register
E.g. MOV M,B or MOV B,M
Between I/o and accumulator
IN 35H OUT 50H
14
Arithmetic & Logical operations
Addition e..g ADD B (A)=(A)+(B)
LXI H,2300H
MVI M,50H
ADD M (A)= (A)+50H
The content of register or memory location is added with accumulator
and result is stored in accumulator
Subtraction e.f SUB C (A)=(A)-(C)
Increment/decrement e.g. INR D or DCR B or INX B or DCX B
Logical operations
AND, OR and Exclusive or
E.g. ANA D ORA B XRA C
Rotate contain of accumulator is shifted either right or left by one b
e.g. RLC, RRC, RAL,RAR
Compare any register or memory location is compared with accumulato
CMP C
Complement : find one’s complement of accumulator
E.g. CMA 15
Branching operations
JUMP e.g. JMP 2500H JC, JNC, JZ, JNZ,…
Call and return e..g call 2300H RET
16
8085 pin detils
17
18
19
8085 can operate with maximum clock frequency 3MHZ. To obtain
3MHZ crystal should be of 6MHZ. The capacitor is required to assure
oscillator startup at the correct frequency
20
21
Externally initiated signals
Reset in : when the signal on this pin goes low the program
counter is set to zero, the buses are tri-stated and the
microprocessor is reset
Reset out : this signal indicates that the microprocessor is
being reset. This signal can be used to reset other devices
Interrupts : TRAP,RST 7.5, RST 6.5, RST 5.5 and INTR
Ready
HOLD and HLDA
Serial I/O ports
SID(serial input data) and SOD (serial output data)
22
Power on and hardware reset circuit
23
24
74ls373
25
26
27
28
Functional block diagram of 8085
MAR
MBR
29
ALU
It includes Accumulator, temporary register, arithmetic and
logic circuits and five flags
Sign flag : after arithmetic or logic operations if D7 bit is
one sign flag become one
Zero flag: after arithmetic or logic operations result is zero
it become one
Auxilary flag : in an arithmetic operation when carry is
generated by digit D3 and passed to D4 it become one. Use
internally for BCD operations
Parity flag : after arithmetic or logic operations if result has
even number of 1 it become one
Carry flag: after arithmetic operation if result is more than
8 bit it become one. Use as borrow flag in subtraction
30
Timing and control unit
Synchronized all operations with clock and generate the
control signal necessary for communication BETWEEN
MICROPORCESSOR AND PERIPHERLAS
31
Microprocessor based system
32
Mpu(microporcessing unit) as a device or group of device
that can communicate with peripherals, provide timing
signals, direct data flow and perform computing function as
specified by the instruction in memory
Can we say 8085 as MPU?
No because it has two limitations
1. the low order address bus is multiplexed with data bus
2. appropriate control signals need to be generated to
interface memory and I/O
33
All the various function performed by 8085 can be classified
in three general categories
Microprocessor initiated
Memory read, memory write, I/O read, I/O write
Internal operations
Store 8 bit data, arithmetic and logical operations, test for
condition and store data temporary during execution on
stack
Peripheral or externally initiated operations
Reset , interrupt, ready, hold
Ready is used to synchronized slower peripheral with
microprocessor
Hold is used when external device want to take control of
bus from microprocessor e.g. DMA
34