Microprocessor LEC 1
Microprocessor LEC 1
The microprocessor is the central processing unit or CPU of a micro computer.it is the
heart of the computer.
INTEL 8085:
It is an 8 bit Nmos microprocessor.it is an forty pin IC (integrated circuit) package
fabricated on a single LSI (Large scale Integration) chip.
It uses a single +5 volt d.c. (Direct Current) supply for its operation. It clock spee is 3 mhz.
It consists of 3 main sections.
1. Arithmetic Logic Unit(ALU)
2. Timing and control unit
3. Several Registers
Arithmetic Logic Unit:
It performs various arithmetic an logical operations like addition, subtraction, logical an
,xor, or, not, increment etc.
Timing and control unit:
It generates timing an control signals which are necessary for the execution of the
instructions. It controls the ata flo beteen cpu an peripherals.
Several Registers:
Registers:-it is a collection of flip flops use to store a binary word, they are used by the
microprocessor for the temporary storage and manipulation of data and instructions.
8085 has the following registers:
1. 8 bit accumulator i.e. register A
2. 6 8 bits general purpose registers i.e. B, C, D, E, H, L
3. one 16 bit register i.e. stack pointer
4. 16 bit Program counter, Status register, Temporary register, Instruction Register.
--------------------------------------------------------------------------------------------------------------------
Prepare for various competitive exams GATE | SSC JE | State JE/AE (offline & Online)
SCO 134-136, sector 34A Chandigarh | www.yourpedia.in | 9855273076
The register A holds the operands during program execution.
There are 6 8 bits general purpose registers B, C,, E, H, L are to handle 16 bit data two 8
bit registers can be combined this is called regi pair is used to as address memory location.
B register pair valid pair of 8085 are B
B-C, D-E are used for access another function.
STACK POINTER:
Stack is a sequence of memory location defined by the programmer in LIFO function.
That is last
Element to be placed on the stack is first one is to removed .The stack pointer contain the
address of the stack cup.
PROGRAM COUNTER:
It is the address of the next instructions to be executed.
--------------------------------------------------------------------------------------------------------------------
Prepare for various competitive exams GATE | SSC JE | State JE/AE (offline & Online)
SCO 134-136, sector 34A Chandigarh | www.yourpedia.in | 9855273076
INSTRUCTION REGISTER:
It holds a copy of the current instruction until it is decoded.
STATUS REGISTER:
It contains the status flags of 8085 microprocessor.
TEMPORARY REGISTER:
It is used to store intermediate results and for intermediate calculations.
STATUS FLAGS:
It is a set of 5 flip-flops
i. Carry Flag(Cs)
ii. Sign Flag(S)
iii. Zero Flag(Z)
iv. Parity Flag(P)
v. Auxilarity carry flag(A(C)
Carry Flag:
It holds carry out of the resulting from the execution of an arithmetic operation.
If there is a carry from addition or a borrow from subtraction or comparison, the carry
flag is said to 1 ortherwise it is 0.
Sign Flag:
It is set to 1 if the MSB of the result of an arithemetic or logical operation is 1 ortherwise
it is 0.
Zero Flag:
It is said to 1 if the result of an arithmetic or logical operation is zero for non zero result,
it is 0.
Parity Flag:
It is set to 1 when the result of the operation contains even no. of 1& it is set to 0 if there
are odd no. of 1.
--------------------------------------------------------------------------------------------------------------------
Prepare for various competitive exams GATE | SSC JE | State JE/AE (offline & Online)
SCO 134-136, sector 34A Chandigarh | www.yourpedia.in | 9855273076
Auxilary Carry Flag:
It holds carry from bit 3 to A resulting from the execution of an arithmetic operation. If
there is a carry from bit 3 to 4, the AC flag is set to 1 ortherwise it is 0.
BUS ORGANISATION:
INTEL 8085 is a 8 bit micro processor its data bus is 8 bit wide .8 bit of data can be
transmitted in parallel form or to the microprocessor.
Address bar is 16 bit wide as memory address are of 16 bit.8 msb is the address are
transmitted by on A8-A15.8 LSB is the address are transmitted by the data bus AD0-
AD7. The address or data bus transmits data & address at different moments.it can
transmits data or address at a time.
A8-A15 (output): These are address bus and are used for the most significant bits of the
memory address or 8 bits of I/O address.
AD0-AD7 (input/output): these are time multiplexed address /data bus that is they serve
dual purpose .they are used for the least significant 8 bits of the memory address or I/O
address during the first clock cycle of a machine cycle. Again they are used for data
during second and third clock cycles.
ALE (output): it is an address latch enable signal. It goes high during first clock cycle
of a machine cycle and enables the lower 8 bits of the address to be latched either into
the memory or external latch.
IO/M (output): it is a status signal which distinguishes whether the address is for
memory or I/O when it goes high the address on the address bus is for an I/O device.
When it goes low the address on the address bus is for a memory location.
S0, S1 (output): these are status signal sent by the microprocessor to distinguish the
various types of operation
--------------------------------------------------------------------------------------------------------------------
Prepare for various competitive exams GATE | SSC JE | State JE/AE (offline & Online)
SCO 134-136, sector 34A Chandigarh | www.yourpedia.in | 9855273076
RD (output): it is a signal to control READ operation .when it goes low the selected
memory or I/O device is read.
WR (output): it is a signal to control WRITE operation .when it goes low the data on the
data bus is written into the selected memory or I/O operation.
HOLD (input): it indicates that another device is requesting for the use of the address
and data bus. Having received a HOLD request the microprocessor relinquishes the use
of the buses as soon as the current machine cycle is completed. Internal processing may
continue the processor regains the bus after the removal of the HOLD signal when a
HOLD is acknowledged.
HLDA (output): it is a signal for HOLD acknowledgement. It indicates that the HOLD
request has been received after the removal of a HOLD request the HLDA goes low the
CPU takes over the buses half clock cycle after the HLDA goes low.
INTR (input): it is an interrupt request signal. Among interrupts it has the lowest priority.
An interrupt is used by io devices to transfer data to the microprocessor without wasting
its time.
RST5.5, RST6.5, RST 7.5(input): these are interrupts. Signals are the restart interrupt,
they causes an internal restart to be automatically inserted each of them of a
programmable mask.
--------------------------------------------------------------------------------------------------------------------
Prepare for various competitive exams GATE | SSC JE | State JE/AE (offline & Online)
SCO 134-136, sector 34A Chandigarh | www.yourpedia.in | 9855273076
TRAP: TRAP has the highest priority. It is used in emergency situation it is an non-mask
able interrupt.
Order of priority-
TRAPo RST 7.5 o RST 6.5 o RST 5.5 oINTR
When an interrupt is recognize the next instruction is executed from a fixed location in
memory.
A subroutine is executed which is called ISS (interrupt service subroutine).
RESET IN (input)- it resets the program counter to zero .it also resets interrupts enable
that is an HLDA flip-flops.
CLK (output)- it is a clock output for user, which can be used for other digital integrated
circuits.
SID (input)- it is data line for serial input. The data on this line is loaded into the 7th bit
of the accumulator when rim (read interrupt mask) instruction is executed.
--------------------------------------------------------------------------------------------------------------------
Prepare for various competitive exams GATE | SSC JE | State JE/AE (offline & Online)
SCO 134-136, sector 34A Chandigarh | www.yourpedia.in | 9855273076
SOD (output)- it is data line for serial output. The 7th bit of the accumulator is output on
sod line when sim instruction is executed.
Vcc-it is +5 volt dc supply.
Vss-it is the ground reference.
--------------------------------------------------------------------------------------------------------------------
Prepare for various competitive exams GATE | SSC JE | State JE/AE (offline & Online)
SCO 134-136, sector 34A Chandigarh | www.yourpedia.in | 9855273076
1. Which of the following is the correct data bus width of the 8085
microprocessor?
(A) 4-bit (B) 8-bit
(C) 16-bit (D) 32-bit
Ans. (B)
The 8085 is an 8-bit microprocessor, meaning it processes 8-bit data at a time. It
has an 8-bit data bus, which allows it to transfer 8-bit data between the
microprocessor and memory or I/O devices.
--------------------------------------------------------------------------------------------------------------------
Prepare for various competitive exams GATE | SSC JE | State JE/AE (offline & Online)
SCO 134-136, sector 34A Chandigarh | www.yourpedia.in | 9855273076
8. What is the function of the ALE (Address Latch Enable) signal?
(A) Indicates memory read operation
(B) Differentiates between I/O and memory operations
(C) Latches the lower byte of the address
(D) Enables data transfer
Ans. (C)
The ALE (Address Latch Enable) signal helps in latching the lower 8 bits of
the address from the multiplexed address/data bus.
9. Which flag in the flag register is set when the result of an operation is zero?
(A) Carry Flag (B) Zero Flag
(C) Sign Flag (D) Auxiliary Carry Flag
Ans. (B)
The Zero Flag (ZF) is set if the result of an arithmetic or logical operation is zero.
11. Which instruction fetch cycle takes place in the 8085 microprocessor?
(A) Machine cycle (B) Fetch cycle
(C) Interrupt cycle (D) Execution cycle
Ans. (A)
The instruction fetch is part of a machine cycle, where the processor fetches an
instruction from memory.
--------------------------------------------------------------------------------------------------------------------
Prepare for various competitive exams GATE | SSC JE | State JE/AE (offline & Online)
SCO 134-136, sector 34A Chandigarh | www.yourpedia.in | 9855273076
12. The width of the flag register in 8085 is:
(A) 4-bit (B) 8-bit
(C) 16-bit (D) 32-bit
Ans. (B)
The 8085 flag register is 8-bit, but only five flags (Sign, Zero, Auxiliary Carry,
Parity, and Carry) are used.
14. Which of the following instructions is used to load the accumulator with a
direct 8-bit value?
(A) LDA (B) MOV
(C) MVI (D) STA
Ans. (C)
The MVI A, data instruction loads an 8-bit immediate value into the
accumulator.
--------------------------------------------------------------------------------------------------------------------
Prepare for various competitive exams GATE | SSC JE | State JE/AE (offline & Online)
SCO 134-136, sector 34A Chandigarh | www.yourpedia.in | 9855273076