1 cse 341 - microprocessors md. omar faruqe ub 1228

50
1 CSE 341 - Microprocessors Md. Omar Faruqe [email protected] http://faculty.bracu.ac .bd/~faruqe

Upload: daniella-hart

Post on 18-Jan-2018

221 views

Category:

Documents


0 download

DESCRIPTION

Lecture - 53 Notice Remember so far (including today’s lecture) we are keeping concepts general. Your mid-terms and the next Quiz that I take will be heavily based on these concepts. You will be expected to understand and describe the things we have done so far in details. I am trying very hard to keep this course as simple as possible and get you good grades. Please DO take advantage of this !

TRANSCRIPT

Page 1: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

1

CSE 341 - Microprocessors

Md. Omar [email protected]

http://faculty.bracu.ac.bd/~faruqeUB 1228

Page 2: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 2

Notice

• From next lecture we will go into the architecture and the minute details of 8086.

• Once we complete 8086 we will move on to other Intel Processors• 80386, RISC and newer Architectures.• It is vital that you understand clearly the concepts presented to you in

the last few lectures.• Today will be a more specific introduction to microprocessors with

details.• Please ask if you would like me to discuss / repeat any part done so

far.• The Syllabus for Microprocessor is NOT very big. We will thus be going into minute details of the processors we study.

• Is there anything you would like me to repeat?

Page 3: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 3

Notice• Remember so far (including today’s lecture) we are keeping concepts

general.

• Your mid-terms and the next Quiz that I take will be heavily based on these concepts.

• You will be expected to understand and describe the things we have done so far in details.

• I am trying very hard to keep this course as simple as possible and get you good grades. Please DO take advantage of this !

Page 4: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 4

Terms & Review

• Basic Blocks of a computer:– Central Processing Unit (CPU)– The I/O– The Memory

• First Microprocessors were built onto one chip using MOS (Metal-Oxide Semiconductor)

• The pins of the microprocessors are then connected to communication lines. System Buses – Address, data and control.

• The bit size of a microprocessor refers to the bits can be processed simultaneously by the basic arithmetic circuits of the processor.

• A number of bits taken together will often be referred to as a word.• Thus a 4 bit processor may be referred to as 4 bit word-length CPU.

Page 5: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 5

Terms & Review• In Computing terms what is 8 bits together referred to

as ?byte

• In Computing terms what is 4 bits together referred to as ?

nibble• It should also be NOTED that processors are able to perform operation

on bit sizes larger then its ALU supports. But, these operations would have to be performed sequentially and must be handled by the programmer. They thus take more instruction and time.

• ALU (Arithmetic Logic Unit) is a digital circuit that performs arithmetic and logical operations on two n-bit words.

• Typical values of n are 4, 8, 16, 32 and 64.• The size of the ALU defines the size of the microprocessor.• It is a common misconception that the number of data lines dictate the

size of the processor !• Motorola 68008 is a 16 bit processor although its data buses are 32 bits

wide.

Page 6: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 6

Terms & Review

• Address is a patter of 0’s and 1’s that represent a specific location in memory.

• If a processor has 16 lines it can produce 216 unique combinations.

• So how many memory locations can be directly referred to using 16 lines ?

• Read Only Memory (ROM) is a storage medium for groups of bits called words and its contents are normally not altered once set.

• If a ROM is made of 8 bit addresses and contains 2048 such addresses it is referred to as 2K-word by 8 bit ROM.

• ROMs are non-volatile , i.e. they do not loose contents when they loose power.

• They are primarily used to store programs, instructions or data tables that must always be available to microprocessors.

Page 7: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 7

Terms & Review• Random Access Memory (RAM) – volatile storage used for frequent

read and write operations.• Their size and arrangement of bits varies from 1bit words to bit

words.• A register can be regarded as a storage for a number of bits.• The term bus refers to the number of conductors available for

communication between different components.• There are three types of buses:

– Address bus – carries addressing information– Data bus – carries data between devices.– Control bus – carries control information and signals.

• The instruction set of a microprocessor is the list of commands that a microprocessor is designed to understand and execute.

Page 8: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 8

Terms & Review

• Assembly and High-levels language programs are called source code, whereas machine language programs are called object code.

• Machine language instructions for a microprocessor are defined by its manufacturer and generally no two microprocessor will have the same instruction set.

• Which instruction do you think would cause the biggest problem if you were writing a program in machine language ?

