B.Sc. II Electronics - Willingdon...

14
Module 1 B.Sc. II Electronics Developed by: Mrs. Neha S. Joshi Asst. Professor Department of Electronics Willingdon College, Sangli

Transcript of B.Sc. II Electronics - Willingdon...

Page 1: B.Sc. II Electronics - Willingdon Collegewillingdoncollege.in/pdf/StudyMaterial/B.Sc/B.Sc.III/Architecture of 8085.pdf · ii) Microprocessor 8085 architecture 3 Block diagram- internal

Module 1

B.Sc. II

Electronics

Developed by:

Mrs. Neha S. Joshi

Asst. Professor

Department of Electronics

Willingdon College, Sangli

Page 2: B.Sc. II Electronics - Willingdon Collegewillingdoncollege.in/pdf/StudyMaterial/B.Sc/B.Sc.III/Architecture of 8085.pdf · ii) Microprocessor 8085 architecture 3 Block diagram- internal

Module 1: Architecture of 8085

Table of Contents

Learning Objectives:

After learning this module we will be introduced with the basic model of the microprocessor. As

the microprocessor 8085 has been introduced in 1976 and now a day it is outdated but still it

gives the basic architecture of the upgraded versions which are available in the market. After

understanding the architecture of 8085 we can easily switch to latest versions of processors.

Keywords: Microprocessor, combinational electronic device, Arithmetic and logic unit (ALU),

architecture, bus organization, Pin configuration.

Sr. No. Contents

1 Introduction

2 What is architecture?

i) Types of architectures

ii) Microprocessor 8085 architecture

3 Block diagram- internal architecture and description

i) Bus organization

ii) The Arithmetic and Logic Unit and Accumulator(A)

iii) Timing and control unit

iv) Externally Initiated Signals

v) Instruction Register and Decoder

vi) General Purpose Registers

vii) Program Counter and Stack Pointer

viii)Interrupt Control

ix) Serial I/O Control

4 Pin configuration of 8085

Page 3: B.Sc. II Electronics - Willingdon Collegewillingdoncollege.in/pdf/StudyMaterial/B.Sc/B.Sc.III/Architecture of 8085.pdf · ii) Microprocessor 8085 architecture 3 Block diagram- internal

Introduction:

A microprocesssor is a multi-purpose, programmable, combinational electronics device that

performs different operations depending upon the instructions given by the user. It uses

memory devices to store the data information, input devices to read the data information

from the real world and output devices to provide results to the real world. A simple

microprocessor based system constists of a microprocessor, memory, input device and output

device as shown as in the figure below.

In this module we are going to discuss about the architecture of microprocessor 8085 which is

developed by Intel Company in 1976.

What is architecture?

The microprocessor architecture is nothing but the actual physical layout of the different blocks

designed to perform the given tasks on a single chip.

Types of architectures:

There are two types of computer architectures exist for designing microprocessors and

microcontrollers namely Harvard and Von Neumann architectures. The basic difference between

the Harvard and Von Neumann architectures is that in case of Harvard architecture the program

memory and data memory are separated from each other. There are separate data and address bus

connections for program and data memory. Where as in case of Von Neumann architecture the

same memory is used to store data information as well as instructions. The communication

Page 4: B.Sc. II Electronics - Willingdon Collegewillingdoncollege.in/pdf/StudyMaterial/B.Sc/B.Sc.III/Architecture of 8085.pdf · ii) Microprocessor 8085 architecture 3 Block diagram- internal

between memory and processor takes place through the same address and data lines. The idea

can be more cleared from the following diagrams.

Architecture of Microprocessor 8085:

The architecture design of microprocessor 8085 is based on Von Neumann type, in which it uses

the same memory space to store data information as well as instructions. It consists of 8-bit data

bus for data transfer and 16-bit address bus to transfer address information. The microprocessor

8085 uses multiplexed address and data bus to reduce hardware complexity. Later we will focus

on this point in detail.

