0% found this document useful (0 votes)
185 views32 pages

Basic Concepts of Microprocessors

The document discusses the basic concepts of microprocessors including: - The differences between a microcomputer, microprocessor, and microcontroller. - What a microprocessor is and how it evolved from discrete components to an integrated circuit. - The internal components of a microprocessor including the ALU, control unit, and registers. - An overview of the 8085 microprocessor architecture, instruction set, and pin descriptions.

Uploaded by

Aakrati Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
185 views32 pages

Basic Concepts of Microprocessors

The document discusses the basic concepts of microprocessors including: - The differences between a microcomputer, microprocessor, and microcontroller. - What a microprocessor is and how it evolved from discrete components to an integrated circuit. - The internal components of a microprocessor including the ALU, control unit, and registers. - An overview of the 8085 microprocessor architecture, instruction set, and pin descriptions.

Uploaded by

Aakrati Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

Basic Concepts of Microprocessors

Differences between:
 Microcomputer –a computer with a
microprocessor as its CPU. Includes memory, I/O
etc.

 Microprocessor –silicon chip which includes ALU,


register circuits & control circuits.

 Microcontroller –silicon chip which includes


microprocessor, memory & I/O in a single
package.
What is a Microprocessor?
 The word comes from the combination micro and
processor
 Processor means to manipulate. It means to
perform certain operations on the numbers or
data.
 In the late 1960’s, processors were built using

discrete elements. but were too large and too slow.


In the early 1970’s the microchip was invented. All
of the components that made up the processor were
now placed on a single piece of silicon. The size
became several thousand times smaller and the
speed became several hundred times faster. The
“Micro” Processor was born.
NOTE:
There was no ever a “mini”-
processor.
It went directly from discrete elements to a
single chip.
Definition of the Microprocessor
The microprocessor is a programmable device
that takes numbers, performs on them
arithmetic or logical operations according to
the program stored in memory and then
produces other numbers as a result.
Block Diagram of Microprocessor
Inside The Microprocessor

Internally, the microprocessor is made up of 3


main units.

 The Arithmetic/Logic Unit (ALU)


 The Control Unit.
 An array of registers for holding data while it
is being manipulated.
Control unit:

 The circuitry that controls the flow of


information through the processor, and
coordinates the activities of the other
units within it.

 On a regular processor, the control unit


performs the tasks of fetching, decoding,
managing execution and then storing
results.
Register sets
 The register section/array consists
completely of circuitry used to temporarily
store data or program codes until they are
sent to the ALU or to the control section or to
memory.
The three cycle instruction execution
model
 To execute a program, the microprocessor
“reads” each instruction from memory,
“interprets” it, then “executes” it.
 To use the right names for the cycles:

◦ The microprocessor fetches each instruction,


◦ Decodes it
◦ Then executes it.
 This sequence is continued until all
instructions are performed.
8085 Microprocessor Architecture
 8-bit general purpose µp
 Capable of addressing 64 k of memory.
 Has 40 pins.
 Requires +5 v power supply.
 Can operate with 3 MHz clock
The ALU
 In addition to the arithmetic & logic circuits,
the ALU includes the accumulator, which is
part of every arithmetic & logic operation.

 Also, the ALU includes a temporary register


used for holding data temporarily during the
execution of the operation.
Registers
 General Purpose Registers
 B, C, D, E, H& L(8 bit registers) •

 Can be used singly • Or can be used as 16 bit register pairs –

BC, DE, HL •
 H & L can be used as a data pointer (holds memory address).

 Special Purpose Registers

Accumulator(8 bit register)


– Store 8 bit data
– Store the result of an operation
Flag Register
– 8 bit register –shows the status of the microprocessor
before/after an operation
Registers
– S (sign flag), Z (zero flag), AC (auxillary carry flag), P
(parity flag) & CY (carry flag)

D7 D6 D5 D4 D3 D2 D1 D0

Sign Flag
 Used for indicating the sign of the data in the
accumulator
Zero Flag
 Is set if result obtained after an operation is 0
Registers
Carry Flag
◦ Is set if there is a carry or borrow from
arithmetic operation.

Auxillary Carry Flag


◦ Is set if there is a carry out of bit 3.

Parity Flag
◦ Is set if parity is even.
Registers
The Program Counter (PC)

 This register always holds the address of the


next instruction.
 Since it holds an address, it must be 16 bits

wide.
 This is a register that is used to control the

sequencing of the execution of instructions.


Registers
The Stack pointer
 The stack pointer is also a 16-bit register

that is used to point into memory.


 The memory this register points to is a

special area called the stack.


 The stack is an area of memory used to hold

data that will be retreived soon.


 The stack is usually accessed in a Last In

First Out (LIFO) fashion


Non Programmable Registers
Instruction Register & Decoder
 Instruction is stored in IR after fetched by

processor.
 Decoder decodes instruction in IR.
The Address and Data Buses
The address bus has 16 signal lines A8 –A15
which are unidirectional.
 The 8 data bits are multiplexed(time shared)

with the 8 Address bits.


◦ So, the bits AD0 –AD7 are bi-directional band serve
D0 –D7 data bus.
◦ To make sure we have the entire address for the
full three clock cycles, we will use an external latch
to save the value of AD7–AD0 when it is carrying
the address bits. We use the ALE signal to enable
this latch
8085 PIN DIAGRAM
8085 PIN DESCRIPTION
 Some important pins are :
 AD0-AD7: Multiplexed Address and data lines.
 ALE: Address latch enable is an output signal. It