• An Assembler solves this problem by allowing you to replace addresses with names.

Page 9: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 9

Terms & Review• The instruction set of a microprocessor is the list of commands that a

microprocessor is designed to understand and execute.• Microprocessors can be programmed using both High-Level and Low-

Level Languages.• Although High-Level Languages are more convenient for

programmers, Low-Level Language programming is more efficient.• However, programs written in Low-Level language for one

microprocessor will generally not work on others.• This is because Low-Level programming deals with the specifics of

the microprocessors internal structure and also due to the difference in instruction set.

Page 10: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 10

Terms & Review• The CPU of a computers is also called the microprocessor.

MicroprocessorROM RAM Input Output

Bus System

Page 11: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 11

Bus connections

MicroprocessorRAM ROM I/O

Address Bus

Data Bus

Control Bus

Page 12: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 12

Terms & Review• The address bus is used by the microprocessor to send the location of

memory addresses that its either interested in reading or writing.

• The address bus is unidirectional as there is only transfer of address information from the microprocessor to devices.

• There are specific pins on a microprocessor through which it will send out address information. These are known as address pins / address lines.

• These addressing pins are connected directly to the lines of the address bus.

• Additional Hardware is sometimes used to interface memories larger than the addressing capabilities of the microprocessor.

• A microprocessor with 16 data lines is therefore able to directly address 64K memory locations.

Page 13: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 13

Terms & Review• The data bus is used by the microprocessor to transfer data.

• Data bus have to be bi-directional as data needs to travel both ways, to and from microprocessors.

• Some microprocessors use the same pins for both data and address transfer.

• In such cases the pins of the microprocessor can be used for any one purpose at a given time.

• This means that the pins are time shared or multiplexed.• A Latch is generally used to differentiate between instances when the

shared pins are used for data / address transfer.

Page 14: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 14

Terms & Review• The control bus is used by the microprocessor to transfer control

signals.

• This is used to synchronize the operations that take place between the various components of the system.

• Each microcomputer uses different and unique control signals.

• There are however some control signals that are common to microprocessor which will be discussed briefly.

Page 15: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 15

Terms & Review• The major components of the microprocessor as discussed are :

– Registers– ALU– Control Unit

Registers

ALU

Control Unit

• Depending on registers microprocessors can be:– Accumulator-based

• All arithmetic and logic operations are done using the special register Accumulator which must hold the data during operations.

– General Purpose register based.• Are usually 16 bit or 32 bit microprocessor. Here the

registers can hold data, address or results of arithmetic and logical operations. The number type and size of registers vary from one processor to another.

Page 16: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 16

Terms & Review• Registers vary from one microprocessor to another.

• The structure of the registers determine the:– Architecture of the processors– Ease with which the processor can be programmed.

• There are four basic types of Registers that are generally available:– Instruction Registers (IR)– Program Counters (PC)– Memory Address Registers (MAR) or Data Counter (DC)– Accumulator (A)

Page 17: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 17

Terms & Review

• The Instruction Register (IR) stores an instruction.

• The microprocessor fetches and instruction from program memory.

• The instruction is in machine code which the microprocessor understands.

• It then stores this instruction in the IR.• The instruction in the IR is then decoded internally by the

microprocessor to perform the operation specified by the instruction in the IR.

Page 18: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 18

Terms & Review• The Program Counter (PC) holds the address or points to the location

of the next instruction that is to be executed.

• PC is also sometimes regarded as IP (Instruction Pointer) but, as IP is also used to point to Interrupt Priority register we will use PC in our discussion to keep the distinction.

• When the microprocessor is RESET the address of the first instruction to be executed is loaded into the program counter.

• In order to get an instruction the microprocessor usually puts the address held in the PC on the address bus to fetch the instruction.

• The program counter will automatically increment each clock pulse and will move sequentially unless there is a jump statement or an interrupt.

• The size of the program counter is determined by the size of the address bus.

Page 19: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 19

Terms & Review• The Memory Address Register (MAR) holds the address or points to

the location of the data in memory.

• The value in this register are sent down address lines to directly point to memory location and either write to the specified location or read from it.

• The Accumulator (A) is an arithmetic register that can be used for arithmetic operations.

• It is used to store results after most ALU Operations. Instructions such as:

– Shift– Rotate

• Some microprocessors may contain more then 1 Accumulator.

Page 20: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 20