Block diagram- Internal architecture and Description:

The following figure shows the internal block diagram of 8085 microprocessor which can be

divided into different parts. The functions of these parts are discussed step by step in the

following sections.

Page 5: B.Sc. II Electronics - Willingdon Collegewillingdoncollege.in/pdf/StudyMaterial/B.Sc/B.Sc.III/Architecture of 8085.pdf · ii) Microprocessor 8085 architecture 3 Block diagram- internal

The architecture of microprocessor can be discussed along with the operations performed by the

microprocessor which are divided mainly into three groups which are as follows

1. Microprocessor initiated operations

2. Internal data operations

3. Externally initiated / peripheral related operations.

Bus Organization:

Microprocessor initiated operations – In this group, microprocessor performs four types of

operations with the help of internal system bus which are as follows

• Memory read – In this Microprocessor reads data or instructions from memory.

• Memory write – In this Microprocessor writes data information in to memory.

• I/O read – In this microprocessor accept data from input devices

• I/O write - In this Microprocessor sends data to output devices.

Page 6: B.Sc. II Electronics - Willingdon Collegewillingdoncollege.in/pdf/StudyMaterial/B.Sc/B.Sc.III/Architecture of 8085.pdf · ii) Microprocessor 8085 architecture 3 Block diagram- internal

To perform these operations initially Microprocessor selects the respective device with the help

of address information which is transmitted towards the device through address bus. Once the

device is located the data is written or read by the microprocessor. All this process is carried out

with respect to timing and synchronization signals. These operations are performed by

Microprocessor with the help of its bus organization which is shown in the figure below.

Address Bus:

The 8085 has 16-bit address bus which is grouped as 8-bits of lower address (A7-A0) generated

on AD7-AD0 lines and upper 8-bits of higher address appearing on A15-A8 lines. In this case

during initial phase of execution cycle, the multiplexed AD7-AD0 bus carries lower byte of

address information. After words it carries data information. i.e. in 8085 the same bus is used to

carry address as well as data information. This reduces the hardware and complexity of 8085. As

address bus is of 16 bits the 8085 can access 64KB (65,536) memory locations.

Data Bus:

As discussed before; it is clear that, during later part of execution cycle the multiplexed

address/data bus carries data information. Hence data bus of 8085 is of 8-bits, which carries data

information.

Page 7: B.Sc. II Electronics - Willingdon Collegewillingdoncollege.in/pdf/StudyMaterial/B.Sc/B.Sc.III/Architecture of 8085.pdf · ii) Microprocessor 8085 architecture 3 Block diagram- internal

Control and Status Signals:

The microprocessor generates necessary control signals during any operation on specific pin as

discussed below.

• RD (Read) signal- This signal is used to initiate read operation. It is a active low signal, i.e.

the reading operation is activated only when this signal goes low.

• WR (Write) signal- This signal is used to initiate writing operation. It is also a active low

signal, i.e. writing operations activated only when this signal goes low.

• IO/ M signal- This signal is used to differentiate between memory related operation and I/O

related operation. When this signal becomes high, the 8085 is busy with I/O related

operations. And if this becomes low then it indicates that the microprocessor is performing

memory related operation.

The IO/ M, RD and WR are combined to generate separate read and write signals for memory

and I/O devices as shown in table below.

• S1 and S0 status signals- These signals are used to indicate the status of microprocessor

i.e .current execution phase or machine cycle undergoing. The following table indicates

IO/ M

RD

WR

ACTIVE

SIGNAL

OPERATION

0

0

1

MEMR

Memory read

0

1

0

MEMW

Memory write

1

0

1

IOR

I/O read

1

1

0

IOW

I/O write

Page 8: B.Sc. II Electronics - Willingdon Collegewillingdoncollege.in/pdf/StudyMaterial/B.Sc/B.Sc.III/Architecture of 8085.pdf · ii) Microprocessor 8085 architecture 3 Block diagram- internal

