2.8085progmodel
2.8085progmodel
CREDITS - 4 (LTP:3,0,1)
0
Microprocessors
1
2
Organization of microprocessor based system
3
Microprocessor
4
microprocessor
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
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
13
Data tranfer
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
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
30
Timing and control unit
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