Terms & Review• The General Purpose Registers are used to hold data temporarily and

for carrying out data transfers between various registers.

• The use of these registers speed up the execution of a program since the processor doesn’t have to read data from memory.

• General Purpose registers can use indirect addressing / implied addressing.

• 16 bit and 32 bit microprocessors are usually general-purpose based.

• In these kind of processors the general purpose registers may be used as an accumulator.

Page 21: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 21

Terms & Review

• An Index Register is used as a counter, in address modification for an instruction or for a general storage function.

• This is the same concept as the indexing of an array or a table.

• This type of usage leads to indexed addressing.

• It is only supported by certain microprocessors.• The effective address is determined by adding portion of the

instruction to the contents of the index register.

• In many cases the general purpose registers can be used as index registers.

Page 22: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 22

Terms & Review

• Barrel Shifter – Typical 32 bit microprocessors such as 80386 include a special type of shifter. They perform very fast shift operations.They are able to shift numbers from 0 to 64 positions in one clock period.

• Status Register – Also called program status word (PSW) or code register. The status register contains individual bits with each bit having special significance. These bits are known as flags. The status of a microprocessor is indicated by these flags.Each bit is set or reset by the microprocessors internal logic to indicate the status after arithmetic and logic operations.

Page 23: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 23

Terms & Review• Some common status flags:

– Carry Flag – Shows whether the results of an arithmetic operation is larger than the microprocessor word size. Auxiliary Carry Flag is used during 4 bit BCD operations.

– Zero Flag – Shows whether the result of an operation is 0 or not.– Parity Flag – Is used to show the parity check bit for the results of an

operation. Even or odd parity is dependent on the microprocessor internal structure and is NOT selectable.

– Sign Flag – Also sometimes referred to as the negative flag, is used to indicate whether the results of the last operation was negative or not. If the MSB of the last operation is 1 then its negative and the flag is set.

– Overflow Flag – When the result of an operation is incorrect due to the fact that it can not be stored in the register bits available.

Page 24: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 24

Terms & Review• Stack is a LIFO (Last in first out) data structure which are very

popular with microprocessors.

• Such structures can be either :– Hardware Based – Implemented using some fixed high speed registers.

Extremely fast response time but, limited by the size of the registers.– Software Based – Implemented using software in the RAM.

Slower response times but, not limited.

• There are two operations that can be performed on a stack:– Push – populates the stack / puts new data into stack– Pop – Retrieves the last value that was pushed into the stack.

• Some microprocessors access stack from the top and some from the bottom.

Page 25: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 25

Terms & Review• Stack Pointer – Points to the location of the element which is either at

the top or bottom of the stack depending on the implementation.

• Top Access – Pointer decremented in value on every PUSH & incremented on every POP operation.

• Bottom Access – Pointer incremented in value on every PUSH & decremented on every POP operation.

Page 26: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 26

Control Unit• Control Unit – The purpose of the control unit is to read and decode

instructions from the program memory.

– Interpreting Phase:• The control check the program counter for the location of the next instruction.• It read the instruction from the specified location• It then decodes the instruction and recognizes the instruction type• Gets the necessary operands and routes them to the appropriate functional unit• Necessary signals are sent to the execution unit to perform desired operations• The results are then routed back the specified locations.

– Sequencing Phase:• The control unit determines the location of the next instruction that needs to be

dealt with and loads it into the program counter.

Page 27: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 27

Control Unit

• Control Unit Design techniques – – Hardwired Control: Connecting components such as gates and flip flops– Microprogramming: Control ROM holding data tables used for

instruction decoding.– Nanoprogramming: Two levels of ROM. One holds addresses of other

table, saves memory by eliminating repeatation.

Page 28: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 28

Control Signals

• Control Signal – Used by control unit to send control information to other devices. It also listens for control signal and takes appropriate actions.

• Each manufacturer / microprocessor uses different control signals which have a wide range of variety. However, some common signals are :– Reset – This pin will reset the microprocessor. Depending on the

processor it may need to be held LOW or HIGH to reset the microprocessor. Generally this will cause the program counter to reinitialize to read the next instruction from memory location 00. There are microprocessors where the first instruction however are read from locations FFFF. The stack pointer is also generally re-initialized during a reset.

Page 29: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 29

Control Signals

– Read/Write: Microprocessors may use separate pins for Read and Write. There are microprocessors that use the same pin to indicate a Read/ Write. In such cases a HIGH signal indicates a READ and a LOW signal indicates a WRITE.

