Professional Documents
Culture Documents
Mpi V Sem It Guess Paper Solutions
Mpi V Sem It Guess Paper Solutions
(BRANCH: IT)
Unit 1:
Ans.
Ans.
(BRANCH: IT)
Ans.
(BRANCH: IT)
(BRANCH: IT)
(BRANCH: IT)
Q2. Explain the requirement of a program counter and stack pointer in the architecture of Intel 8085
microprocessor?
Ans. There are two 16-bit registers used to hold memory addresses. The size of these registers is
16 bits because the memory addresses are 16 bits. They are :-
Program Counter: This register is used to sequence the execution of the instructions. The
function of the program counter is to point to the memory address from which the next byte
is to be fetched. When a byte (machine code) is being fetched, the program counter is
incremented by one to point to the next memory location.
Stack Pointer: It is used as a memory pointer. It points to a memory location in read/write
memory, called the stack. It is always incremented/decremented by 2 during push and pop
operation.
(BRANCH: IT)
Ans.
(BRANCH: IT)
(BRANCH: IT)
Q2. Explain the memory interfacing of 256 bytes? Explain how the range can be changed by
modifying the hardware?
(BRANCH: IT)
Ans.
(BRANCH: IT)
Unit 2:
Short Answers :(2 Marks Each)
MPI Guess Paper Solution Prepared By: Abha Sharma
Arya Institute of Engineering & Technology, Jaipur
Guess Paper V Semester (2021-2022)
5IT3-01: MICROPROCESSOR & INTERFACES
(BRANCH: IT)
Ans. The stack is a LIFO (last in, first out) data structure implemented in the RAM area and is
used to store addresses and data when the microprocessor branches to a subroutine. Then the return
address used to get pushed on this stack. Also to swap values of two registers and register pairs we
use the stack as well.
In the programmer‘s view of 8085, only the general purpose registers A, B, C, D, E, H, and L, and
the Flags registers were discussed so far. But in the complete programmer’s view of 8085, there
are two more special purpose registers, each of 16-bit width. They are the stack pointer, SP, and
the program counter, PC. The Stack Pointer register will hold the address of the top location of the
stack. And the program counter is a register always it will hold the address of the memory location
from where the next instruction for execution will have to be fetched. The complete programmer's
view of 8085 is shown in the following figure.
SP is a special purpose 16-bit register. It contains a memory address. Suppose SP contents are
FC78H, then the 8085 interprets it as follows.
Memory locations FC78H, FC79H, ..., FFFFH are having useful information. In other words, these
locations are treated as filled locations. Memory locations FC77H, FC76H, ..., 0000H are not
having any useful information. In other words, these locations are treated as empty locations.
On a stack, we can perform two operations. PUSH and POP. In case of PUSH operation, the SP
register gets decreased by 2 and new data item used to insert on to the top of the stack. On the
other hand, in case of POP operation, the data item will have to be deleted from the top of the stack
and the SP register will get increased by the value of 2.
Q.2 Find out the Machine cycle and T states for following Instruction:-
Ans. Instruction
(BRANCH: IT)
If some specified condition is satisfied in conditional jump, the control flow is transferred to a
target instruction. There are numerous conditional jump instructions depending upon the condition
and data. Conditional Jump Instructions are an important aspect of the decision making process in
programming. These Instruction test for a certain condition (e.g., Zero or Carry Flag) and alter the
program sequence when the condition is met. The conditional Jump instruction check the flag
conditions and make decisions to change or not to change the sequence of the program.In
conditional jump instruction, status conditions at the time of jump instruction execution decide
whether or not the jump will occur.
Unconditional jump
In unconditional jump instruction, as the instruction is executed, the jump always ready to takes
pace to change the execution sequence. This is performed by the JMP instruction. Conditional
execution often involves a transfer of control to the address of an instruction that does not follow
the currently executing instruction. Transfer of control may be forward, to execute a new set of
instructions or backward, to re-execute the same steps. The assembler determines the smallest
encoding possible for the direct unconditional jump. It is the unconditional jump that executes
regardless of the state of all flags. So we write an unconditional jump as the very first instruction
of our program and jump to the next instruction that follows our data declarations.
(BRANCH: IT)
(BRANCH: IT)
(BRANCH: IT)
Q2. Define opcode and operand? Explain opcode and operand in MOV H,L? (ch2,2)
An opcode is a single instruction that can be executed by the CPU. In machine language it is a
binary or hexadecimal value such as 'B6' loaded into the instruction register.
In assembly language mnemonic form an opcode is a command such as MOV or ADD or JMP.
For example
MOV AL, 34h
The opcode is the MOV instruction. The other parts are called the 'operands'.
Operands are manipulated by the opcode. In this example, the operands are the register named AL
and the value 34 hex.
MOV H,L
(BRANCH: IT)
Q1. Define Machine Cycle? What are the different types of machine cycle used for calculation of T-
States? Explain Opcode Fetch machine Cycle with Timing diagram?
Ans.
(BRANCH: IT)
The I/O read and I/O write machine cycles are similar to the memory read and memory write
machine cycles, respectively, except that the 10/M signal is high for I/O read and I/O write machine
cycles. High IO/M signal indicates that it is an I/O operation.
6. Interrupt Acknowledge Cycle of 8085:
In response to INTR signal, 8085 executes interrupt acknowledge machine cycle to read an
instruction from the external device. Theoretically, the external device can place any instruction
on the data bus in response to INTA. However, only RST and CALL, save the PC contents (return
address) before transferring control to the interrupt service routine. The next sections explain
Interrupt Acknowledge Cycle of 8085 for RST and CALL instruction.
Q2. Draw the timing diagram of MVIA, 32H?
Ans.
(BRANCH: IT)
Unit 3
Short Answers:(2 Marks Each)
Q.1 What is the difference between Macros and Subroutine? Explain with examples?
Ans. Subroutines and Macros work similarly, they have subtle differences. Any logic may use
both macros and subroutines. The main difference is in the way they are used. Only subroutines
can be used when you need to pass arguments, get a return value, or activate the independent
execution of logic. Only macros can be used when defining run-time interface parameters.
Macros may be used in any expression field, but the macro may only contain an expression (i.e.,
Entries(LOC1), U(5,1)). When a macro is used in a logic field, the macro may include any logic
element valid in that logic field. Subroutines may also be used in an expression field provided that
the RETURN statement is used to return a value to the expression field. When a subroutine is used
to represent one or more logic statements, the subroutine may only include statements valid for the
particular context.
(BRANCH: IT)
Ans.
Q.2 Draw block diagram of 8259 Programmable Interrupt Control and explain function of various
block?
Ans.
(BRANCH: IT)
(BRANCH: IT)
(BRANCH: IT)
(BRANCH: IT)
Q.3 Write a Program that will display FF and 11 repeatedly on the seven segment display. Write a
‘delay’ subroutine and Call it as necessary.
Ans. C000:
LXISP FFFF
C003: MVIA FF
C005: OUT 00
C007: CALL 14 20
C00A: MVIA 11
C00C: OUT 00
C00E: CALL 14 20
C011: JMP 03 C0
DELAY: C014: MVIB FF
C016: MVIC FF
(BRANCH: IT)
C018: DCR C
C019: JNZ 18 C0
C01C: DCR B
C01D: JNZ 16 C0
C020: RET
Q.4 Examine the delay for the given program?
Ans.
(BRANCH: IT)
Unit 4:
(BRANCH: IT)
Q1. Write a program to provide the given on/off time to three traffic lights (Green, Yellow and
Red) and two pedestrian signs (WALK and DON’T WALK). The signal lights and signs are turned
on/off by the data bits of an output port as shown below:
1. Green D0 15 Seconds
2. Yellow D2 5 Seconds
(BRANCH: IT)
3. Red D4 20 Seconds
4. WALK D6 15 Seconds
The traffic and pedestrian flow are in the same direction: the pedestrian should cross the road
when the Green light is on.
Answer
(BRANCH: IT)
(BRANCH: IT)
(BRANCH: IT)
Q2. A BCD number between 0 and 99 is stored in an R/W memory location called the INBUF. Write
a main program and a conversion subroutine (BCDBIN) to convert the BCD number into its
equivalent binary number. Store the result in a memory location defined ad OUTBUF.
Ans
(BRANCH: IT)
(BRANCH: IT)
Unit 5:
Short Answers:(2 Marks Each)
Q1. What is difference between 8253 and 8254?
Ans.
Ans. Difference b/w Memory Mapped I/O and Peripheral Mapped I/O are given below.
(BRANCH: IT)
Ans
(BRANCH: IT)
Q1. Explain various programming modes of 8279 keyboard and display controller.
(BRANCH: IT)
Ans.
(BRANCH: IT)
Q. 2 Explain the control word of 8254 PPI with example. Also explain the operation mode of
8254 with diagram?
Ans.
(BRANCH: IT)
Q3. Interface the keyboard with seven segment LED using 8255?
Ans.
(BRANCH: IT)
(BRANCH: IT)
(BRANCH: IT)
Q.4 Write instruction to generate a 1kHz square wave from counter1 . Assume the gate of the
counter 1 is tied to +5V through a 10K register. Explain its significance of connecting the gate
to +5V.
Ans.
(BRANCH: IT)
Ans
(BRANCH: IT)
(BRANCH: IT)
(BRANCH: IT)
(BRANCH: IT)
Q4. Explain RST instruction, also make the circuit diagram for RST 5
Answer:’
(BRANCH: IT)
(BRANCH: IT)
(BRANCH: IT)
Q5. Assume the accumulator contents are AAH and CY=0. Illustrate the accumulator contents
after the execution of RLC instruction and RAL instruction twice.
Answer 4,5
(BRANCH: IT)
(BRANCH: IT)
(BRANCH: IT)
(BRANCH: IT)