Unit I BCA
Unit I BCA
Unit I BCA
Introduction to Microprocessor
Microprocessor is a controlling unit of a micro-computer, fabricated on a small chip capable of
performing ALU (Arithmetic Logical Unit) operations and communicating with the other devices
connected to it.
Microprocessor consists of an ALU, register array, and a control unit. ALU performs arithmetical
and logical operations on the data received from the memory or an input device. Register array
consists of registers identified by letters like B, C, D, E, H, L and accumulator (register in which
intermediate arithmetic and logic results are stored.). The control unit controls the flow of data
and instructions within the computer.
Features of a Microprocessor
Here is a list of some of the most prominent features of any microprocessor −
a) Cost-effective − The microprocessor chips are available at low prices and results its low
cost.
b) Size − The microprocessor is of small size chip, hence is portable.
c) Low Power Consumption − Microprocessors are manufactured by using metaloxide
semiconductor technology, which has low power consumption.
d) Versatility − The microprocessors are versatile as we can use the same chip in a number
of applications by configuring the software program.
e) Reliability − The failure rate of microprocessors is very low, hence it is reliable.
1
Microprocessor Architecture & Operation
Register Array – It consists of various registers identified by letter such as B, C, D, E, H, L, IX, and
IY. These registers are used to store data and addresses temporarily during the execution of a
program.
Control Unit – The control unit provides the necessary timing and control signals to all the
operations in the microcomputer. It controls the flow of data between the microprocessor and
memory and peripherals.
Input – The input section transfers data and instructions in binary from the outside world to the
microprocessor. It includes such devices as a keyboard, switches, a scanner, and an analog-to-
digital converter.
Output – The output section transfers data from the microprocessor to such output devices as
LED, CRT, printer, magnetic tape, or another computer.
Memory – It stores such binary information as instructions and data, and provides that
information to the microprocessor. To execute programs, the microprocessor reads instructions
and data from memory and performs the computing operations in its ALU section. Results are
either transferred to the output section for display or stored in memory for later use.
System bus – It is a communication path between the microprocessor and peripherals. The
microprocessor communicates with only one peripheral at a time. The timing is provided by the
control unit of the microprocessor.
2
Bus organization of 8085 microprocessor
Bus is a group of conducting wires which carries information, all the peripherals are connected
to microprocessor through Bus.
b) Data bus –
It is a group of conducting wires which carries Data only. Data bus is bidirectional
because data flow in both directions, from microprocessor to memory or Input/output
devices and from memory or Input/output devices to microprocessor.
c) Control bus –
It is a group of wires, which is used to generate timing and control signals to control all
the associated peripherals, microprocessor uses control bus to process data, that is
what to do with selected memory location. Some control signals are:
- Memory read
- Memory write
- I/O read
- I/O Write
3
8085 Microprocessor & its Operation
8085 is pronounced as "eighty-eighty-five" microprocessor. It is an 8-bit microprocessor
designed by Intel in 1977 using NMOS technology.
4
8085 consists of the following functional units −
1) Accumulator
It is an 8-bit register used to perform arithmetic, logical, I/O & LOAD/STORE operations.
It is connected to internal data bus & ALU.
4) Program counter
It is a 16-bit register used to store the memory address location of the next instruction
to be executed. Microprocessor increments the program whenever an instruction is
being executed, so that the program counter points to the memory address of the next
instruction that is going to be executed.
5) Stack pointer
It is also a 16-bit register works like stack, which is always incremented/decremented by
2 during push & pop operations.
6) Temporary register
It is an 8-bit register, which holds the temporary data of arithmetic and logical
operations.
7) Flag register
It is an 8-bit register having five 1-bit flip-flops, which holds either 0 or 1 depending
upon the result stored in the accumulator.
These are the set of 5 flip-flops –
- Sign (S)
- Zero (Z)
- Auxiliary Carry (AC)
- Parity (P)
- Carry (C)
D7 D6 D5 D4 D3 D2 D1 D0
S Z AC P CY
5
8) Instruction register and decoder
It is an 8-bit register. When an instruction is fetched from memory then it is stored in
the Instruction register. Instruction decoder decodes the information present in the
Instruction register.
6
8085 Pin Configuration
2) Data bus
AD7-AD0, it carries the least significant 8-bit address and data bus.
a) RD − This signal indicates that the selected IO or memory device is to be read and is
ready for accepting data available on the data bus.
7
b) WR − This signal indicates that the data on the data bus is to be written into a selected
memory or IO location.
c) ALE − It is a positive going pulse generated when a new operation is started by the
microprocessor. When the pulse goes high, it indicates address. When the pulse goes
down it indicates data.
IO/M
This signal is used to differentiate between IO and Memory operations, i.e. when it is high
indicates IO operation and when it is low then it indicates memory operation.
S1 & S0
These signals are used to identify the type of current operation.
4) Power supply
There are 2 power supply signals − VCC & VSS. VCC indicates +5v power supply and VSS
indicates ground signal.
5) Clock signals
There are 3 clock signals, i.e. X1, X2, CLK OUT.
The method by which the address of source of data or the address of destination of result is
given in the instruction is called Addressing Modes. The term addressing mode refers to the
way in which the operand of the instruction is specified.
9
Direct Addressing Mode
In direct addressing mode, the data to be operated is available inside a memory location and
that memory location is directly specified as an operand. The operand is directly available in the
instruction itself.
Example:
LDA 2050 (load the contents of memory location into accumulator A)
Register Addressing Mode
In register addressing mode, the data to be operated is available inside the register(s) and
register(s) is(are) operands. Therefore, the operation is performed within various registers of
the microprocessor.
Examples:
MOV A, B (move the contents of register B to register A)
ADD B (add contents of registers A and B and store the result in register A)
INR A (increment the contents of register A by one)
Introduction to 8086
8086 Microprocessor is an enhanced version of 8085Microprocessor that was designed by Intel
in 1976. It is a 16-bit Microprocessor having 20 address lines and16 data lines that provides up
to 1MB storage. It consists of powerful instruction set, which provides operations like
multiplication and division easily.
It supports two modes of operation, i.e. Maximum mode and Minimum mode. Maximum mode
is suitable for system having multiple processors and Minimum mode is suitable for system
having a single processor.
10
Features of 8086
a) It has an instruction queue, which is capable of storing six instruction bytes from the
memory resulting in faster processing.
b) It was the first 16-bit processor having 16-bit ALU, 16-bit registers, internal data bus,
and 16-bit external data bus resulting in faster processing.
c) It uses two stages of pipelining, i.e. Fetch Stage and Execute Stage, which improves
performance. Fetch stage can prefetch up to 6 bytes of instructions and stores them in
the queue. Execute stage executes these instructions.
d) It consists of 29,000 transistors.
11