GTU Previous exam papers Microcontroller and Interfacing
GTU Previous exam papers
GUJARAT TECHNOLOGICAL UNIVERSITY
B. E. Sem. – V – Examination – June- 2011
Subject code: 151001
Subject Name: Microcontroller & Interfacing
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
Q.1 (a) What are the interrupts available in the 8051 microcontroller?
Explain interrupt enable (IE) SFR and Interrupt priority (IP) SFR.
(b) Explain operation of timer in mode 1. Discuss programming steps to generate time delay using mode 1. Write program to generate delay of 0.1 second using timer 0 in mode 1.
Q.2 (a) Explain basic architecture of 8051 microcontroller. Discuss RAM structure.
(b) Explain pin configuration with circuit diagram for port 0 and port 1
(b) Draw and explain RESET and clock circuit of 8051 microcontroller.
What is the purpose of capacitor in RESET circuit?
Q.3 (a) Answer the following questions
 What is the purpose of EA pin in 8051 microcontroller?
 What is the purpose of EA bit in IE SFR?
 What is the function of ALE signal?
 Why pull-up resistors are necessary with port P0 in
 What is the function of SMOD bit in TCON SFR?
 What is the function of GATE bit in TMOD SFR?
 Write instruction to select register bank 2.
(b) Explain following instructions
 SWAP A  ADD A,B  DIV AB  MUL AB
 RL A  XCHD A,R0  MOV A,@R0
Q.3 (a) Write program to generate square wave on port pin P2.0 with frequency of 10 KHz and duty cycle 50%. Use timer interrupt. Use timer 0 in mode 2. Assume crystal frequency 12 MHz.
(b) Draw interfacing diagram to interface push-button switch at port pin
P3.3 and relay with transistor circuit at port pin P2.0. Write program such that when push-button key is pressed, relay should become ON. When push-button key is pressed again relay should become OFF (i.e. toggling of relay by push-button switch).
Q.4 (a) Explain interfacing of analog to digital converter (ADC) with microcontroller. Write program to read analog value from ADC on port P1 and display digital values on LEDs connected at port P0
(b) Draw and explain interfacing of 4×4 matrix keyboard with 8051 microcontroller. Write program to read switch.
Q.4 (a) Explain interfacing of stepper motor with microcontroller. Write program to rotate stepper motor in clockwise direction continuously in full step mode.
(b) Draw interfacing diagram of DAC with 8051 microcontroller. Write program to generate sinewave at the output of DAC. Use lookup table to store hex values.
Q.5 (a) Discuss interfacing of the LCD with 8051 microcontroller. Draw interfacing diagram. Write program to display message “GTU IS BEST” on the LCD screen.
(b) Draw interfacing diagram for interfacing of common anode seven segment displays with 8051 microcontroller. Write program to display digit 0 to 9 at the interval of approximately 1 second (Consider crystal frequency 12 MHz)
Q.5 (a) Discuss RTC interfacing with microcontroller. Write program to get values of hour, minute and second from RTC to RAM location 20h,21h and 22h respectively.
(b) Discuss interfacing of external 32K EPROM and 32K RAM with the microcontroller.