– Ready: Used to interface with slow devices so that the device may have control over the transfer rate and can get extra time during send and receive.

– Interrupt Request (INT or IRQ): This pin is used by the microprocessor to detect external interrupts.

Page 30: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 30

Arithmetic Logic Unit (ALU)• The ALU performs all the data manipulation, such as arithmetic and

logical operations inside the microprocessor.

• The size of the ALU dictates the size of the microprocessor. A microprocessor with a 16bit ALU is also said to be a 16bit microprocessor.

• Typical operations of an ALU are:– Binary addition and logical operation– Finding 1’s complement of data– Shifting/rotating the contents of the accumulator or some other register

1bit to the left or right through the carry.

• Some microprocessors may have more then one ALU.

Page 31: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 31

Simple Microprocessor Architecture

Status Register

Shifter

Complementer

Arithmetic & Boolean Logic

Buffer Register

Accumulator

Memory Address Register

Program Counter

Instruction Register

Control Unit

Data BusALU

Page 32: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 32

Memory• The main or external memory stores both instructions and data.• Some microprocessors divide the memory being addressed into

smaller blocks.• The smaller blocks of memory is called page. This can be blocks of

256 bytes or 64 bytes depending on the processor.• Again suppose you have 16 address lines. How many memory

locations can you directly address ?

65536Memory Locations

0000

FFFF

Page 0Page 1

.

.

.

Page 255Page 254

0000

00FF

FE00

FFFF

Divide into blocks of 256 bytes

Page 33: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 33

Memory• Memory can be categorized into the following:

– Processor Memory– Primary or main memory– Secondary memory.

• Processor Memory – – Set of registers within the microprocessors. – These holds operands and results of computations temporarily. – No Speed Disparity as they are fabricated using microprocessor

technology.– Only a few can be included due to the limitations of size and cost.– Volatile

Page 34: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 34

Memory• Primary/Main Memory –

– Storage area for executing programs.– Can be accessed directly by the microprocessor.– All data must be in primary memory prior to execution– It is generally much larger when compared to the processor memory– It is however slower by a factor of 25 or 30– Volatile

• Secondary Memory – – Backup memory– Non-volatile– Extremely slow compared to the others Causing entire system throughput

to drop to unacceptable levels..– Cheapest available memory

Page 35: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 35

Memory Management Unit (MMU)• Recall we said that the amount of memory that can be directly

addressed depends on the number of address lines.

• Most memory usage that we have would outnumber the direct addressing capabilities of most microprocessors.

• A device called Memory Management Unit (MMU) is used to resolved this issue.

• MMU comes in the form of a chip (hardware) included with most microprocessors.

• MMU is responsible for:– Manage two-way flow of information between the primary and the

secondary media– Transfer blocks of data efficiently.

Page 36: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 36

Cache• Most programs spend most of their execution time in a few main

routines or tight loops.• They have a tendency to use a certain portion of the instructions in

memory.• This causes clustering around a small portion of the main memory.

• Now we know that the main memory is slow. What would happen if we could implement a very fast memory (small in size) to hold only the portions that are use very frequently.

• This would significantly improve the execution time !

• Such memory used are called Cache memory.

• They reside as an bridge between the processor memory and the main memory.

Page 37: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 37

Read• The microprocessor reads the OP code • The microprocessor interprets the OP code as memory READ

operation • When the clock signal goes HIGH, the microprocessor places the

contents of the MAR on the address pins.• At the same time, the microprocessor raises the READ pin signal to

HIGH.• The external logical device gets the address from the address lines.• The external device puts the data from the specified memory location

on the data lines.• The microprocessor reads the data lines and obtains the data it was

after.

Page 38: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 38

Write• The microprocessor reads the OP code • The microprocessor interprets the OP code as memory WRITE

operation • When the clock signal goes HIGH, the microprocessor places the

contents of the MAR on the address pins.• At the same time, the microprocessor raises the WRITE pin signal to

HIGH.• The external logical device gets the address from the address lines.• The microprocessor places the data to be written on the address lines

• The external logical device reads that data from the data lines and writes it to the specified memory location.

Page 39: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 39

Interrupts• Interrupt Types:

– External – Internal

• Interrupt Vector Address• Context Switching• Interrupt Priorities

