Professional Documents
Culture Documents
com
~ 1~~~
<."
-:~ifth Semester B.E. Degree Examination, Dec.2017/Jan.201SO ')
r,r :'\
-y. 8051 Microcontroller r -..,.:"i
~ , Ji
m
Time: 3 hrs. ' \ . \ Max.,lvlarks: 80
co
/ . ~
I. \ Module-l \", ?)
1 a. Compare and c6nh:fstr~icroprocessors and microcontrollers. /:.,I.~:'~.) (04 Marks)
b. What does the terrKEmbedded system mean? \,", } (02 Marks)
g.
c. Describe the hardwm"6 features of8051 microcontrollers, with.a 'neat internal block diagram,
<: >.-';,
, "-/'(\,
. --::%/'
N/ \:/ (10 Marks)
c-; J
~I",
-,,:- OR (r
lo
2 a. Briefly discuss the uses oh\{ir ~nd PSW registers.., ' (06 Marks)
b. Show how to interface external fROM and external RM1to 8051. Explain how 8051 access
' ,vr~
them, r» / l, ""N' (10 Marks)
3 a.
Morlule-2~
ib
Explain any 4 data addressing modes of pOS1 with Ian example for each mode.
::--.0)
(06 Marks)
ik
b. Show the status ofCY, AC and P flags after eXecution offollowing instructions
MOY A, # 9 C H
d':)D A, # 64ft (04 Marks)
w
c. Write a program to copy the value 55H into RAM location 40H to 45H using
i) Direct addressing, without using loop.
ii) Register indirect addressing, withOI~tusing loop, ':.:; (06 Marks)
, '/
ia
I c '/ '-Z;7~"
OR I~ I ~ ~-.J .''-,
4 a. Discu~s the three a?dress ran/~~~~at are util.ized ~y jUnlP (~<J'pall instructions. (06 Marks)
ed
b. Explain byte and bit leve~ 1,~cal OR operation with examples .>' (04 Marks)
c. Write an ALP to verify ,wheth'ef the data present in 10cation/lQOOH is odd/even. If odd store
OOHin location 2000H: bt~erwise store EEH in 2000H. ~ (06 Marks)
'S~/(
.p
/ Module-3 ~/ ~
5 a. What are the benefits of
subroutines? (02 Marks)
b. Discuss two instructions used to call subroutines with their ranges and write the significance
of stack with re pect to all instructions.
w
(06 Marks)
c. Ten 8 - bit numbers are stored in RAM locations 40H onwards. Write an ALP to find the
Largest number and store it in memory location 50H. (08 Marks)
,. r../ \
w
, 00 -/
.., 6 a. Write 'an ALP to read switch given in fig.Qota). if switch is closed turn ON the LI\Q ~I.ge
(5
z turrr bJ'l the LED.
w
(O~)Marks)
/~ -rS'v </../
~o
c..
.§ Fig,Q6(a)
\~?
1 of2
15EC563
l'>
aq
b. /6~n
//
8051 system of 11.0592 MHz. Find the time delay for the following subroutine
D laV' MOY R3 , # 250 (06 Marks)
m
Back op
"'J up
J)lb ~ R3 , BACK
co
~T
c. Write an
. At:,f fi d factorial of an 8 - bit number N. Assume value QfN! does not exceed
/ /.- (;,
8 bit. /'/,/ ( ) (06 Marks)
'-'i
\~~
v-;:)
~.
c
g.
(? \. Module-4 ~
7 a. Describe the various i odes of operation of 8051 Timers. (04 Marks)
b. Write an ALP to create/>p lse width of 50ms on P2.3 using TUner '0' operating in Mode 1.
lo
Assume crystal frequem:y#:H.0592 MHz. (06 Marks)
c. Write an ALP to generat £~ 'are wave of frequency 1KHz on P13 using Mode 2. Timer O.
Assume crystal frequency ~ :1zMHz. r (06 Marks)
rate at 4800, 8 bit data and 1 stop bit. Assume XTAL frequency as 11.0592 MHz. (06 Marks)
I ,/
\
"Modtlle-5 j'/ r ./
c. Write a program using interr~p.ts to'get data from Pl.0 ~rid'send it to P2.0, while timer '0' is
generating a square wave of kI-GJ,
on P2.4. Assume XT~.L- frequency as 11.0592 MHz.
Ii,. ./ ' <: (08 Marks)
z..."'II/ -:
e
10 a. A switch is connected to pj'il P2.7 and a stepper motor to port 'k Write a program to monitor
the status as of swirc~in9 and '
If SW = 0, stepper motor should rotate clock wise, continuously.
w
If SW = 1, stepper m tor should rotate anti clock wise, continuously. (08 Marks)
b. Interface ADC 0804' to 8051 and write an ALP to convert the analog input to digital
value. (08 Marks)
w
*****
w
20f2