different machine cycles as per the status of S1 and S0 and IO/ M lines.

IO/ M S1 S0 Machine cycle

0 0 1 Memory write

0 1 0 Memory read

0 1 1 Opcode fetch

1 0 1 I/O write

1 1 0 I/O read

1 1 1 Interrupt acknowledge

Z 0 0 Halt

Z X X Hold

Z X X Reset

Where Z= high impedance state and X= unspecified.

• Address latch enable (ALE)- This is a active high signal generated every time by

microprocessor when it begins execution of instruction. It indicates that the information

present on multiplexed address/data bus is the address information. It is also used to store the

lower byte of address information from multiplexed bus and generate the separate set of A7-

A0 lines.

Internal data operations – The internal architecture of Microprocessor determines the internal

data operations which are as follows.

• To store 8-bit data information using address and data buses.

• To perform arithmetic and logical operations with the help of ALU section.

• Test for conditions using flag register.

• Sequence the execution of instructions with help of Program Counter register

• To store data temporarily during execution in the defined R/W memory locations called

the STACK memory.

To perform these operations Microprocessor uses the following blocks.

The Arithmetic and Logic Unit (ALU) and Accumulator (A):

This unit performs all the arithmetic and logical operations with the help of its logic circuits

along with accumulator, temporary registers and five flags. The temporary register is use to hold

data during arithmetic and logical operations. This temporary registers are not accessible by the

Page 9: B.Sc. II Electronics - Willingdon Collegewillingdoncollege.in/pdf/StudyMaterial/B.Sc/B.Sc.III/Architecture of 8085.pdf · ii) Microprocessor 8085 architecture 3 Block diagram- internal

user as these are only used internally by the processor. The microprocessor consists such three

temporary registers as shown in the architecture which are namely W register, Z register and

temporary register which is present in ALU section near accumulator.

The accumulator register is the part of ALU itself and plays very important role during any

operation, as it stores one of the operand unit and after the operation by default compulsory the

result is stored in accumulator.

The flag register is affected by the arithmetic and logical operations in ALU. As we know that

the result is stored in accumulator, generally the flags are affected by the data conditions of

accumulator with some exceptions. The bit positions results for five flags in a flag register are as

follows.

D7 D6 D5 D4 D3 D2 D1 D0

S Z AC P CY

• Sign flag (S) – It is the D7 position of flag register and it set to 1 if bit D7 of the result is 1.

This flag is used with the operations of signed numbers. As we know that if in a given byte D7

is 1 then the number is negative number and if it is 0 then the number is positive. Therefore

during signed number operations if the result is negative then sign flag is set to 1 otherwise it is

0.

• Zero flag (Z) – This flag is set to 1 if the result of any operation is 0 i.e. it is set to 0 for the

result which is non zero number. This flag is modified by the results in the accumulator as

well as in the other register.

• Auxiliary carry flag (AC) – This flag is internally used by the microprocessor during BCD

(Binary coded decimal) number operations. It is set to one when a carry is generated by digit

D3 and passed on to digit D4. There is no any instructions related with this flag hence it is not

accessible by the programmer.

• Parity flag (P) – If the result has an even number of 1s then it is having even parity and parity

Flag is set to 1. i.e. if the result is having odd parity, the parity flag is set to 0.

• Carry flag (CY) – If in arithmetic operation the carry is generated at D7 (MSB) position then

carry flag is set to 1. It also serves as a barrow flag for subtraction.

Page 10: B.Sc. II Electronics - Willingdon Collegewillingdoncollege.in/pdf/StudyMaterial/B.Sc/B.Sc.III/Architecture of 8085.pdf · ii) Microprocessor 8085 architecture 3 Block diagram- internal

Timing and Control Unit:

This unit generates all the necessary timing and control signals which are used for

synchronization of the operations of all the blocks with the clock signals. The control signals

related with this block are discussed in previous section.

Power Supply and Clock Signals:

