V Semester B.Tech (Electrical & Electronics Engineering) End Semester Examinations, November 2017
V Semester B.Tech (Electrical & Electronics Engineering) End Semester Examinations, November 2017
V Semester B.Tech (Electrical & Electronics Engineering) End Semester Examinations, November 2017
1A. Describe in detail the internal RAM organization of 8051 microcontroller and explain the
register banks of RAM. (03)
1B. Explain the following as applicable to 8051 instructions.
Direct addressing mode Register addressing Mode
Indirect addressing mode Immediate addressing mode
Use relevant ADD instruction for each of these modes and illustrate with an example. (04)
1C. Show the connection diagram to connect two switches (push button keys) say S1 and S2 to pins
P1.1 and P1.2 of 8051. Connect them in such a way that when switch is open, corresponding
pin must be low and when switch is closed it should be high. Write an 8051 ALP to perform the
following
Keep monitoring pins P1.1 and P1.2.
When S1 is closed, set general purpose flag bit 1 of PCON register.
When S2 is closed, generate a high to low pulse at P 2.3. (03)
2A. Write an 8051 ALP to find the maximum score obtained in a particular course evaluated out of
50marks for a class strength of 40 students. The data is stored in external RAM locations
starting from 2000H onwards. Display the maximum marks scored at port ‘0’. If more than one
student has scored the same (highest) marks, display the count of such students at port ‘1’. (04)
2B. Write a brief note on parallel I/O ports of 8051 microcontroller & describe the alternate
functions of all the pins of port 3. (03)
2C. Calculate the exact time taken for the execution of the following 8051 program if (i) XTAL=
10MHz (ii) XTAL=16MHz.
MOV R0, #0EFH
LOOP1:NOP
NOP
DJNZ R0, LOOP1
MOV R1, #00H
LOOP3:NOP
NOP
MOV R2, #0A0H
LOOP2:NOP
DJNZ R2,LOOP2
DJNZ R1, LOOP3 (03)