Microcontroller Question Bank
Microcontroller Question Bank
BEE403
Semester & Division: V Course Coordinator: Prof. Manjula S. Biradar TIE SIMP
Module 1
Q. Questions CO RBT MARKS
NO.
1. With a neat diagram explain the internal architecture of 8051. 1 2 10
2. Compare microprocessor and microcontroller. 1 1 6
3. What is microcontroller? List out the differences between CISC 1 2 6
and RISC.
4. Explain any five addressing modes of 8051with examples for 1 2 10
each.
5. Discuss the need for stack memory in microcontroller. How 1 2 6
stack is operated in 8051 microcontroller? What is the default
location of stack?
6. Explain the bit pattern of program status word (PSW). 1 2 6
7. With a neat diagram, explain the steps to interface 8k bytes of 1 2 6
program RAM and 6k bytes of ROM to 8031 based system.
8. Calculate the status of carry, auxiliary carry and parity flags after 1 1 5
the addition of i)55H and 52H ii)91H and 92H. What is the
hexadecimal sum in each case?
9. What is memory address decoding? Explain the steps in 1 4 10
interfacing memory chips to microcontroller. Develop the
interfacing circuit to connect 4kx8memory IC using logic gates
as decoder. Assume the memory address from 3000H to
3FFFH.
Module 2
10. What do you understand by assembler directives? Explain the 2 2 8
following assembler directives i)ORG ii)END iii)EQU
11. Briefly explain the steps involved to assemble and run an 8051 2 2 8
program.
12. Explain the following instructions with example i) DIV AB ii) 2 2 8
SWAP A iii)RRC A iv)XCHD A,@Rp
13. Write an ALP to find the value of P= N!/R!. Using a subroutine 2 3 8
which finds the value of factorial of a given number. The values
of N and R are stored in locations 30H and 31H. Store Pin
31H.
14. Write a program to find the square root of a given number. 2 2 6
15. With a neat diagram explain the range of JUMP and CALL 2 2 8
instructions.
16. Explain the following instructions i)DA A ii)ANL C,P2.5 2 2 2
17. Assume that register “A” is loaded with number ‘N’ (any integer 2 2 5
value from 0 to 255). Write a program to count the number of
ones in even numbered bits of accumulator.
18. Write a program to complement the contents of accumulator 2 2 5
62500 times.
19. Write a program to multiply 35 by 10 using repeated addition. 2 2 5
Save the result in R6. Neglect carry.
20. Explain the working of port 0 as input port. State its dual role. 2 2 5
21. Calculate the delay for the following program. Assume clock 2 3 2
frequency as 11.0592MHz.
Machine cycle
MOV R3,#255 1
GO: NOP 1
NOP 1
DJNZ R3, GO 2
RET 1
22. Explain the working of overflow flag. After the addition of +45 2 3 5
with -04, what is the status of overflow flag and what is the
sum according to microcontroller?
Module 3
23. Explain the various data types in 8051C. 3 2 8
24. Assume XTAL=11.0592MHz. What value do we need to load 2 3 8
into the timers registers if we want to have a time delay of
5ms? Write an ALP for timer 0 to create a pulse width of 5ms
on P2.3
25. Write an 8051C program to find the checksum byte of data 3 3 10
stream 30H,4AH, 65H and 10H.Convert the binary value of
checksum into decimal and display the value of the BCD digits
on ports P0, P1 and P2.
26. Assume that a 1Hz external clock is being fed into T0(P3.4) 3 3 6
Write a C program for counter 0 in mode 1 to count the pulses
and display the TH0 and TL0 registers on P2 and P1
respectively.
27. Write a 8051C program to create a square wave of 100Hz with 3 3 8
a duty cycle of 80% on port 1.1. Use timer 0 and operate that
timer 0 in mode 1. Assume XTAL fmov=12MHz.
28. A switch is connected to pin P1.2. Write a 8051 C program to 3 4 8
monitor SW and create the following frequencies on pin P1.7
SW=0; 500Hz
SW=1; 750Hz
Use timer 0 mode 1 for both of them. Assume crystal
frequency=11.0592MHz.
29. Write an 8051 C program to toggle bit P1.5 ON and OFF 50000 3 3 3
times.
30. Write a program for counter 1 in mode 2 to count the clock 3 3 5
pulse and display the state of TL count on P2.
31. State and explain the advantages of using C program for 8051 3 2 5
microcontroller.
32. Explain the differences between sbit, bit and sfr declarations. 2 2 5