20
Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

Embed Size (px)

Citation preview

Page 1: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

Lecture 8

Presented ByDr. Shazzad Hosain

Asst. Prof. EECS, NSU

Page 2: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

What is Microcomputer?

Page 3: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

Typical Microcomputer Architecture

Page 4: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

The Microcomputer Bus

• Address Bus– Information transfer one direction,

microprocessor to memory or I/O elements, so unidirectional bus

– Typically 20 to 32 bit long– Determines addressable memory, 1 MB to 4 GB

Page 5: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

The Microcomputer Bus

• Data Bus– Bidirectional i.e. to or from microprocessor– Multiplexed / time shared data bus e.g. in 8086 20 bit

address is send through 16-bit data bus and 4 status lines

– Determines the word size of the microcomputer• Control Bus– Used to send control signals to synchronize the

operation of individual microcomputer elements– Each microcomputer has a unique set of control signals.

Page 6: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

Clock Signals

• Clock generator generates clock signals• Most MPs have external clock generator circuit• Each instruction requires a number of clock signals• Clock signals determines the speed of MPs• The short period cycle means clock speed is large, means high speed of

computer

Page 7: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

The single chip microprocessor

• Microprocessor is the CPU of the microcomputer• The main areas of microprocessor– Register section– The control unit– The arithmetic and logic unit (ALU)

Page 8: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

Basic Microprocessor Registers

• Instruction Register (IR): stores instructions• Program Counter (PC): contains the address of

the next instruction to be executed• Memory Address Register (MAR): contains

address of data• Accumulator (A): typically a 8 bit register, used

to store result after most ALU operations

Page 9: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

Accumulator based vs. general purpose based microprocessor

• Accumulator based– Intel 8085 and Motorola 6809 are accumulator based. – Accumulator is used as one of the data source– Result goes to accumulator– Example: ADD R1

• General purpose based– Intel 8066/../Pentium are of this kind. – The registers contain hold data, memory address,

results of ALU so on. – Example: ADD AX, BX, ADD [AX], BX

Page 10: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

Use of the Basic Microprocessor Registers

• Let us add contents of two memory locations• For example, add [2010] = 0002 and [2012] = 005• In general [NNNN] represents the content of the

memory location NNNN.

Page 11: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

Steps of Addition of [2010]+[2012]• Load MAR with 2010• Move contents of 2010 into data register, D0, which may be

AX/BX etc.• Increment MAR by 2 to hold 2012• Add D0 with [2012] and store the result into D0

Instruction set form Motorola 68000

Page 12: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

PC

L

E

L

E

LE

L

E

Page 13: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

Microprogramming the Control Unit

• Each instruction is executed by a set of microinstructions

• The microinstructions has their own codes• The codes are stored into internal memory,

called the control memory (ROM)• Let us increment a register by 1

Page 14: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU
Page 15: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU
Page 16: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU
Page 17: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU
Page 18: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU
Page 19: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

Assembly Language Instruction Format

• Three address

• Two address

• One address

• Zero address CLD ; clear directionNOP ; No operation

For all microprocessors

Page 20: Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

References

• Chapter 6, Fundamental of Digital Logic and Microcomputer Design – by M. Rafiquzzaman– 6.1, 6.2, 6.3, 6.6.3