Professional Documents
Culture Documents
Architectures
LEC. 1
INTRODUCTION TO 8085 MICROPROCESSOR
Syllabus
Textbooks
Baary B. Brey, The Intel microprocessors (4th ed.): 8086/8088,
80186/80188, 80286, 80386, 80486, Pentium, and Pentium Pro
processor: architecture, programming, and interfacing.
Microcomputer
Software Hardware
Microcomputer
Software:
Operating System,
System Software
Library Code
Instruction Set
Machine
Architecture
Microcomputer
Hardware of the microcomputer in general consist of:
◦ Microprocessor
◦ Memory
◦ Input Devices
◦ Output Devices
Microcomputer
Input unit contains the hardware devices those are used to enter the
data in to computer system, Keyboard and mouse are most common
devices.
The output contain the hardware devices those are use to output the
data from the computer system, Monitor and printer are most common
output devices.
Nowadays so many other I/O devices.
Microcomputer
Memory
◦ The memory or storage section of the computer consist the devices used to
store the data or information during the process.
◦ Memory unit is used to hold intermediate and final result of computer
program.
Microprocessor - Overview
Microprocessor is a controlling unit of a micro-computer, fabricated on
a small chip capable of performing ALU (Arithmetic Logical Unit)
operations and communicating with the other devices connected to it.
Microprocessor consists of an ALU, register array, and a control unit.
◦ ALU performs arithmetical and logical operations on the data received from
the memory or an input device.
◦ Register array consists of registers identified by letters like B, C, D, E, H, L and
accumulator.
◦ The control unit controls the flow of data and instructions within the
computer.
Microprocessor - Overview
The microprocessor follows a sequence: Fetch, Decode, and then
Execute.
1. The instructions are stored in the memory in a sequential order.
2. The microprocessor fetches those instructions from the memory, then
decodes it and executes
3. Those instructions till STOP instruction is reached.
4. Later, it sends the result in binary to the output port.
5. Between these processes, the register stores the temporarily data and
ALU performs the computing functions.
Microprocessor - Overview
List of Terms Used in a Microprocessor
◦ Instruction Set − It is the set of instructions that the microprocessor can
understand.
◦ Clock Speed − It determines the number of operations per second the
processor can perform. It is expressed in megahertz (MHz) or gigahertz
(GHz).It is also known as Clock Rate.
◦ Word Length − It depends upon the width of internal data bus, registers,
ALU, etc. An 8-bit microprocessor can process 8-bit data at a time. The word
length ranges from 4 bits to 64 bits depending upon the type of the
microcomputer.
Microprocessor - Overview
Microprocessors
RISC CISC
Microprocessor - Overview
RISC CISC
Reduced Instruction Set Computer Complex Instruction Set Computer
It consists of simple instructions. Larger number of instructions.
It utilizes simple addressing modes and Variety of addressing modes.
fixed length instructions for pipelining.
One cycle execution time. Several cycles may be required to
execute one instruction.
“LOAD” and “STORE” instructions are
used to access the memory location. One instruction is required to
support multiple addressing modes.
It consists of larger number of registers.
Instruction-decoding logic is
It consists of less number of transistors. complex.
ARM processors Intel Processors
Generation of Microprocessor
1st Generation:
◦ 1971 to 1973.
◦ In 1971, INTEL created the first microprocessor 4004 that would run at a clock
speed of 108 KHz.
2nd Generation:
◦ 1973 to 1978
◦ Very efficient 8-bit microprocessors were implemented like INTEL-8085.
3rd Generation:
◦ 1979 to 1980
◦ 16 bit processors.
◦ INTEL 8086/80186/80286 were developed.
◦ Speeds of those processors were four times better than the 2nd generation
processors.
Generation of Microprocessor
4th Generation:
◦ 1981 to 1995
◦ 32 bit processors.
◦ INTEL-80386 was the popular processors.
5th Generation:
◦ From 1995 to until now
◦ This generation has been bringing out high-performance and high-speed
processors
◦ 32 bit and 64-bit processors. Such processors include Pentium, Celeron, Dual
and Quad core processors.
Intel 8085 Microprocessor
8-bit microprocessor .
40 Pin dual in line IC package.
The clock speed used in this microprocessor is about 3 MHZ.
Capable of addressing up to 64 K bytes of memory.
2- Address Bus
3- Data Bus
WR
◦ Write memory or IO device.
◦ Indicates the data that to be written on the data bus.
Control and Status signals
IO/M
◦ It goes high to indicate an I/O operation.
◦ It goes low for memory operation.
S1 & S2
◦ The status signals (S0, S1) along with IO/M signal indicate the type of
machine cycle in progress.
Control and Status signals
ALE
◦ It used to demultiplex address/data bus of the microprocessor.
◦ When it is high “1”, it indicates that the AD0-AD7 are address.
◦ When it is low “0”, it indicates that the AD0-AD7 are data.
1 – Power supply and Clock
frequency signals
2- Address Bus
3- Data Bus
RST 2 10 H
RST 3 18 H
RST 4 20 H
RST 5 28 H
RST 6 30 H
RST 7 38 H
Interrupts and Rest signals
Rest In
◦ It is used to rest the microprocessor
◦ The program counter inside the microprocessor is set to zero.
◦ The buses are tri-stated.
Rest Out
◦ It indicates CPU is being reset.
◦ Used to rest al connected devices when the microprocessor is reset.
1 – Power supply and Clock
frequency signals
2- Address Bus
3- Data Bus
6- DMA
DMA
The tri-state gates are used to disconnect all devices except that is
communicating at a given instant.
The CPU controls the data transfer operation between memory and I/O
device.
DMA operation is used for large volume data transfer between memory
and an I/O device dirctly.
DMA
The CPU is disabled by tri-stating its buses and the transfer is effected
directly by external control circuits.
Memory
CPU
I/O
devices
DMA
HOLD and HOLDA
◦ The hold signal generated by the DMA controller circuit.
◦ When the 8085 microprocessor receive the hold signal, it is acknowledge the
request by sending out HOLDA signal and leaves out the control of the buses.
◦ After the HOLDA signal the DMA starts the dirct transfer of data.
DMA
Ready signal
◦ If this signal is high during a read or write cycle, it indicates that memory or
peripheral is ready to send or receive data.
◦ If READY is low, CPU will wait for READY to go HIGH before completing the
read or write cycle.
1 – Power supply and Clock
frequency signals
2- Address Bus
3- Data Bus
6- DMA
7- Serial
Serial I/O
These signal are used for serial communication.
SID
◦ Serial input data line
SOD
◦ Serial output data line
INTERNAL ARCHITECTURE OF
8085
INTERNAL ARCHITECTURE OF
8085
Registers Section
Arithmetic and Logic Unit
Timing and Control Section
Interrupt Control
Serial Input / Output Control
Registers Section
What is a register?
◦ A register is a temporary storage area built into a CPU.
◦ Some registers are used internally and cannot be accessed outside
the processor.
◦ While others are user-accessible.
◦ Most modern CPU architectures include both types of registers.
Registers Section
Accumulator
◦ It is a 8 bit buffer register extensively used in arithmetic, logic, load and store
operations as well as in input / output instructions.
◦ All the arithmetic and logical operations are performed on the accumulator
contents; i.e. one of the operand is always taken into the accumulator.
Registers Section
Temporary Register – 8 bit register
◦ Temporary register is an 8-bit register.
◦ As the name suggests this register acts as a temporary memory during the
arithmetic and logical operations.
◦ Unlike other registers, this temporary register can only be accessed by the
microprocessor and it is completely inaccessible to programmers.
Registers Section
B, C, D, E, H and L registers
◦ These registers are 8-bit general purpose registers.
◦ These registers can either be used as single register or a combination of two
registers as 16 bit register pair.
◦ The valid register pairs are B-C, D-E or H-L register pairs.
◦ The higher order byte of 16 bit data is stored in first register (B in B-C register
pair), and low order byte in the second register (C in B-C register pair).
Registers Section
Flag (F) Register
◦ It is an 8-bit register associated with the execution of instructions in the
microprocessor.
1. Sign flag (S)
2. Zero flag (Z)
3. Carry flag (CY)
4. Parity flag (P)
5. Auxiliary Carry flag (AC).
Registers Section
Flag (F) Register
Registers Section
Flag (F) Register
◦ Sign flag (S) The sign flag is set (S = 1), if the result of the operation of the
instruction is negative (MSB of the result is 1); otherwise it is reset (S = 0) for
the positive result (MSB is zero).
◦ Zero flag (Z) The zero flag is set (Z = 1) if the result of the operation of the
instruction is zero otherwise this flag is reset (Z = 0). i.e. Z = 1 if the result is
zero, and Z = 0 if the result is not zero.
Registers Section
Flag (F) Register
◦ Carry flag (CY) The carry flag is set to 1, if there exist a carry (or borrow) to
the highest order bit (non-existent 9th position) as a result of the execution
of addition or subtraction instructions.
◦ Parity flag (P) after an arithmetic and logic operation, if the result has even
number of 1s, then parity bit is set. If on the other hand the result has odd
number of 1s, the parity flag is reset.
Registers Section
Flag (F) Register
◦ Auxiliary carry (AC) This is a new flag in 8085 microprocessor. This flag (AC) is
set to 1, if there is an overflow at bit 3 of the accumulator. AC flag is used in
BCD arithmetic.
Registers Section
Program Counter (PC)
◦ 16 bit register
◦ It is used to send 16 bit address to fetch the instruction from the memory.
◦ It acts as a pointer which indicates the address of the next instruction to be
fetched and executed.
◦ The program counter is updated after an instruction has been fetched by the
processor.
Registers Section
Instruction Register (IR)
◦ It is a 8-bit register.
◦ The instruction is stored in this register when it is fetched from the memory.
Registers Section
Stack Pointer
◦ The stack is an area of RAM (random access memory or read / write
memory) in which temporary information is stored. It is stored on First-In-
Last-Out (FILO) basis.
◦ It is a 16-bit register.
◦ An address in the RAM area is assigned to the stack pointer where the first
information is stored as the first stack entry.
INTERNAL ARCHITECTURE OF
8085
Registers Section
Arithmetic and Logic Unit
Timing and Control Section
Interrupt Unit
Serial Input / Output Control
Bus Structure
Arithmetic and Logic Unit
The ALU performs the actual numerical and logical operations.
The ALU performs the following arithmetic and logical operations
◦ Addition, Subtraction
◦ Logical AND, Logical OR, Logical Ex - OR
◦ Complement (logical NOT)
◦ Increment, Decrement
◦ Left shift, Right shift
◦ Clear, etc.
Arithmetic and Logic Unit
ALU includes
◦ the accumulator
◦ the temporary register
◦ the arithmetic and logic circuits
◦ and flags.