• No results found

Unit 3 Microprocessor Operations

N/A
N/A
Protected

Academic year: 2020

Share "Unit 3 Microprocessor Operations"

Copied!
17
0
0

Loading.... (view fulltext now)

Full text

(1)

Introduction to Microprocessor

(2)

Introduction

Microprocessor

A Microprocessor is a multipurpose, clock driven, register based electronic device that reads binary instructions from a storage device called memory, accepts binary data as input and process data according to those instructions, and provides results as output.

The applications of microprocessor can be classified in 2 categories – 1. Reprogrammable Systems

2. Embedded Systems

1. Reprogrammable Systems

(3)

2. Embedded ystems

The microprocessor is a part of a final product and is not available for reprogramming to the end user. Example – copying machine, microcontrollers etc.

Microprocessor as CPU –

If we see the block diagram of computer then it consists of input, output, memory and CPU. CPU consists of ALU and Control Unit.

- In late 1960s, the CPU was designed with discrete components on various boards with the advent of IC, it become possible to build the CPU on a single chip; this came to be known as a microprocessor.

(4)

Types of Computers

1. Mainframe –

- Largest and most powerful

- Designed to work at very high speed with large data words. - Starts with 64 bits and have massive amount of memory.

2. Minicomputer –

- Slow and small in comparison to mainframe

- Used for business data processing, industrial control etc.

3. Microcomputer –

1. Small computers

(5)

Structure of Microprocessor

I/O

Memory

ROM RAM ALU Register

Array

Control Unit

Data Bus

(6)

Memory –

- Consists of RAM and ROM

- Main purpose to store the binary codes for the instructions for execution.

Register Array

-This area of microprocessor consists of various registers identified by letters such as B, C, D, E, H and L. These registers are primarily used to store data temporarily during the execution of a program and are accessible to the user through instructions.

CPU –

- Also called as microprocessor

- Fetches binary coded instructions from memory, decodes the instructions into a series of simple actions and carries out these actions into sequence of steps.

Address Bus –

(7)

- These lines carry address of memory locations. - The no of memory locations= 2 no of address lines. e.g. no of address lines=16

Memory locations = 216 =65,536 locations.

Data Bus –

- Consists of 8,16, or 32 parallel signal lines. - These are bidirectional lines.

Control Bus –

- Consists of 4 to 10 parallel signal lines. - Typical signals are

- memory read - memory write

(8)

Assembly Language –

- Instructions can be written in hexadecimal code. Therefore manufacturer of Microprocessor has devised a symbolic code for each instructions

called Mnemonics.

Mnemonic – consists of letters which suggest the operation to be performed by that instruction.

e.g 0011 1100 is 3C in hexadecimal Can be represented in 8085 as INR A

Where INR – increment A – Accumulator

Advantages of Assembly Language –

- Writing a program in assembly language is more convenient than in Machine language.

(9)

Disadvantages –

- Assemble language is specific to a particular machine architecture. - Designed for specific make and model of a microprocessor.

- It is not portable

(10)

Microprocessor Architecture

Microprocessor is a programmable logic device, designed with registers, flip flops and timing elements. The MP has a set of

instructions designed internally, to manipulate data and communicate with the peripherals. The process of data manipulation and

communication is determined by logic design of MP, called the ARCHITECTURE.

All the various functions performed by the MP can be classified in 3 general categories –

1. Microprocessor initiated operations 2. Internal Data operations

(11)

Microprocessor Initiated Operations

Microprocessor performs basically 4 operations –

1. Memory Read : Reads data from memory 2. Memory Write : Write data into memory 3. I/O Read : Accepts data from input devices 4. I/O Write : Sends data to output devices

Microprocessor perform these functions using 3 set of

A15 A0

Micro-Processor

D7 D0

Memory I/P O/P Address Bus

Data Bus

(12)

Address Bus –

- Consists of 16,20,24 or 32 Unidirectional parallel lines. - These lines carry address of memory locations.

- The no of memory locations= 2 no of address lines. e.g. no of address lines=16

Memory locations = 216 =65,536 locations.

Data Bus –

- Consists of 8,16, or 32 parallel signal lines. - These are bidirectional lines.

- It determines the word length and the register size of a Microprocessor.

Control Bus –

- Consists of 4 to 10 parallel signal lines, Used to provide timing signals. - Typical signals are

- memory read - memory write

(13)

Internal Data Operations

Internal architecture of 8-bit MP determines how and what operations can be performed with the

data-1. Stores 8-bit data

2. Perform arithmetic and logical operations 3. Test for conditions

4. Sequence the execution of instructions

5. Store data temporarily during execution in the defined read/ write memory locations called the stack.

For all above operations, MP requires registers, an ALU, Buses.

Accumulator (8) Flag Registers

B (8) C (8)

D (8) E (8)

H (8) L (8)

Stack Pointer (SP) (16)

Program Counter (PC) (16)

Address Lines 16

(14)

Registers

- 8085 has 6- general purpose registers to store 8-bit data during program execution.

- Registers are B,C,D,E,H,L

- These registers can be combines as pair BC, DE, HL to perform 16-bit operations.

- Registers are programmable i.e. it can used to load or transfer data from registers by using instructions.

Accumulator

- 8-bit register main part of ALU. - Identified by A

Flags

- used for the testing for data conditions.

(15)

1. Sign Flag (S)– after execution of an arithmetic or logical operation, if bit D7 of the result is 1, the sign flag will be set (-ive result) else reset (+ive result).

2. Zero Flag (Z) – this flag is et if ALU operations result is 0, else reset.

3. Auxiliary Carry Flag (AC) – if the carry is generated in BCD binary operation from D3 bit to D4 bit then flag will be set.

4. Parity Flag (P) – if the result has an even no. of 1s in the result the it is called as even parity and parity flag will be set, else reset.

(16)

Program Counter (PC)

- 16- bit register used for sequencing execution of instructions. - This register is a memory pointer.

- Used to point to the memory address from which the next byte is to be fetched.

- When byte is being fetched the PC incremented by 1 to point next location.

Stack Pointer (SP)

- 16- bit register used as a memory pointer.

(17)

Peripheral or Externally Initiated Operations

External devices (or signals) can initiate the following operations, for

which individual pins on the MP chip are assigned. Reset, Interrupt, Ready, Hold.

1. Reset – when it is activated , all internal operations are suspended and program counter is cleared.

2. Interrupt – The MP can be interrupted from the normal execution of instructions and asked to execute other instructions called – service routine.

3. Ready – if the signal at this state is Low, the MP enters into a wait state. This signal is used to synchronize the speed of MP with low speed external devices.

References

Related documents

INFORMATION GOVERNANCE DEFINITION Information Governance is the multi-disciplinary enterprise accountability framework that ensures the appropriate behavior in the valuation

In the case of the value field, a write operation arises when the instruction associated to the entry completes its execution: in this stage, the produced

De enorme prikkel die door het RGO-advies en het inzet- ten van stimuleringsgelden is uitgegaan naar het wetenschappelijk onderzoek in de revalidatie moet naar mijn mening echter

around the sky for the sheer joy of cruising around the sky. Try doing touch and go’s by moonlight for a few battery packs. See just how slow that “Slow Stick” will go. Low, slow

[r]

Firms or inventors in environment technology domains like environment management, material/plastic/packaging and energy related climate change mitigation technology have

In contrast, the highest order explicit information processing system showed intensity dependent impairment (no bottom-up RAS rescue) in its response inhibition function because

The Camera starts integration of incoming light from the first external trigger input falling edge and exposes incoming light at shutter time.. It repeats this sequence the