8085mp Unit-1
8085mp Unit-1
in
www.LearnEngineering.in
www.LearnEngineering.in
MICROPROCESSOR 8085
• Reference Book:
– Ramesh S. Goankar, “Microprocessor
Architecture, Programming and Applications with
8085”, 5th Edition, Prentice Hall
• Week 1 – Basic Concept and Ideas about Microprocessor.
• Week 2 - Architecture of 8085
• Week 3 - Addressing Modes and Instruction set of 8085
• Week 4 – Interrupts of 8085
• Week 5 onwards – Peripherals.
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
What is a Microprocessor?
• The word comes from the combination micro and
processor.
– Processor means a device that processes whatever. In
this context processor means a device that processes
numbers, specifically binary numbers, 0’s and 1’s.
• To process means to manipulate. It is a general term that
describes all manipulation. Again in this content, it means to
perform certain operations on the numbers that depend on the
microprocessor’s design.
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
Definition (Contd.)
• Lets expand each of the underlined words:
– Programmable device: The microprocessor can perform
different sets of operations on the data it receives depending
on the sequence of instructions supplied in the given
program.
By changing the program, the microprocessor manipulates
the data in different ways.
www.LearnEngineering.in
www.LearnEngineering.in
Definition (Contd.)
– Takes in: The data that the microprocessor
manipulates must come from somewhere.
• It comes from what is called “input devices”.
• These are devices that bring data into the system
from the outside world.
• These represent devices such as a keyboard, a
mouse, switches, and the like.
www.LearnEngineering.in
www.LearnEngineering.in
Definition (Contd.)
– Numbers: The microprocessor has a very narrow view on life. It
only understands binary numbers.
www.LearnEngineering.in
www.LearnEngineering.in
Definition (Contd.)
– Words, Bytes, etc.
• The earliest microprocessor (the Intel 8088 and Motorola’s
6800) recognized 8-bit words.
– They processed information 8-bits at a time. That’s why they are
called “8-bit processors”. They can handle large numbers, but in
order to process these numbers, they broke them into 8-bit pieces
and processed each group of 8-bits separately.
Definition (Contd.)
– Arithmetic and Logic Operations:
• Every microprocessor has arithmetic operations such as add
and subtract as part of its instruction set.
– Most microprocessors will have operations such as multiply and
divide.
– Some of the newer ones will have complex operations such as
square root.
Definition (Contd.)
– Stored in memory :
• First, what is memory?
– Memory is the location where information is kept while not in
current use.
– Memory is a collection of storage devices. Usually, each storage
device holds one bit. Also, in most kinds of memory, these
storage devices are grouped into groups of 8. These 8 storage
locations can only be accessed together. So, one can only read or
write in terms of bytes to and form memory.
– Memory is usually measured by the number of bytes it can hold.
It is measured in Kilos, Megas and lately Gigas. A Kilo in
computer language is 210 =1024. So, a KB (KiloByte) is 1024
bytes. Mega is 1024 Kilos and Giga is 1024 Mega.
www.LearnEngineering.in
www.LearnEngineering.in
Definition (Contd.)
– Stored in memory:
• When a program is entered into a computer, it is
stored in memory. Then as the microprocessor starts
to execute the instructions, it brings the instructions
from memory one at a time.
www.LearnEngineering.in
www.LearnEngineering.in
Definition (Contd.)
– Produces: For the user to see the result of the
execution of the program, the results must
be presented in a human readable form.
• The results must be presented on an output
device.
www.LearnEngineering.in
www.LearnEngineering.in
A Microprocessor-based system
From the above description, we can draw the
following block diagram to represent a
microprocessor-based system:
Input Output
Memory
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
Organization of a microprocessor-
based system
• Let’s expand the picture a bit.
I/O
Input / Output
ALU Register
Array
System Bus
Control Memory
ROM RAM
www.LearnEngineering.in
www.LearnEngineering.in
Memory
• Memory stores information such as instructions
and data in binary format (0 and 1). It provides
this information to the microprocessor whenever
it is needed.
6000
RAM 2 Address Range of 2nd RAM Chip
8FFF
9000
RAM 3 Address Range of 3rd RAM Chip
A3FF
A400
F7FF
FFFF
www.LearnEngineering.in
www.LearnEngineering.in
Memory
• To execute a program:
– the user enters its instructions in binary format into the
memory.
– The microprocessor then reads these instructions and
whatever data is needed from memory, executes the
instructions and places the results either in memory or
produces it on an output device.
www.LearnEngineering.in
www.LearnEngineering.in
Assembly Language
• Entering the instructions using hexadecimal is quite
easier than entering the binary combinations.
– However, it still is difficult to understand what a program
written in hexadecimal does.
– So, each company defines a symbolic code for the
instructions.
– These codes are called “mnemonics”.
– The mnemonic for each instruction is usually a group of
letters that suggest the operation performed.
www.LearnEngineering.in
www.LearnEngineering.in
Assembly Language
• Using the same example from before,
– 00111100 translates to 3C in hexadecimal (OPCODE)
– Its mnemonic is: “INR A”.
– INR stands for “increment register” and A is short for
accumulator.
www.LearnEngineering.in
www.LearnEngineering.in
Assembly Language
• It is important to remember that a machine
language and its associated assembly language are
completely machine dependent.
– In other words, they are not transferable from one
microprocessor to a different one.
www.LearnEngineering.in
www.LearnEngineering.in
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
• 8085 upward compatible
www.LearnEngineering.in
www.LearnEngineering.inPins
Power
Supply: +5 V
Frequency
Generator is
connected to
those pins
Input/Output/
Memory
Read
Write
Address latch
Multiplexed
Enable
Address Data
Bus
Address
Bus
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
A r c h i t e cture of Intel 8085
www.L earn En gi nee rin g .in
Microprocessor
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
The ALU
• In addition to the arithmetic & logic circuits, the
ALU includes the accumulator, which is part of
every arithmetic & logic operation.
www.LearnEngineering.in
www.LearnEngineering.in
• 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)
Accumulator Flags
– Special Purpose Registers B C
D E
• Accumulator (8 bit register) H L
Program Counter
– Store 8 bit data Stack Pointer
– Store the result of an operation
– Store 8 bit data during I/O transfer Address 16 8 Data
www.LearnEngineering.in
www.LearnEngineering.in
• Flag Register
– 8 bit register – shows the status of the microprocessor before/after an
operation
– S (sign flag), Z (zero flag), AC (auxillary carry flag), P (parity flag) &
CY (carry flag)
D7 D6 D5 D4 D3 D2 D1 D0
S Z X AC X P X CY
– Sign Flag
• Used for indicating the sign of the data in the accumulator
• The sign flag is set if negative (1 – negative)
• The sign flag is reset if positive (0 –positive)
www.LearnEngineering.in
www.LearnEngineering.in
• Zero Flag
– Is set if result obtained after an operation is 0
– Is set following an increment or decrement operation of that register
10110011
+ 01001101
1 00000000
• Carry Flag
– Is set if there is a carry or borrow from arithmetic operation
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
Demultiplexing AD7-AD0
8085
A15-A8
ALE
AD7-AD0 Latch
A7- A0
D7- D0
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
www.LearnEngineering.in
The Overall Picture
• Putting all of the concepts together, we get:
Chip Selection
A15- A10 Circuit
8085
A15-A8 CS
ALE
A9- A0 1K Byte
AD7-AD0 Latch
A7- A0
Memory
Chip
WR RD IO/M D7- D0
RD WR
www.LearnEngineering.in