Microprocessor Systems and Interfacing (EEE342)
Microprocessor Systems and Interfacing (EEE342)
(EEE342)
Computer vs. Microprocessor
Microcomputer vs. Microcontroller
Microprocessor Connection with the external world
Languages that Microprocessor can understand
Computer Organization vs. Computer Architecture
Role of ISA
RICS and CISC
COMPUTER VS. MICROPROCESSOR
Computer
A computer is an electronic Input machine that accepts
Processing Output
data/information, processes it according to Unit specific Unit
Unit
instructions called program, and stores it in a particular
fashion.
Microcontroller
Microcomputer on a single chip
3
MICROPROCESSOR CONNECTION WITH EXTERNAL WORLD
Input Output
Address Device Device
Decoder
Interface Interface
Memory I/O Ports
Devices Devices
Address Bus
Micro-
Data Bus
processor
Control Lines
4
BASIC COMPUTER ORGANIZATION
Computers have three classic components:
Processor,called CPU (Central Processing Unit)
Memory and Storage Devices
I/O Devices
5
BASIC COMPUTER ORGANIZATION
Computers have three classic components:
Processor,called CPU (Central Processing Unit)
Memory and Storage Devices
I/O Devices
System Buses
6
Data Path
PROCESSOR
ALU
Processor consists of
Datapath
ALU
Performs arithmetic and ...
logic instructions
Registers Control Unit
Control unit Registers
Generates the control signals
required to execute instructions
Processor
• A register is one of a small set of data holding places for the computer processor
• A register may hold an instruction, a storage address, or any kind of data
7
CLOCK
Clock refers to a microchip that regulates the timing and speed of all computer
functions
The speed of a computer processor is measured in clock speed
For example, 1 MHz is one million cycles per second, and 2 GHz is two billion cycles per
second
Synchronizes Processor and Bus operations
10
MEMORY HIERARCHY
Registers
Cache memory
Fast SRAM that stores recently used instructions and data
Main Memory
Disk Storage
Permanent magnetic storage for files
11
I/O CONTROLLERS
I/O devices are interfaced via an I/O controller
I/O controller uses the system bus to communicate with processor
I/O controller takes care of low-level operation details
Control Bus
I/O Controller
12
LANGUAGES THAT MICROPROCESSOR CAN UNDERSTAND?
Closer to Series of 1’s
human being and 0’s
Machine
Assembly
High Level Language/ Executed
Languages
Languages Compilers/ OpCodes by the
(This varies Assemblers
e.g., C, C++, Interpreters (This varies Micro-
per
JAVA per processor
processor)
processor)
User Designer
Programmer Architecture
Study of the
system Hardware is the core of
Software Hardware
the entire system
To discuss about organization, we generally talk about
layers surrounded over the hardware
MACHINE CODES TryingMachine
to hide
Code hard
011001100.. information which is to
Assembler
remember Code and
each
Hardware 0110 01100..
every code of operation
HLL Code (statement in a
S/W Operation Operand
given language)
Opcode data
For example: ADD A, B
Mnemonic codes: Aiding theFor example
memory a statement
of the user like: X = Y+ Z
14
PROCESSOR ARCHITECTURE
16
ASSEMBLY LANGUAGE
An assembly language is a low-level programming language for microprocessors
and other programmable devices.
With assembly language, a programmer works only with operations that are
implemented directly on the physical CPU.
Assembly languages generally lack high-level conveniences such as variables and
functions, and they are not portable between various families of processors.
They have the same structures and set of commands as machine language, but
allow a programmer to use names instead of numbers.
An assembly (or assembler) language, often abbreviated as asm.
17
APPLICATION-BASED CLASSIFICATION OF MPS
Real-address
Mode
Reprogrammable Microprocessors
Protected-
Used to implement a general-purpose microcomputer address Mode
Data control – hard disk controller interface – transfers a file of data from
secondary storage to primary storage 18
RISC AND CISC
Reduced Instruction Set Computing Complex Instruction Set Computing
Optimized set of instructions Specialized set of instructions
One cycle per instruction Multiple no.of cycles per instruction
Software based Hardware based
Implementation is fast Implementation is slow
The total clock cycles for the CISC version might be:
The clock cycles for the RISC version is:
(3 movs x 1 cycle) + (5 adds x 1 cycle) + ( 5 loops x 1 cycle) = (2 movs x 1 cycle) + (1 mul x 30 cycles) = 32 cycles
13 cycles 19
RISC VS. CISC
The difference between CISC and RISC becomes evident through the basic
computer performance equation:
CPU Time =
RISC systems shorten execution time by reducing the clock cycles per instruction
(i.e. simple instructions take less time to interpret)
CISC systems shorten execution time by reducing the number of instructions per
program
20
DATA REPRESENTATION
Binary Numbers
Hexadecimal Numbers
Base conversions
Character Storage
21