MP Module 1
MP Module 1
COMPUTER SCIENCE
SEMESTER IV
Microprocessors
and
Assembly Language Programming (CS4CRT11)
Introduction &
MODULE 1-Microprocessor Architecture
Part-1
Presented By: Bindumol P T
C A S Puthuppally
Unit I
Strings, Procedures and Macros – 8086 string instructions, writing and using
procedures, CALL and RET instructions, stack, using PUSH and POP to save register
contents, passing parameters, re-entrant and recursive procedures, writing and using
macros.
Unit IV
8086 interrupts – program examples, interrupt Types, 8254 software – programmable
TIMER/ COUNTER – basic 8253 and 8254 operations, 8255A, 8259A Priority interrupt
controller. Direct Memory Access data transfer – circuit connections and operations of the
Intel 8257 DMA controller, DMA transfer timing diagram.
Unit V
Intel 80286 microprocessor – architecture, signals and system connections, Real address
mode operation, protected mode operation. Intel 80386 32-bit microprocessor –
architecture, pins and signals. Introduction to 80486 microprocessor. Introduction to RISC
machines.
Book of study:
1. A.Nagoor Kani - Microprocessor 8086 programming & interfacing, Second
edition, Tata McGraw Hill Education.
2. Microprocessors and Interfacing , Programming and Hardware, Douglas
V- Hall. Tata McGraw-Hill,1990.
References:
1. Barry B.Brey - Architecture,
Programming and Interfacing ,
Eighth Edition, Prentice – Hall India.
2. The Intel Microprocessors 8086
/ 8088 , 80186 / 80188 , 80286 ,
80386 , 80486 , Pentium,
and Pentium Pro processor
MODULE- 1
❖ Microprocessor architecture and its operations
❖ Microprocessor initiated operations and 8085 bus
organization
❖ Internal data operations, 8085 registers,
❖ Externally initiated operations.
❖ Memory – memory map, memory and instructions,
peripheral mapped I/O.
❖ 8085 Microprocessor and its architecture.
MODULE- 1
INTRODUCTION
What is a Microcomputer ?
is called a microcomputer.
Parts of a microcomputer
Input : User can enter instructions and data into the memory through devices
like keyboard,simple switches etc called input devices.
Memory: It is used to store programs, data and results. A computer uses
different types of memory devices like:
• Semiconductor memory-RAM ,ROM etc
• Magnetic memory- Hard disk,Floppy disk etc
• Optical memory - CD,DVD etc
Central Processing Unit (CPU): It executes the users program and controls
memory, input and output devices.
Output : The output devices transfer data from the CPU to the outside world.
Eg: Monitor,Printer,Plotter ,LED etc
MICROPROCESSOR
Microprocessor is the CPU of a micro-computer.
It is a multipurpose , programmable,
clock driven, register based VLSI chip,
that fetches instructions from memory
and accepts data as input, then decodes it
and executes those instructions and
provides the result as output.
It consists of
●ALU-Arithmetic and Logic Unit
●Register Array
●Flag register
Program Counter (PC) / Instruction Pointer (IP)
●
Presented By :- Bindumol P T
CAS Puthuppally
1.Functions performed by a Microprocessor
MEMORY
◼ memory map
◼ memory and instructions
◼ Peripheral mapped I/O.
◼ Memory mapped I/O.
Memory
➢ Memory stores binary instructions and data for the microprocessor.
➢ Memory is a group of registers , arranged in a sequence, to store bits.
➢ The number of bits stored in a register is called memory word.
➢ The MPU can read from or write into the memory chip.
⚫ It is non-volatile and MPU can only read the information from the ROM.
Memory Mapping
•Memory mapping is the process of interfacing memories to microprocessor
and assigning addresses to each memory locations in memory chip.
•8085 MPU requires an 8 bit wide memory word and uses the 16 bit address
to select a register called a memory location.
•The assignment of memory address is done through the chip select logic.
•8085 has 16 address lines (A15 - A0) because it can address 65,536 (216)
memory locations.
•The entire memory map can range from 0000 H – FFFF H
A15 A14 A13 A12 A11 A10 A9 A8 A7A6 A5 A4 A3 A2 A1 A0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 = 0000 H
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 = FFFF H
Last location FFFF H (65535 )
10 Program in Assembly
Language:
MVI A,03H 3E,03
MVI B,05H 06,05
ADD B 80
HLT 76
3. The instruction code (4FH) stored In the memory location is placed on the data bus and
transferred to the microprocessor.
8085 MPU fetches the instruction using address bus, the data bus and
control buses.
Steps to read data
from memory:
1.Place 16 bit address on
address bus.
2.Send the Memory read
control signal(MEMR) to
the memory chip.
3.Contents of the
Addressed memory
location are placed on
the data bus and brought
inside the
microprocessor.
Methods of interfacing I/O devices to microprocessors are of two types:
1.Memory mapped I/O 2. Peripheral mapped or I/O mapped I/O
Review questions?
1. What is memory mapping ?
2. Explain memory read operation in a microprocessor.
3. Compare memory mapped I/O and I/O mapped I/O
Module1
Part 4
◼ 8085 Features
◼ Architecture
8085 Microprocessor :
It is an 8-bit microprocessor.
Features:
• 8-bit data bus
•16-bit address bus, which can address upto 64KB
•A 16-bit program counter
•A 16-bit stack pointer
•Six 8-bit registers arranged in pairs: BC, DE, HL
•Requires +5V supply to operate at 3.2 MHZ single phase clock
•It is used in washing machines, microwave ovens, mobile phones, etc.
Figure 1.1 shows the functional block diagram or the internal architecture of 8085
Microprocessor.It includes ALU,Register array,Timing and Control unit, Instruction register and
Decoder, ,Interrupt control and Serial I/O control.
1. ALU : The arithematic/logic unit performs the computing functions.It includes the
accumulator,the temporary register,the arithematic and logic circuits and Flag register.
Accumulator (A register) : It is an 8 bit register.During an arithematic/logic operation one of the
operand is stored in the accumulator and the result of operation is also stored in the accumulator.
Temporary register: The temporary register is used to hold data during an arithematic/logic
operation.
Flag register: The flag register
reflects the status of the ALU after the
execution of an instruction.
It is an 8 bit register.But only 5 bits are
used as shown in the figure 1.2
2.REGISTER ARRAY : The 8085 Microprocessor contains six 8 bit general purpose registers.
They are : B,C,D,E,H and L register. To hold 16 bit data combination of two 8 bit registers called
register pair can be used.the valid register pairs are : B-C,D-E and H-L pair.
Program Counter PC: It is a 16 bit register that is used to point to the address of the next
instruction to be fetched from memory.
Stack Pointer SP : It is a 16 bit register that is used to point to the address of the memory
location used as stack.
3.TIMING AND CONTROL UNIT : This unit synchronises all the microprocessor operations with
the clock and generates the contol signals necessary for communication between the
microprocessor and peripherals.
6.SERIAL INPUT OUTPUT CONTROL : This unit controls the serial communication by using the
lines SID (Serial Input Data ) and SOD (Serial Output Data ).
8. ADDRESS BUS AND DATA BUS : The address bus is 16 bit (AD0 to AD7 and A8 to A15).
The data bus is 8 bit wide(AD0 TO AD7