0% found this document useful (0 votes)
25 views8 pages

MPMC K2

Uploaded by

rahulnakka74
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views8 pages

MPMC K2

Uploaded by

rahulnakka74
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Continuous Assessment Question Paper

PART A (5 X 2= 10 Marks) (Answer all the questions)


RBT
No. Question (s) Level
COs

1 Recall the significance of Bank 1 of RAM in 8051 and mention its address range.

---1M
Bank1 is used as a stack memory -----------------1M
2 State the significance of RI flag of SCON register.

3 Define DAC.

4 Recall the number of address pins available in 8051 microcontroller to interface external memory.

5 State the function of relay.

PART B (3 X 10= 30 Marks) Answer THREE questions

No Questions (6 to 11) RBT Level COs Marks


Explain the RAM structure of 8051 microcontroller. Understand CO4 5M
6 A
-------------------------------- 3M
Explanation --------------------------------------------------------------2M

Explain the stack related instructions with an example. Understand CO5 5M

The storing of a CPU register in the


stack is called a PUSH
SP is pointing to the last used location of the stack
As we push data onto the stack, the SP is incremented by one
This is different from many microprocessors
Loading the contents of the stack back into a CPU register is
called a POP
With every pop, the top byte of the stack is copied to the register
specified by the
instruction and the stack pointer is decremented once

OR
Explain any three addressing modes of 8051 microcontroller. Understand CO5 5M

Explanation of any three addressing modes of the following


1. Immediate
a 2. Register
7 3. Direct
4. Register indirect

Indexed
Understand CO6 5M
b Explain UART.
UART (universal asynchronous Receiver transmitter)
Explanation about the registers associated with UART
Serial Communication Modes, etc…

Represent the structure of TMOD and IP registers and explain the significance of 10M
each bit.

88
---5M
IP (Interrupt Priority) Register:
We can change the priority levels of the interrupts by changing the corresponding
bit in the Interrupt Priority (IP) register as shown in the following figure.
A low priority interrupt can only be interrupted by the high priority interrupt, but
not interrupted by another low priority interrupt.
If two interrupts of different priority levels are received simultaneously, the
request of higher priority level is served.
If the requests of the same priority levels are received simultaneously, then the
internal polling sequence determines which request is to be serviced.

------5M
OR
Develop the software of 8051 microcontroller to implement the toggling of LED 10M
connected at pin number P1.0 of 8051 microcontroller. Make sure LED is on for
more time and off for less time. Assume timer1 in mode1 to provide a delay.
Ans:

ORG 0000H
9 REPEAT:
SETB P1.0
LCALL DELAY10SEC
CLR P1.0
LCALL DELAY5SEC
SJMP REPEAT -----------4M
ORG 0030H
DELAY10SEC: MOV TMOD,#50H
MOV R0,#200D
L1: MOV TH1,#4BH
MOV TL1,#0FDH
SETB TR1
B1: JNB TF1,B1
CLR TR1
CLR TF1
DJNZ R0,L1
RET -----------3M

ORG 0050H
DELAY5SEC:MOV TMOD,#50H
MOV R0,#100D
L2: MOV TH1,#4BH
MOV TL1,#0FDH
SETB TR1
B2: JNB TF1,B2
CLR TR1
CLR TF1
DJNZ R0,L2
RET -----------3M

10 Interface LCD with 8051 microcontroller and write an assembly Apply CO6 10M
language program to display “WELCOME TO CSE” from 1st row
and 1st column.

------------------ 2M

ORG 0000H
LCALL COMANDWR1
LCALL DATAWR1
HERE:SJMP HERE

ORG 0020H
COMANDWR1: MOV DPTR,#COMMANDWORD1
REP1: CLR A
MOVC A,@A+DPTR
JZ LAST1
MOV P3,A
CLR P2.0
CLR P2.1
SETB P2.2
LCALL DELAY
CLR P2.2
INC DPTR
SJMP REP1
LAST1:RET

ORG 0050H
DATAWR1: MOV DPTR,#DATAWORD1
REP2: CLR A
MOVC A,@A+DPTR
JZ LAST2
MOV P3,A
SETB P2.0
CLR P2.1
SETB P2.2
LCALL DELAY
CLR P2.2
INC DPTR
SJMP REP2
LAST2:RET -----------6M

ORG 00E0H
COMMANDWORD1:DB 38H,0FH,80H,00H

ORG 00F0H
DATAWORD1:DB WELCOME TO CSE,00H
ORG 0130H
DELAY:MOV R1,#255D
B1:DJNZ R1,B1
RET
END -----------2M

OR
Interface a 3×3 keypad and seven segment display with 8051 Apply CO6 10M
microcontroller and write an assembly language program to
display the value of pressed key on seven segment display.
Assume port 0 is connected to seven segment display.

11

---------2M

ORG 0000H
REP:LCALL DELAY
MOV P2,#00H ; 7-segment display off
MOV P1,#00H
SCAN:
JNB P0.0,COL_1 ;if key in col.1 is pressed then go to label
COL_1
JNB P0.1,COL_2 ;if key in col.2 is pressed then go to label
COL_2
JNB P0.2,COL_3 ;if key in col.3 is pressed then go to label
COL_3
SJMP SCAN ; if no key is pressed then go to label SCAN

COL_1:
MOV P1,#11111110B
JNB P0.0,ONE
MOV P1,#11111101B
JNB P0.0,FOUR
MOV P1,#11111011B
JNB P0.0,SEVEN
COL_2:
MOV P1,#11111110B
JNB P0.1,TWO
MOV P1,#11111101B
JNB P0.1,FIVE
MOV P1,#11111011B
JNB P0.1,EIGHT
COL_3:
MOV P1,#11111110B
JNB P0.2,THREE
MOV P1,#11111101B
JNB P0.2,SIX
MOV P1,#11111011B
JNB P0.2,NINE
ONE:MOV P2, #06H ;Control word to display 1
SJMP REP
TWO:MOV P2,#5BH ;Control word to display 2
SJMP REP
THREE:MOV P2,#4FH ;Control word to display 3
SJMP REP
FOUR:MOV P2,#66H ;Control word to display 4
SJMP REP
FIVE:MOV P2,#6DH ;Control word to display 5
SJMP REP
SIX:MOV P2,#7DH ;Control word to display 6
SJMP REP
SEVEN:MOV P2,#07H ;Control word to display 7
SJMP REP
EIGHT:MOV P2,#7FH ;Control word to display 8
SJMP REP
NINE:MOV P2,#67H ;Control word to display 9
SJMP REP -----------6M

ORG 0100h
DELAY:MOV TMOD,#20H
MOV TH1,#00H
MOV TL1,#00H
SETB TR1
B1:JNB TF1,B1
CLR TF1
RET
END -----------2M

You might also like