0% found this document useful (0 votes)
169 views6 pages

Ece3003 - MC Cat-1 QP Am - Ans

The document is a continuous assessment test for a microcontrollers course. It contains 5 questions testing students' knowledge of microprocessors vs microcontrollers, 8051 architecture, assembly language programming, and application of microcontrollers. The test has a total of 50 marks and covers topics like I/O ports, flags, logical operations, averaging data, and checking for odd/even numbers. Students are required to write assembly code, draw diagrams, and explain concepts to solve problems related to 8051 microcontrollers.

Uploaded by

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

Ece3003 - MC Cat-1 QP Am - Ans

The document is a continuous assessment test for a microcontrollers course. It contains 5 questions testing students' knowledge of microprocessors vs microcontrollers, 8051 architecture, assembly language programming, and application of microcontrollers. The test has a total of 50 marks and covers topics like I/O ports, flags, logical operations, averaging data, and checking for odd/even numbers. Students are required to write assembly code, draw diagrams, and explain concepts to solve problems related to 8051 microcontrollers.

Uploaded by

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

Reg. No.

Name :

Continuous Assessment Test - I – January 2020


Programme : B.Tech.(ECE) Semester : WS 2019-20

Code : ECE3003

: CH2019205001502,
Course : MICROCONTROLLERS & ITS APPLICATIONS CH2019205001501,
Class Nbr. CH2019205001504,
CH2019205001503,
CH2019205001505
Faculty : Dr. ManojKumar.R, Dr.Jagannath.M, Dr.Berlin :
Hency , Prof.GugaPriya.G & Dr. John Sahaya Rani Slot D1
Alex
Time : 90 Minutes Max. Marks : 50

Answer ALL Questions

Q. Sub. Marks
Question Description
No. Sec.

1. a) Differentiate the microprocessor (8085) and microcontroller(8051) with respect to [5]


architecture, processing power, design, power requirement and cost?
Answer:
[5]

Parameters µP µC

Architecture Von-Neumann and CISC Harvard and RISC


architecture architectures.

Processing Power High Low

Design Time More Less

Power High Low

Protection Less More

Cost High Low

Page 1 of 2`
b) What would you choose, a microprocessor or a microcontroller for the below application
based on the answer in
1. Indoor climate control equipment – microcontroller, justification should be given
based on 1 a
2. Supply chain management – microprocessor, justification should be given based on
on 1 a

2. a) For a particular application, an internal ROM insufficient, So an external ROM is of 32k is [5]
connected to 8051. Mention all the 8051 pins associated for this connection with a neat
diagram?
Answer: [5]
• EA,PSEN, ALE, RD to be used
• Draw the pin diagram of 8051

Page 2 of 2`
Discuss about the program status word and flag bits in 8051. Show the impact of addition
b) operation on program status word after the addition of 37H and 2EH.
Answer:

MOV A, #37H
PSW: 0x01
ADD A, #2EH
PSW: 0x40

3. a) Assume the RAM location 20h contains a data of 5Fh and in the below assembly code 03h [5]
and 34h refers to bit addressable locations.
What will be result, after each statement execution?
MOV c, 03h
MOV A, #3Eh
MOV 34h, ACC.7
Answer: [5]

20h contains 5Fh 0101 1111 

07h 0 1 0 1 03h 1 02h 1 01h 1 00h 1

C1
A 3Eh  0011 1110

34h 0 33h 32h 31h 30h

Page 3 of 2`
b) A microcontroller runs with a crystal frequency of 20 Mhz. Calculate the time taken for the
execution of multiplication instruction given below. The machine cycle for the respective
instruction is given along side

MUL AB ; 4MC
DEC r2 ;1MC
SJMP label ;2MC

Answer:
20MHz:
20MHz/12 = 1.66 MHz
Machine Cycle = 1/1.66 MHz = 0.60us [us=microsecond]
For ()
MUL AB ; 4MC = 4X 0.6us = 2.4us
DEC r2 ;1MC = 1X 0.6us = 0.6 us
SJMP label ;2MC = 2X0.6us = 1.2 us

Total = 4.2us
4. a) What are the contents of the A and B registers after execution of the following instructions? [5]
MOV 0F0H,#12H
MOV R0,#0F0H
MOV A,#34H
XCH A,0F0H
XCHD A,@R0
Answer:
A =14H
[5]
B = 32H

b) Figure 1 depicts the logical operations to be performed using distinctive shapes. Write an 8051
ASM program and store the result in the memory location 80H.

Figure 1.
Answer:

MOV A, #37H
XRL A, #0A1h

Page 4 of 2`
MOV 80H, A

OR

MOV A, #37H
MOV R6, A
CPL A
MOV R1, A
MOV A,#0A1H
MOV R7, A
CPL A
MOV R2,A
CPL A
ANL A,R1
MOV R3, A
MOV A, R6
ANL A, R2
ORL A, R3
MOV 80H, A

5. a) Write an 8051 ASM program which checks whether the ten numbers stored from external [5]
RAM memory address 2000h are odd/even. The program should store accordingly 00H/FFH
from internal location 30H onwards.

Answer: [5]
MOV R0, #30H

MOV R7, #10

MOV DPTR, #2000H

AGAIN: MOVX A, @DPTR

RRC A

JC ODD_NO

MOV @R0, #0FFH

Page 5 of 2`
SJMP NEXT

ODD_NO: MOV@R0, #00H

NEXT: INC R0

INC DPTR

DJNZ R7, AGAIN


b)

In an auto irrigation system, daily recorded soil moisture (R) for 10 times a day is available in
RAM memory location starting from 40H. Write an 8051 assembly language program
compute the average soil moisture for a day(M) . (Sum may be assumed to be less than FFH).
If the average value is M is less than moisture content 60, then write FFh in 60H location.
Answer:
Mov R0 ,#10
MOV R1,#40h
Mov A, @R1
Loop: INC R1
ADDC A, @R1
DJNZ R0,loop
Mov b, #10
DIV AB
CJNE A, #60
JNC loop1
MOV A,FFh
MOV 60, A
loop1: sjmp loop1

Total [50]



Page 6 of 2`

You might also like