Sunteți pe pagina 1din 9

Microprocessor

UNIT-1

Basics

Bit- A digit of binary number
Nibble-The 4 bit binary number
Byte-The 8 bit binary number
Word- The 16 bit binary number
Double word- The 32 bit binary number
Data-Instruction of program or a set of information
Address- This is an identification number in binary for memory location
Memory word size- It is a size of a binary information that can be stored in memory location
Microprocessor-
*It is a program controlled device
*It is used as CPU in computers
*Microprocessors are ALU(Arithmetic Logic Unit ) an array of register and a control unit
Bus- A bus is a group of conducting lines that carries data address and control signals . it is
classified into 3 types:
1.Data bus - It carries data only
2.Address bus - It carries address only
3. Signal bus - It carries signals only
CPU Bus- The group of conducting lines that are directly connected to microprocessor is
called CPU bus
System bus- The group of conducting lines that carries data address and signals in a
microcomputer is called system bus
Clock - A clock is a square wave .Every microprocessor requires a clock for its functioning .


Level edge
Negative
edge





Evaluation of Microprocessor

* In 1971, Intel Corporation released the world's first microprocessor
* Intel 4004 is a 4 bit microprocessor
*It addresses 4096 memory locations of word size 4 bit
*It consists of 5 different instructions
*It is monolithic IC employing large scale integration in PMOS technology

First generation microprocessor
*it was introduced between 1971 and 1973
*It was designed using PMOS technology
Characteristics-
*Low cost
*Slow speed and low output current
Positive
edge


* It requires additional support IC's .
Eg: Intel 4004, 8008

Second generation microprocessor
*it was introduced in 1973
*It was manufactured using NMOS technology
Characteristics-
*Faster speed
*Higher density than PMOS
Eg: Intel 8008, Toshiba TLCS 12

Third generation microprocessor
*After 1978, the third generation of microprocessors were introduced
*It was a 16 bit processor
*It uses the HMOS technology
Characteristics-
*Provide 40/48/64 pins
*Provide high speed and strong processing capability
*Easier to program
*Physical memory 1 to 16 Mbps
*Different modes of operation

Fourth generation Microprocessors
* It was introduced in the year 1980
*Uses the low power version HCMOS technology
Eg:Intel 80836,80846
Characteristics -
*Physical memory 2
24
bytes = 16Mega bytes(MB)
* Virtual memory 2
40
bytes =1 TB (Tera bytes)
* It supports increased number of addressing mode


Components of microprocessor/ Architecture of Microprocessors

*Microprocessor is an IC capable if performing arithmetic and logical operation
* The block diagram of microprocessor consists of the following components
(i) ALU
(ii)Flag register
(iii)Register array
(iv)PC(program counter)/Instruction pointer (IP)
(v)Instruction Decoding Unit
(vi) Timing and control Unit


(I) ALU
*ALU (arithmetic Logic Unit) is the computational unit of microprocessor
*Which performs logical and arithmetic operation of binary data
(II) Flag register
*The various conditions of the result are stored as the status bit called flag in the flag register
(III) Register array
*This is an internal storage device so it is called internal memory
*The input data of ALU , output data of ALU and any other information is stored in register
array
(IV)PC/IP
*The program counter generates the address of the instruction to be fetched from
the memory and sends it through the address bus to the memory
(V) Instruction decoding unit
*The instruction codes are decoded by the instruction decoding unit and sends
information to the timing control unit
(VI)Timing control unit
*The control unit will generate the necessary control signals for the internal and
external operation of microprocessor


























Microcomputer