The microprocessor uses single power supply of +5V which can be connected in between pin

number 20 and 40 which ground and +Vcc respectively. Pin numbers 1 and 2 are used to connect

a crystal oscillator, the frequency of which is internally divided by 2 at timing and control unit.

This signal is available as CLK OUT on pin no. 37 which is used as the system clock signal for

other devices for synchronization purpose.

Externally Initiated Signals:

Following are the signals which are generated by the external peripheral devices.

• HOLD and HLDA- these signals are available on pin nos.39 and 38 respectively. HOLD

signal indicates that the external device DMA controller(direct memory access) is requesting

to the processor for getting hold of address and data buses in response to HOLD signal

processor will generate HLDA(hold acknowledgement) signal.

• READY- This signal is present on pin no.35 which is used to delay the microprocessor read

or write operations until a slow peripheral device becomes ready to accept or sent the data.

When this signal becomes low processor enters in to wait state.

• RESETIN – this signal is present on pin no.36. When it goes low the program counter set to

0, the buses enter in tri-state and the microprocessor is reseted.

• RESETOUT- this signal is present on pin no. 3 which indicates that microprocessor is being

reset.

Instruction Register and Decoder:

These registers are the part of ALU. When an instruction is fetched from external memory then it

is stored in instruction register. Then it is transferred towards instruction decoder block where it

is decoded. At this block only the sequence of events to execute the instructions are decided.

Page 11: B.Sc. II Electronics - Willingdon Collegewillingdoncollege.in/pdf/StudyMaterial/B.Sc/B.Sc.III/Architecture of 8085.pdf · ii) Microprocessor 8085 architecture 3 Block diagram- internal

This instruction register is not accessed through any instruction as it is internally used by

microprocessor.

General Purpose Registers:

Microprocessor has six general purpose registers which are used to store data during any

operation. These are B, C, D, E, H and L. These are 8 bit registers. If the 16 bit data is to be

stored then the pairs of these registers are available which are BC, DE and HL. Usually the HL

pair is used as memory pointer.

Program Counter and Stack Pointer:

The program counter is a 16 bit register which is used to sequence the execution of the

instructions. i.e. it will be loaded with the address of memory location where the first instruction

of a program is stored and it is automatically updated as per the sequence of the program.

The stack pointer is also 16 bit register which is used as a memory pointer for the stack memory

which is the part of R/W memory defined and used by the processor to store data temporarily

during the execution.

Interrupt Control:

The microprocessor uses five interrupt signals to interrup the current execution of a program,

which are disscussed as follows.

• TRAP- it is a nonmaskable interrupt. i.e. when TRAP is generated, compulsary the

microprocessor stop its current execution and program counter is loaded with memory address

0024H and its corresponding interrupt service routin is executed.

As on arival of this interrupt, the execution is transferred at 0024H vector location the TRAP is

called as vectored interrupt. Amonge five interrupts TRAP is having highest priority.

• RST7.5,RST 6.5 and RST5.5- these are restart intrrupts. Among these the RST7.5 has first

priority then RST6.5 has second priority and then RST 5.5 has next priority. All these are

maskable interrupts i.e. if the processor is busy with important task then it can avoid these

interupts. These are also vectored interrupt i.e. the program execution is transferred to the

Page 12: B.Sc. II Electronics - Willingdon Collegewillingdoncollege.in/pdf/StudyMaterial/B.Sc/B.Sc.III/Architecture of 8085.pdf · ii) Microprocessor 8085 architecture 3 Block diagram- internal

specific memory locations. For RST 7.5 vectored location is 003CH, for RST 6.5 it is 0034H and

that for RST 5.5 is 002CH.

• INTR – It is a non vectored, maskable general purpose interrupt which is having lowest

priority among all the interrupts. In response to this interrupt the processor will generate interrupt

acknowledgement (INTA).

Serial I/O Control:

The microprocessor uses two pins serial in data(SID) and seraial out data(SOD) to transmit and

