Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Roll Number:

Thapar Institute of Engineering & Technology (DU), Patiala


Department of Electrical and Instrumentation Engineering
MST
B. E. (Third Year): Semester-VI Course Code: UEI609
(2018/19) Course Name: Fundamentals of Microprocessors and
Microcontrollers
March 12, 2019 Wednesday, 13.00 — 15.00 Hrs
Time: 2 Hours, M. Marks: 25 Name of Faculty: Dr. NJ Singh, Dr. MI Singh, Dr. T Pal
Note: All the questions are compulsory and attempt the questions strictly in a serial order.
The solution of a question should be at one place. Assume missing data if any. All the
questions are related to MCS-51 family. Assume 11.0592 MHz crystal oscillator
Q1 Explain the RAM architecture of 8051 with a suitable block diagram. Explain with the [5]
help of an example, the method to assess different register banks.
Q2 Explain the different addressing modes of 8051 along with suitable examples. [5]
Q3 Three DIP switches connected to port pins P0.0, P0.1 and P0.2 respectively control [7]
the turning on/off of LEDs' connected to Port 2. If all the three switches are 0, no
LED is turned on. However, if the first switch is turned ON (i.e. 1) then the first LED
gets turned on and if DIP switch 0 and 1 are in ON state then LED 3 is turned ON.
Write a program to realize the logic shown below. Note that the switches are to be
monitored continuously.
DIP2 DIPI DIPO LED No.
0 0 0 All LEDs in
OFF State
0 0 1 Only LED1 is
ON
0 1 0 Only LED2 is
ON
0 1 1 Only LED3 is
ON
1 0 0 Only LED4 is
ON
I 0 1 Only LEDS is
ON
1 1 0 Only LED6 is
ON
I 1 1 Only LED7 is
ON

Page 1 of 2
Q4 The following program was written to perform addition of two 16 bit numbers stored [4]
in memory locations 20H, 21H and 30H, 31H respectively. The results of the addition
are to be stored in memory location 40H, 41H and 42 H.
ORG 0000H
MOV 08H,#40H
MOV RO,#20H
MOV RI,#30H
BACK:MOV R3,#3
MOV A,@ OOH
ADDC A,@ R1
INC RO
INC R I
SETB RS.X
MOV @RO,A
INC RO
DJNZ R3, BACK
END

However, the given program contains en-


ors due to wrong instructions, missing
instructions and wrong labelling. Correct the program.
Q5 Illustrate the effect of execution of the following instructions
[4]
a) DJNZ 40H, LABEL
b) MUL AB
c). MOVC A,@A+DPTR
d) CJNE @Rn, #05H, Ll

Students can see their evaluated sheets on 18-03-2019 at 9.00 AM

Page 2 of 2

You might also like