Вы находитесь на странице: 1из 29

EECE 407 Microprocessor and Interfacing

Level 4/Term II 30 June, 2013 01 December 2013


Course Teacher Shuvro Chowdhury Lecturer Department of Electrical and Electronic Engineering Bangladesh University of Engineering and Technology http://teacher.buet.ac.bd/schowdhury

About the Course


3 credits, 3 hours/week
Scheduled class time Wednesday at 8.00 A.M. 10.50 A.M. Class duration is 3 hours.

EECE 407 Microprocessor and Interfacing

Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

Course Outline
Introduction to microprocessors.
Intel 8086 microprocessor: Architecture, addressing modes, instruction sets, assembly language programming, system design and interrupt. Interfacing: Programmable peripheral interface, programmable timer, serial communication interface, programmable interrupt controller, direct memory access, keyboard and display interface. Introduction to micro-controllers.
EECE 407 Microprocessor and Interfacing Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

Marks Distribution
Category Attendance Class test (best 3 will be counted) Term final exam Total Total marks 4 30 20 3 = 60 Percentage (%) 10 20

210 300

70 100

EECE 407 Microprocessor and Interfacing

Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

Grade Distribution
Marks (%) 80 - 100 75 - 79 70 - 74 65 - 69 60 - 64 55 - 59 50 - 54 45 - 49 40 - 44 < 40
EECE 407 Microprocessor and Interfacing

Grade Point 4.00 3.75 3.50 3.25 3.00 2.75 2.50 2.25 2.00 0.00

Letter Grade A+ A AB+ B BC+ C D F

Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

Reference Books
Text Books: 1. Digital Computer Electronics Albert P. Malvino and Jerald A. Brown (3rd Edition) 2. Assembly Language Programming and Organization of the IBM PC Ytha Yu and Charles Marut 3. Microprocessor and Interfacing Programming and Hardware Douglas V. Hall Reference Books: 1. Microprocessors and Microcomputer-Based System Design Mohammed Rafiquzzaman (2nd edition) 2. The Intel Microprocessors Barry B. Brey (6th Edition) 3. The 8051 Microcontroller and Embedded Systems M. A. Mazidi, J. G. Mazidi, R. D. McKinlay
EECE 407 Microprocessor and Interfacing Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

For Further Contact


Shuvro Chowdhury Lecturer Department of Electrical and Electronic Engineering Bangladesh University of Engineering and Technology Dhaka-1000, Bangladesh.
Room No.: 431 (Fourth Floor), ECE Building West Palashi, Dhaka, Bangladesh. Mobile: +880 1717 225412 E-mail: schowdhury@eee.buet.ac.bd, Schowdhury.eee@gmail.com
EECE 407 Microprocessor and Interfacing Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

Components of a Computer System

Basic Elements of a Computer System


Memory

Arithmetic Logic Unit (ALU)

Input Devices

Control Unit
Central Processing Unit (CPU)

Output Devices

EECE 407 Microprocessor and Interfacing

Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

Three key concepts

Von Neumann Machine

Data and instructions are stored in a single set of readwrite memory


Contents of memory are addressable by memory address, without regard to the type of data contained Execution occurs in a sequential fashion, unless explicitly altered, from one instruction to the other

EECE 407 Microprocessor and Interfacing

Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

10

Computer System Components


Memory Stores instructions and data Input/Output Called peripherals Used to input and output instructions and data Arithmetic and Logic Unit Performs arithmetic operations (addition, subtraction) Performs logical operations (AND, OR, XOR, SHIFT, ROTATE)
EECE 407 Microprocessor and Interfacing Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

11

Computer System Components


Control Unit Coordinates the operation of the computer System Interconnection and Interaction Bus A group of lines used to transfer bits between the microprocessor and other components of the computer system. Bus is used to communicate between parts of the computer. There is only one transmitter at a time and only the addressed device can respond. Types Address Data Control signals
EECE 407 Microprocessor and Interfacing Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

12

Microprocessor
A silicon chip that contains a CPU. In the world of personal computers, the terms microprocessor and CPU are used interchangeably. At the heart of all personal computers and most workstations sits a microprocessor. Microprocessors also control the logic of almost all digital devices, from clock radios to fuelinjection systems for automobiles.

EECE 407 Microprocessor and Interfacing

Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

13

Microprocessor
is a semiconductor device consisting of electronic logic circuits manufactured by using various fabrication schemes capable of performing computing functions capable of transporting data/information is a programmable device the programmer selects instruction from the list and determines the sequence of execution for a given task. can be divided into 3 segments: Arithmetic and Logic Unit Register Unit Control Unit
EECE 407 Microprocessor and Interfacing Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

14

Differentiating Characters of Microprocessors


Instruction set: The set of instructions that the microprocessor can execute.
Bandwidth : The number of bits processed in a single instruction. Clock speed : Given in megahertz (GHz), the clock speed determines how many instructions per second the processor can execute.