*To perform various functions and useful tasks, a system is to be formed using a
microprocessor as a CPU and interfacing memory, input and output devices to it
*A system designed using a microprocessor as its CPU is called a Microcomputer.
*It consists of EPROM, RAM, input , output and interfacing devices.
*The memories, input devices , output devices and interfacing devices are called peripherals
*Eg: EPROM -> Intel 2708(1KB) & Intel 2716 (2KB)
RAM -> MOTOROLA 6208(1KB) & Intel 6216 (2 /kb0
*Input devices are keyboard, joystick, mouse, etc.
Flag register
Timing and Control
Unit
Register array
or
Internal memory
Instruction decoding
unit
PC/IP
ALU
Control bus Address bar
D
a
t
a

b
u
s
*Output devices are printer , LED/LCD monitor , CRT monitor, etc.
*The block diagram of Microcomputer is as shown below:














*In this Microcontroller , microprocessor is the master and all the other peripherals are
slaves.
* The master controls all the peripherals and operations
*The buses are groups of lines that carries data, addresses and control signals
*CPU buses are multiplexed lines and the system buses have separate lines for each signal
*The communication takes place between the master and any one of the slaves
*The EPROM memory is used to store permanent program and data
*RAM memory is used to store temporary program and data
* The input devices are used to enter program and data ad to operate the system
*The output devices are used for examining the result
*The speed of the I/O devices does not match with the microprocessor
*Generally I/O devices are slow
*The work done by the processor is given below:
1. Work done internal to the processor-
It does addition , subtraction , logical operation, data transfer within the register
2. Work done external to the processor-
It reads/ writes the memory to the I/O devices
3.Operations initiated by the slaves
Slaves require the attention of the master to initiate an operation.


Types of computer

The computers are broadly classified into 3 types:
1. Mainframe computer
2.Minicomputer
3.Macrocomputer
Mainframe computer-
*The largest and most powerful computer is called mainframe computer
Microprocessor
(CPU)
CPU
interface
EPROM
RAM I/O interface
Input device Output device
CPU Bus
A/D
A
C
Data bus
Address bus
Control bus
* It is a very large system and may occupy an entire room
*Works with high speed with high data words
*It has massive amount of memory
*It is used in military , business, data processing , computer graphics , displays .
Eg: IBM 4381, Honeywell DP88

Minicomputer-
*The extended version of mainframe computer is called as minicomputer
*It is also a large system and fits in a single rack or box
* Minicomputers run slowly
* It works with smaller data words
* Compared to a mainframe computer, minicomputers have smaller memory
* It is used in business data processing , industrial control and scientific research
*Eg: Corp-Var 11/730 , HCL's MAGNUM
* CPU of minicomputers have more than one microprocessor

Micro Computer
*Microcomputers are small computers
*It directly works with 4 bit words and can address a few thousand bytes of memory
*Large units that work with 64 bit words and address millions/billions of bytes of memory
*It has all features of a minicomputer
*The CPU of microcomputers have a single microprocessor
*Eg: IBM /PC 80 . A7 286 , A7 386


Microprocessor signals and Pin assignment (8085)

*The Intel 8085 is an 8 bit microprocessor released in the year 1976
*It was designed using NMOS technology and now it manufactured using HMOS
*It contains approximately 6500 transistors
*The 8085 packed is in a 40 pin (Dual in lie package) and it requires a single signal 5 Volts
supply
*The 8085 has an internal clock oscillator . It generates a clock signal internally which is
divided by two and then used as an internal clock
*This internal clock is also given out through the CLK pin
*The basic data size of 8085 is 8 bit , so the memory size is also 8 bit or byes
*The 8085 uses a 16 bit address to access memory and address upto 2
16
=65536 => 64K
memory
*The maximum memory capacity of 8085 is 64 kbps
*It can generate 2
8
= 256 I/O addresses
*The 8085 has 8 pins AD
0
to AD
7
for data transfer
*The 8085 provides a signal ALE ( Address latch enable)
*The 8085 differentiates the memory and I/O address using the signal IO/M'
The RD signal is asserted low by the processor during the memory or I/O read operation
* WR signals are asserted low by the processor during the memory or I/O write operation
*The S
0
and S
1
are bus status indicator
* READY is an input signal
* HOLD and HLDA signals are used for Direct Memory Access (DMA)
*The 8085 has 5 interrupt pins TRAP,RST 7.5 , RST 6.5, RST 5.5 and INTR
*The x
1
and x
2
are frequency clocks
*The RESET IN is the system reset input system
*The RESET OUT is the system reset output signal
The STD and SOD pins are used for serial data communication



x1
x2
Reset out
SOD
STD
TRAP
RST 7.5
RST 6.5
RST 5.5
INIR
INTA
AD
0
AD
1
AD
2
AD
3
AD
4
AD
5
AD
6
AD
7
VAA(AND)





Architecture of INTEL 8085

*The architecture of 8085 includes the ALU timing and control unit , instruction registers and
decoder, register array , interrupt control and serial I/O control
*The ALU performs the arithmetic and logical operations. The operations performed by
ALUin8085 are addition , subtraction, increment , decrement , logical AND ,OR, NOT ,
compare , complement , left/right shift
*The accumulator and temporary register are used to hold the data during arithmetic and
logical operation .
After the operation the result is stored in accumulator and flag register
*There are 5 flags in 8085
(i)Sine flag(S) (ii)Zero flag(Z) (iii) Auxiliary flag(AC) (iv)Parity flag(P)
(v)Carry flag(CY)
~After the ALU operation if the result is 0 , sine flag is set
~If the result is 1 , then zero flag is set
~The result is generated by lower nibble then the auxiliary carry flag is set
~If the result has even number of 1's , then the parity flag is set
*The timing and control unit synchronise all the microprocessor operation with the clock and
generates the cock signals
*Instruction is fetched from memory is placed in instruction register
*And the nit is decoded or encoded in various Cycle Machine
*The 8085 had 6 general purpose registers B,C,D,E,H and L
*They can be used to store 8 or 16 bit registers
VCC(+5V)
HOLD
HLDA
CLK OUT
RESET IN
READY
I/O M'
S
1
RD
WR
ALE
S
0
A15
A14
A13
A12
A11
A10
A9
A8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
*The pairs are BC,DE, and HL
The temporary register , W and Z, van nit be used by the programmers
*The stack pointer 8p holds the address of the stack top
*The program counter (PC) keeps track of the program execution



























Machine language and assembly language
*A microcomputer runs a program by executing the instructions one by one
*The computer can understand only binary codes 0's and 1's
*Binary code is also called machine code
*This memory code is arranges byte-wise so that it can be stored in memory location
*The binary form of the program is known as machine language
Interrupt control Serial I/O control
Accumulator
(A)
Temporary
register (Tmp)
Instruction
register
Instruction
decoding /
encoding
cycle
Flag register
Timing and control unit
W(8) Z(8)
B(8) C(8)
D(8) E(8)
H(8) L(8)
Stack pointer
Program C
counters
Increment/
Decrement

High
address
buffer
Address
data
buffer
Internal data bus
Address bus
Address
data bus
ALU
INTA INTR RST5.5 RST6.5 RST7.5 TRAP
x1 x2 CLK H H R I/O WR RD ALE OUT IN PI
O L E M'
L D A
D A D
Y
8
8
8
VU


GND
SID SOD
*It is difficult for the programmer to remember and use this instruction
*Even though it can be represented in hexadecimal numbers

Assembly language-
*Assembly language instructions are provided to describe each basic operation performed by
the microprocessor
*Assembly language uses the alphanumeric characters instead of 0's and 1's
*Each instruction uses 2,3,4 ,or even 5 English letters to represent an instruction
*A group of letters is called mnemonic
*The Mnemonic is used to represent the operations performed
Eg:
For move operation the mnemonic is MOV
For subtraction operation the mnemonic is SUB
For compare operation the mnemonic is CMP
For exchange operation the mnemonic is XCHG
Now to move data from register A to register B have the instruction MOV A,B


The 8085 instruction set

*The 8085 instruction set can be classified into five categories:
1. Data transfer (copy ) operation
2.Arithematic operations
3. Logical operations
4. Branching operations
5. Machine control operations

1. Data transfer operation-
The group of instructions which copies data from source
location and transfer it to another destination location is called Data transfer .It can be done
without modifying the content of the source.
Eg: Between register
Between memory location and register

2. Arithmetic operation-
These instructions perform arithmetic operations such as
addition, subtraction , increment , and decrement .
ADDITION-The content of the register or the content of the memory location can be added
to the content of the accumulator and the sum is stored in the accumulator.
SUBTRACTION- The content of the register or the content of the memory location can be
subtracted from the content of the accumulator and the sum is stored in the accumulator.
INCREMENT/DECREMENT - The content of the register or the memory location is
incremented or decremented by 1.

3. Logical operation-
These instructions perform various logical operations with the
content of the accumulator.
AND, OR , Exclusive-OR:
The content of the register or the content of the memory location can be logically ADD'ed ,
OR'ed ,Exclusive-OR'ed with the content of the accumulator and the sum is stored in the
accumulator.
ROTATE
Each bit in the accumulator can be shifted either to the left or right.
COMPARE
The content of the register or the memory location can be compared for the equality, greater
than , less than with the accumulator.
COMPLEMENT
The content of the accumulator can be complemented. 0's are replaced by 1's and 1's are
replaced by 0's.
4. Branching operation-
These group of instructions alter the sequence of program
execution either conditionally or unconditionally.
JUMP:
These instructions check for a certain condition and alters the sequence of program
execution.
CALL, RETURN, RESTART
These instructions change the sequence of program execution by calling the sub-routine or
returning from sub-routine.

5. Machine Control Operation
These instructions control Machine function Half, Interrupt or
Do Nothing.

S-ar putea să vă placă și