goes high when operation is started by processor.
 S0,S1: These are the status signals used to
indicate type of operation.
 RD¯: Read is active low input signal used to read
data from I/O device or memory.
 WR¯:Write is an active low output signal used
write data on memory or an I/O device.
8085 PIN DESCRIPTION
 READY: This an output signal used to check the status of
output device. If it is low, µP will WAIT until it is high.
 TRAP: It is an Edge triggered highest priority , non mask
able interrupt. After TRAP, restart occurs and execution
starts from address 0024H.
 RST5.5,6.5,7.5:These are maskable interrupts and have
low priority than TRAP.
 INTR¯&INTA:INTR is a interrupt request signal after which
µP generates INTA or interrupt acknowledge signal.
 IO/M¯:This is output pin or signal used to indicate
whether 8085 is working in I/O mode(IO/M¯=1) or
Memory mode(IO/M¯=0 ).
8085 PIN DESCRIPTION
 HOLD&HLDA:HOLD is an input signal .When µP receives
HOLD signal it completes current machine cycle and
stops executing next instruction. In response to HOLD
µP generates HLDA that is HOLD Acknowledge signal.
 RESET IN¯:This is input signal. When RESET IN¯ is low µp
restarts and starts executing from location 0000H.
 SID: Serial input data is input pin used to accept serial 1
bit data.
 X1X2 :These are clock input signals and are connected
to external LC or RC circuit. These are divide by two so
if 6 MHz is connected to X1X2, the operating frequency
becomes 3 MHz.
 VCC&VSS: Power supply VCC=+ -5Volt& VSS=-GND
reference.
The 8085 Instructions
 These instructions can be grouped into five
different groups:
◦ Data Transfer Operations
◦ Arithmetic Operations and Logic Operations
◦ Branch Operations
◦ Machine Control Operations
Instruction and Data Formats

 Each instruction has two parts.


◦ The first part is the task or operation to be
performed.
◦ This part is called the “opcode” (operation code).

 The second part is the data to be operated on


• Called the “operand”.
DATA TRANSFER GROUP
These operations simply COPY the data from
the source to the destination.
 They transfer:

◦ Data between registers. •


◦ Data Byte to a register or memory location.
◦ Data between a memory location and a register.
◦ Data between an I\O Device and the accumulator.
DATA TRANSFER GROUP
 MOV Rd, M (Move data from Memory to Rd)
 MVI R, 8 bit Data (Move Immediate data to Register)
 LXI Rp,16 bit (Load 16 bit data to Register pair
Immediate)
 STA 16 bit address (Store Acc data to address)
 LHLD 16 bit address (Load HL pair with data from
address)
 XCHG (Exchange the data from HL pair to DE pair)
 IN 8 bit IO address (Move the data from address to Acc)
 OUT 8 bit IO address (Move the data from Acc to
address)
ARITHMETIC GROUP
 ADD R(ADD register content with Acc and result in A)
 ADD M(ADD Memory content with Acc and result in A )
 ADI 8 bit Data (ADD immediate data with Acc and result in A )
 ADC R (ADD register content with Acc and carry and result in
A)
 SUB R (Subtract register content from Acc and result in A )
 SBB R (Subtract register content from Acc with borrow and
result in A )
 SUI Data (Subtract immediate data from Acc and result in A )
 DAD Rp (Add specified register pair with HL pair)
LOGICAL GROUP
 INR R (Increment register content by 1 )
 DCR R (Decrement register content by 1 )
 INX Rp (Increment register pair content by 1 ).
 ANA R (Logically AND register content with Acc and result in
A)
 ANI Data (Logically AND immediate data with Acc and result
in A )
 ORA R (Logically OR register content with Acc and result in A )
 ORI Data (Logically OR immediate data with Acc and result in
A)
 XRA R (Logically XOR register content with Acc and result in
A)
LOGICAL GROUP
 CMP R (Compare register content with Acc and result in A )
 CPI Data (Compare immediate data with Acc )
 RLC (Rotate accumulator left )
 RAL (Rotate accumulator left with carry ).
 RRC (Rotate accumulator right ).
BRANCH GROUP
 JMP 16 bit address(Unconditional jump to address)
 CALL 16 bit address(Unconditional CALL from address)
 RET (Return from subroutine)
 Conditional Jump Instructions.
◦ JC (Jump if Carry flag is set)
◦ JNC (Jump if Carry flag is reset)
◦ JZ (Jump if zero flag set)
◦ JNZ (Jump if zero flag is reset)
◦ JPE (Jump if parity flag is set)
◦ JPO (Jump if parity odd or P flag is reset )
◦ JP (Jump if sign flag reset )
◦ JM (Jump if sign flag is set or minus)
Addressing Modes
 The microprocessor has different ways of
specifying the data for the instruction. These
are called “addressing modes”.

◦ Immediate addressing: MVI A,20H


◦ Register addressing: MOV A, C
◦ Direct addressing: LDA C200H
◦ Indirect addressing: MOV A, M
◦ Implied addressing: These doesn’t require any operand.
The data is specified in Opcode itself.
RAL: Rotate left with carry

You might also like