– Masked/ Muskable Interrupts– Unmasked /non-muskable

Page 40: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 40

DMA (Direct Memory Access)• There are four types of DMA

– Microprocessor-Halt DMA– Block Transfer DMA– Cycle Stealing DMA– Interleaved DMA

Page 41: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 41

DMA• Direct Memory Access

• Used for transfer of data between the RAM and some external peripheral device without the use of the Microprocessor.

• Under normal circumstances you would write a program to perform the input/output using a microprocessor.

• This is known as Programmed I/O since you are programming it.

• For typical microprocessors 1 byte of data transfer between RAM and I/O take 5 – 10 microseconds.

• This is also regarded inadequate for most high-speed applications.

• The use of DMA would typically reduce this time to 1 microsecond per byte as it doesn’t get slowed down by microprocessor interpreting each instruction.

Page 42: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 42

DMA• DMA is extensively used in transferring large blocks of data between

peripheral device and the RAM.

• DMA doesn’t make use of the microprocessor to do the transfer so who is going to do the READ and WRITE operation?

• A DMA Controller chip is may be built into the microprocessor or may be found external.

• We can see that the DMA controller has to perform operations that are very similar to operations performed by a microprocessor.

• They are thus generally designed and built by microprocessor manufacturers.

Page 43: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 43

DMA Controller Jobs• The DMA controller chip is able to put the microprocessor in a HOLD

state by means of a HOLD control signal.In such cases the microprocessor disconnects the address, data and control lines from its bus and allows the DMA controller to access devices using these lines.

• The DMA controller can then take over the bus and performs the data transfer by putting the RAM memory locations on the address bus along with the appropriate control signals for the transfer.

• During the data transfer the DMA controller has complete control over the buses. Upon completion of the Data transfer it removes the HOLD sate and puts the microprocessor back in control.

Page 44: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 44

DMA Controller Chip• The DMA controller Chip usually has at least 3 registers:

• Address Register: Initially holds the base address of the data that is to be transferred. It is incremented each time a byte is read and thus the data is read sequentially.

• Terminal count register: This register holds the size of the data block to be transferred. This decremented each time a byte is read. When this reaches zero the DMA transfer is completed.

• Status Register: Holds the status of the DMA controller. Busy, ready, transfer complete.

Page 45: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 45

Types of DMA Microprocessor-Halt DMA

• Block Transfer DMA• Cycle Stealing DMA

Interleaved DMA

Page 46: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 46

Microprocessor Halt DMABlock Transfer DMA

The microprocessor is put on HALT during the whole transfer operation.

The first method will not return control of the bus to the microprocessor until the complete block of data has been transferred.

During this transfer the microprocessor sits idle and doesn’t do anything because it doesn’t have access to the buses.

This method is suitable where the application involves transfer of large quantity or data rather than processing.

Page 47: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 47

Microprocessor Halt DMA Peripheral device requests the DMA transfer via DMA request line. The DMA controller sends a HOLD signal to the microprocessor.

The microprocessor completes current instruction and sends a HOLD ACK to the DMA controller.

The DMA controller then sends DMA ACK to the requesting device.

The DMA controller then sets the values of the registers and starts the transfer.

Upon completion of the transfer the controller returns the bus control to the microprocessor.

This is done by sending a DMA ACK to the microprocessor which releases the HOLD.

Page 48: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 48

Cycle Stealing DMA This method causes the microprocessor to be temporarily put on

HOLD for one clock cycle at a time.

For that clock cycle the DMA takes over the buses and transfers 1 byte of data.

It then returns the control back to the microprocessor.

The microprocessor is put on hold by stopping its clock rather then using messages.

This technique obviously has a slower data rate and is good for applications that have low amount of data transfer.

Also its needed in applications where the microprocessor cannot be kept inactive for the entire duration of the block transfer.

Page 49: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 49

Interleaved DMA It is the most COMPLEX type of DMA operation.

This technique incurs the least overhead and gives maximum efficiency. (Application Based)

Here the DMA controller takes of the buses when the microprocessor is not using it.

During internal operations, decoding instructions or ALU operations microprocessor doesn’t use the buses.

The DMA controller intelligently uses these times to perform data transfers and is thus called interleaved DMA.

With interleaved data is transferred 1 byte per cycle.

Page 50: 1 CSE 341 - Microprocessors Md. Omar Faruqe  UB 1228

Lecture - 5 50

Questions ?