Professional Documents
Culture Documents
2-Introduction To Microprocessors & Microcontrollers-12-12-2022
2-Introduction To Microprocessors & Microcontrollers-12-12-2022
2-Introduction To Microprocessors & Microcontrollers-12-12-2022
ANILKUMAR P
Asst. Professor
Department of Embedded Technology
School of Electronics Engineering
VIT Vellore
INTRODUCTION TO MICROPROCESSORS
AND CONTROLLERS
Microprocessor-It is a processor in which memory and I/O output component is connected externally.
Microcontroller-It is a controlling device in which memory and I/O output component is present internally.
2
BECE204L MICROPROCESSORS AND MICROCONTROLLERS
INTRODUCTION TO MICROPROCESSORS
AND CONTROLLERS
MICROPROCESSOR MICROCONTROLLER
3
BECE204L MICROPROCESSORS AND MICROCONTROLLERS
INTRODUCTION TO MICROPROCESSORS
Memory
General purpose processor Microprocessor has two types of memory
4
BECE204L MICROPROCESSORS AND MICROCONTROLLERS
Von-Neumann and Harvard Architectures
Harvard Architecture:
Harvard Architecture is the digital computer
architecture whose design is based on the
concept where there are separate storage
and separate buses (signal path) for
instruction and data. It was basically
developed to overcome the bottleneck of
Von Neumann Architecture.
Differences between Von-Neumann and Harvard Architectures
8 bit microprocessor
7
BECE204L MICROPROCESSORS AND MICROCONTROLLERS
8085
Architecture
8
BECE204L MICROPROCESSORS AND MICROCONTROLLERS
8085
9
BECE204L MICROPROCESSORS AND MICROCONTROLLERS
8085 Microprocessor
• Accumulator
• It is an 8-bit register used to perform arithmetic, logical, I/O & LOAD/STORE
operations. It is connected to internal data bus & ALU.
• Arithmetic and logic unit
• As the name suggests, it performs arithmetic and logical operations like Addition,
Subtraction, AND, OR, etc. on 8-bit data.
• General purpose register
• There are 6 general purpose registers in 8085 processor, i.e. B, C, D, E, H & L. Each
register can hold 8-bit data.
• These registers can work in pair to hold 16-bit data and their pairing combination is
like B-C, D-E & H-L.
10
BECE204L MICROPROCESSORS AND MICROCONTROLLERS
8085 Microprocessor
• Temporary register
• It is an 8-bit register, which holds the temporary data of arithmetic and logical operations.
• W and Z are two 8-bit temporary registers of 8085 microprocessor, which is not accessible to the
user. (non programmable)
• They are exclusively used for the internal operation by the microprocessor.
• These registers are used either to store 8-bit of information in each W and Z registers or a 16-bit
data in W, Z register pair with lower order 8-bits in Z and higher-order 8-bits in W register.
• Program counter
• It is a 16-bit register used to store the memory address location of the next instruction to be
executed.
• Microprocessor increments the program whenever an instruction is being executed, so that the
program counter points to the memory address of the next instruction that is going to be executed.
11
BECE204L MICROPROCESSORS AND MICROCONTROLLERS
8085 Microprocessor
• Flag register
• It is an 8-bit register having five 1-bit flip-flops, which holds either 0 or 1 depending upon the result
stored in the accumulator.
• These are the set of 5 flip-flops −
• Sign (S)- After any operation if the MSB (B(7)) of the result is 1, it indicates the
number is negative and the sign flag becomes set, i.e. 1. If the MSB is 0, it
indicates the number is positive and the sign flag becomes reset i.e. 0
• Zero (Z) After any arithmetical or logical operation if the result is 0 (00)H, the zero
flag becomes set i.e. 1, otherwise it becomes reset i.e. 0.
• Auxiliary Carry (AC) This flag is used in the BCD number system(0-9). If after any arithmetic or
logical operation D(3) generates any carry and passes it on to D(4) this flag becomes set i.e. 1,
otherwise, it becomes reset i.e. 0.
• Parity (P) If after any arithmetic or logical operation the result has even parity, an
even number of 1 bit, the parity register becomes set i.e. 1, otherwise it
becomes reset i.e. 0
• Carry (C) Carry is generated when performing n bit operations and the result is more
than n bits, then this flag becomes set i.e. 1, otherwise, it becomes reset i.e. 0
12
BECE204L MICROPROCESSORS AND MICROCONTROLLERS
8085 Microprocessor
• Stack pointer
• It is also a 16-bit register works like stack, which is always incremented/decremented by 2 during
push & pop operations.
• The stack is a LIFO (last in, first out) data structure implemented in the RAM area and is used to store addresses and
data when the microprocessor branches to a subroutine. Then the return address used to get pushed on this stack.
Also to swap values of two registers and register pairs we use the stack as well.
• The Stack Pointer register will hold the address of the top location of the stack.
• On a stack, we can perform two operations. PUSH and POP.
• In case of PUSH operation, the SP register gets decreased by 2 and new data item used to insert on
to the top of the stack. On the other hand, in case of POP operation, the data item will have to be
deleted from the top of the stack and the SP register will get increased by the value of 2.
• Upon Push
• SP is decremented and contents of higher order register of register pair is copied to Stack.
• Stack pointer is decremented again and contents of lower register of the register pair is copied to Stack
• Upon POP-
• Content of topmost location of stack is copied to lower register- SP is incremented by 1.
• The content of stack location pointed by SP is copied to higher register of the pair, SP is incremented by 1.
13
BECE204L MICROPROCESSORS AND MICROCONTROLLERS
8085 Microprocessor
14
BECE204L MICROPROCESSORS AND MICROCONTROLLERS
8085 Microprocessor
• Interrupt control
• As the name suggests it controls the interrupts during a process. When a microprocessor is
executing a main program and whenever an interrupt occurs, the microprocessor shifts the control
from the main program to process the incoming request. After the request is completed, the
control goes back to the main program.
15
BECE204L MICROPROCESSORS AND MICROCONTROLLERS
8085 Microprocessor
16
BECE204L MICROPROCESSORS AND MICROCONTROLLERS