EECE 407 Microprocessor and Interfacing

Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

15

Control Unit

CPU Components

Generates control signals which are necessary for execution of an instruction. Connect registers to the bus. Controls the data flow between CPU and peripherals (including memory). Provides status, control & timing signals required for the operation of memory and I/O devices to the system. Acts as a brain of computer system All actions of the control unit are associated with the decoding and executions of instructions (fetch and execute cycles).
EECE 407 Microprocessor and Interfacing Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

16

Registers

CPU Components

Hold data, instructions, or other items


Various sizes Program counter and memory address registers must be of same size/width as address bus Registers which hold data must be of same size/width as memory words

EECE 407 Microprocessor and Interfacing

Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

17

Arithmetic Logic Unit

CPU Components

Executes arithmetic and logical operations.


Accumulator is a register associated with ALU. Source of one of the operands of an arithmetic or logical operation. serves as one input to ALU. Final result of an arithmetic or logical operation is placed in accumulator.

EECE 407 Microprocessor and Interfacing

Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

18

Functions

Arithmetic and Logic Unit

ALU performs the following arithmetic & logical operations: Addition Subtraction Logical AND Logical OR Logical EXCLUSIVE OR Complement(logical NOT) Increment (add 1) Decrement (subtract 1) Left shift, Rotate Left, Rotate right Clear etc.

EECE 407 Microprocessor and Interfacing

Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

19

Simple As Possible Computer Version 1 (SAP - 1 )

Introduction

SAP 1

Designed for the beginners.


Main purpose is to introduce all the crucial ideas behind computer operation avoiding too much details. There are three generations of SAP. SAP-1 is the first stage towards the evolution of modern computers. We shall try to cover SAP-1 and SAP-2 if time permits
21

EECE 407 Microprocessor and Interfacing

Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

Architecture
CLR CLK CP EP

SAP 1
4

Program Counter
Input and MAR 4 4 16 x 8 RAM Instruction Register 4 Controller/ Sequencer 12
CON = CPEPLMCELIEILAEASUEULBLO

8 8

Accumulator

LA CLK EA

CLK LM

8
4 8 8 8 8 8 4 Adder/ Subtractor B Register
SU EU

CE

LB CLK

CLR CLK LI EI CLK CLR CLK CLR

Output Register

LO CLK

8
Binary Display

W BUS

EECE 407 Microprocessor and Interfacing

Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

22

Architecture

SAP 1

Bus organized architecture.


All register outputs to the W-bus are three state which allows orderly transfer of data. All other register outputs are two-state.

EECE 407 Microprocessor and Interfacing

Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

23

Program Counter

SAP 1 Architecture

A part of control unit. 4-bit up counter, counts from 0000 to 1111. The program for the computer is stored at the beginning of the memory with the first instruction at binary address 0000. Its job is to send to the memory address of the next instruction to be fetched and executed. Program counter is reset to 0000 before each computer run. At the beginning it sends address 0000 to memory. Then the counter is incremented to 0001. When the first instruction is fetched and executed, it sends address 0001. And the process continues.
EECE 407 Microprocessor and Interfacing Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

24

Input ad MAR

SAP 1 Architecture

Contains address and data switch registers. Address and data switch registers are part of input unit. These registers allow programmer to send 4 bit address and 8 bit data bits to RAM. MAR (Memory Address Register) is a part of memory unit. During a computer the addresses of program counter are latched into it. These latched addresses are fed to RAM when a read operation is performed.
EECE 407 Microprocessor and Interfacing Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

25

RAM (Random Access Memory)

SAP 1 Architecture

Part of memory unit. 16 byte static TTL RAM. Can be programmed by means of address and data switches. Receives address from MAR and places the stored content of on the W bus.

EECE 407 Microprocessor and Interfacing

Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

26

Instruction Register

SAP 1 Architecture

Part of control unit. To fetch an instruction from the memory the computer does a memory read operation. This places the contents of the addressed memory location on to W bus. At the same time the IR is set up for load on the next positive clock edge. The contents of IR are divided into two nibbles. The upper nibble is two state and goes to controller/sequence. The lower nibble is three state output that is read onto the W bus when needed.
EECE 407 Microprocessor and Interfacing Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

27

Controller/Sequencer

SAP 1 Architecture

Brain of the control unit. Before each computer run, C/S sends clear signal to reset program counter and IR. Sends clock signal to all buffer registers to synchronize the operation of the computer. The output of C/S is a 12 bit word known as Control Word (CON) contains signals those controls the rest of the computer. These 12 bit signal constitutes what is called control bus.
EECE 407 Microprocessor and Interfacing Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

28

Thank you all for your patience.

EEE 307, Level-3/Term-I February 2013

Shuvro Chowdhury, Lecturer, Dept. of EEE, BUET

45

Вам также может понравиться