receive data serially i.e. processor read or write one bit at a time using single line.

Pin Configuration of 8085: The figure below shows the pin configuration of 8085 which is 40

pin dual in package IC along with grouping of signals.

Summary:

The module gives the detailed discussion on functional block diagram of 8085 microprocessor. It

focuses on the functions of various blocks along with working of various control and status

signals. It also explores the working of various registers which are present in 8085.

Page 13: B.Sc. II Electronics - Willingdon Collegewillingdoncollege.in/pdf/StudyMaterial/B.Sc/B.Sc.III/Architecture of 8085.pdf · ii) Microprocessor 8085 architecture 3 Block diagram- internal

References:

Ramesh S. Goankar, “Microprocessor Architecture, Programming and Applications with 8085”,

5thEdition, Prentice Hall.

Available from:

http://www.google.co.in/search?q=block+diagram+of+8085+microprocessor&tbm=isch&imgil=ctRbcxty

8iDB9M%253A%253ByCFcbcRoIPhx3M%253Bhttp%25253A%25252F%25252F8085microprocessor4u.blo

gspot.com%25252F2012%25252F12%25252Farchitecture-diagram-of-

8085.html&source=iu&pf=m&fir=ctRbcxty8iDB9M%253A%252CyCFcbcRoIPhx3M%252C_&usg=__2iFmu

xNIQhlpY_l9zP77fjm7nzM%3D&biw=1366&bih=641&ved=0CCUQyjc&ei=zA9aVNDfBpONuASruoDwBA

Available from:

http://www.google.co.in/search?q=block+diagram+of+8085+microprocessor&tbm=isch&imgil=ctRbcxty

8iDB9M%253A%253ByCFcbcRoIPhx3M%253Bhttp%25253A%25252F%25252F8085microprocessor4u.blo

gspot.com%25252F2012%25252F12%25252Farchitecture-diagram-of-

8085.html&source=iu&pf=m&fir=ctRbcxty8iDB9M%253A%252CyCFcbcRoIPhx3M%252C_&usg=__2iFmu

xNIQhlpY_l9zP77fjm7nzM%3D&biw=1366&bih=641&ved=0CCUQyjc&ei=zA9aVNDfBpONuASruoDwBA#f

acrc=_&imgdii=_&imgrc=tSgbgveEB6xfgM%253A%3Brefpgtkyp307KM%3Bhttp%253A%252F%252F8085

projects.info%252Fimages%252FBus-Structure-

Pic2.png%3Bhttp%253A%252F%252F8085projects.info%252FArchitechture-of-8085-or-Functional-

Block-diagram-of-8085.html%3B509%3B219

Page 14: B.Sc. II Electronics - Willingdon Collegewillingdoncollege.in/pdf/StudyMaterial/B.Sc/B.Sc.III/Architecture of 8085.pdf · ii) Microprocessor 8085 architecture 3 Block diagram- internal

Questions:

i) Explain in detail the bus organization of 8085 microprocessor with neat diagram.

Also explain the importance of signal ALE.

ii) Draw the pin configuration of 8085 microprocessor and explain functions of each

group of pins in detail.

iii) Draw the internal block diagram of 8085 microprocessor and explain each block

in detail.

iv) Explain in detail the various interrupt signals of 8085.

v) Explain the control and status signals of microprocessor 8085.

Multiple choice questions:

1. In 8085 _______________interrupt has the highest priority.

a) TRAP b) INTR c) RST 7.5 d) RST 5.5

2. The width of Data bus of 8085 microprocessor is __________________

a) 16 b) 14 c) 8 d) 20

3. In 8085 microprocessor ___________ flag bit is internally used for BCD Addition.

a) Z b) P c) AC d) C

4. The Microprocessor 8085 is a ______________ pin IC.

a) 80 b) 20 c) 120 d) 40

5. __________ signal is used to store lower 8- bits of address information in external latch.

a) ALE b) Ready c) HOLD d) RESETOUT