0% found this document useful (0 votes)
59 views

Microcontroller Question Bank

Microcontroller question bank VTU
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Microcontroller Question Bank

Microcontroller question bank VTU
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Course Code: Course: Microcontrollers

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

33. Write 8051 C program to convert ASCII digits 9 and 2 to 3 3 5


packed BCD and display it on port P2.
34. Explain the bit status of TMOD register. 3 2 5
35. Explain the characteristics and operations of mode 2 program 3 2 5
in 8051 timer.
36. Write an assembly program to generate square wave with ON 3 3 10
time=5ms and OFF time=20ms on all pins of port 1. Use timer
0 in mode 1. Assume crystal frequency =11.0592MHz.
Calculate the duty cycle. Explain TH0, TL0 and TMOD
calculations.
Module 4
37. What is serial data communication? Explain the significance of 4 2 6
SCON register in detail.
38. Write an ALP to transfer letter “A” serially at 4800 baud 4 2 6
continuously.
39. Write the steps to transfer the data serially. 4 1 4
40. Explain the different interrupts of 8051 indicating their vector 4 2 6
addresses.
41. Write a C program that continuously gets a single bit of data 4 3 10
from P1.7 and sends it to P1.0 while simultaneously creating a
square wave of 200µs period on pin P2.5. Use timer 0 to create
the square wave. Assume that XTAL=11.0592MHz.
42. Write a program to retrieve the data serially and put them in 4 3 6
P1. Set the baud rate at 4800, 8bit data and one stop bit.
43. Write an 8051 C program to transfer the message “INDIA” 4 3 6
serially at 9600 baud rate, 8 bit data and one stop bit
continuously.
44. Explain the importance of T1 and R1 flags. 4 2 4
45. What is an interrupt? List the various interrupts of the 8051 4 2 6
with their corresponding vector address.
46. Write a program that continuously gets 8 bit data from P0 and 4 3 7
sends it to P1 where simultaneously creating a square wave of
200µs period on pin P2.1. Use timer 0 to create square wave.
Assume XTAL=11.0592MHz.
47. Explain simplex, half duplex and full duplex serial data 4 2 3
transfer.
48. Explain the bit status of SCON register. With 4 3 10
XTAL=11.0592MHz, calculate the TH1 value needed for the
baud rates (i)9600 (ii)2400
49. Compare interrupts versus polling methods in 8051 interrupts. 4 2 5
50. Explain the 6 interrupts in 8051. Also state its ROM location. 4 2 5
51. Write an assembly program to get data continuously from port 4 3 6
0 and send it to port P1 while simultaneously creating a
square wave of 200µs period on P2.1. Use timer 0 to create
square wave. Assume XTAL=11.0592MHz. Explain IE, TMOD,
TH0 calculations.
Module 5

52. Write an ALP to rotate the stepper motor 5 steps in clockwise 5 3 10


direction and 10 steps in anticlockwise direction with a delay
between each step.
53. Explain with a diagram the interfacing of DAC 0808 to 8051 5 2 6
chip
54. Interface an LCD display to 8051 and write an 8051 C program 5 3 10
to send letters “M”, “D” and “L” to the LCD using delays.
55. With a block schematic explain the features of 8255 PI chip. 5 2 6
56. A switch is connected to pin P2.7. Write a C program to 5 3 10
monitor the status of SW and perform the following:
i) If SW=0 the stepper motor moves clockwise
ii) If SW=1 the stepper motor moves counter clockwise
57. Explain the control word format of 8255. 5 2 6
58. Explain the various modes of 8255 and find the control word 5 2 8
for following configuration: i) All ports of A,B and C are output
ports(mode 0) ii)PA=IN, PB=OUT and PCH=OUT
59. State advantages of LCD over multi segment LEDs. Explain the 5 2 10
architecture and working of 14 pin LCD. Draw its schematic
diagram.
60. Explain the interfacing circuit of DAC to 8051 microcontroller. 5 2 5
If Iref=2mA, calculate the DAC output if all the inputs to DAC
are high.
61. Explain the construction and working of stepper motor. Also 5 2 10
explain 2 phase stepping sequence, step angle and steps per
revolution.
62. Explain the control word format of 8255 IC. What is the 5 2 5
control word for all the ports as output ports?
63. Explain the principle of opto isolator and its purpose in 5 2 5
interfacing to 8051 microcontroller.

You might also like