FirstRanker Logo

FirstRanker.com - FirstRanker's Choice is a hub of Question Papers & Study Materials for B-Tech, B.E, M-Tech, MCA, M.Sc, MBBS, BDS, MBA, B.Sc, Degree, B.Sc Nursing, B-Pharmacy, D-Pharmacy, MD, Medical, Dental, Engineering students. All services of FirstRanker.com are FREE

📱

Get the MBBS Question Bank Android App

Access previous years' papers, solved question papers, notes, and more on the go!

Install From Play Store

Download GTU B.Tech 2020 Winter 5th Sem 2151001 Microcontroller And Interfacing (Ec) Question Paper

Download GTU (Gujarat Technological University Ahmedabad) B.Tech/BE (Bachelor of Technology/ Bachelor of Engineering) 2020 Winter 5th Sem 2151001 Microcontroller And Interfacing (Ec) Previous Question Paper

This post was last modified on 04 March 2021

GTU B.Tech 2020 Winter Question Papers || Gujarat Technological University


FirstRanker.com

Subject Code:2151001

GUJARAT TECHNOLOGICAL UNIVERSITY

--- Content provided by‌ FirstRanker.com ---

BE- SEMESTER-V (NEW) EXAMINATION — WINTER 2020

Subject Name:Microcontroller and Interfacing (EC)

Date:20/01/2021

Time:10:30 AM TO 12:30 PM

Total Marks: 56

--- Content provided by‍ FirstRanker.com ---

Instructions:

  1. Attempt any FOUR questions out of EIGHT questions.
  2. Make suitable assumptions wherever necessary.
  3. Figures to the right indicate full marks.

Q.1

--- Content provided by‌ FirstRanker.com ---

  1. (a) Compare microcontroller and microprocessor. Justify the statement “Microcontroller is single chip solution”. MARKS 03
  2. (b) List general purpose registers available to programmers and flags of status register. What is difference between overflow flag and carry flag? In which situation overflow flag and carry flag will set? MARKS 04
  3. (c) Explain following assembly language instructions with at least one example for each instruction: (1) LDS (2) STS (3) LDI (4) OUT (5) SBI (6) SBR (7) CLC MARKS 07

Q.2

  1. (a) What will be content of register R16 after executing following instructions? MARKS 03
      LDI R16, 0xAA LSL R16 SBR R16,3  
  2. --- Content provided by‌ FirstRanker.com ---

  3. (b) Microcontroller product designer decided to interface 8 push-button switches with Port C, 2 digital sensors with PA0 and PA1 pins, 8 LEDs with Port D, 4 Relays with PA2 to PA5, Buzzer with PA6 and PIR sensor with PA7. Write assembly language instructions to initialize port pins to set direction as per above hardware requirements. MARKS 04
  4. (c) What is interrupt? What are the external interrupts available in AVR microcontroller? Consider that digital sensor S1 generates external interrupt 0 and digital sensor S2 generates external interrupt 1. Two electrical devices E1 and E2 are controlled by port pin PB6 and PB7. Write C or assembly language program such that when external interrupt 0 is generated by sensor S1, electrical device E1 should turn on by logic 1 at PB6 and electrical device E2 connected at PB7 should turn OFF by logic 0 at PB7. When external interrupt is generated by sensor S2, electrical device E1 should turn OFF and E2 should turn ON. MARKS 07

Q.3

  1. (a) Write C language program to toggle port pin PC6 continuously with highest frequency without using any delay. MARKS 03
  2. (b) What will be status of C,Z,V and H flag after execution of following instructions .. MARKS 04
      LDI R16,0xB6 LDI R17,0x4A ADD R17,R18  
  3. --- Content provided by​ FirstRanker.com ---

  4. (c) Draw interfacing diagram to interface common anode seven-segment display with Port D and 8 push button switches (SW0 to SW7) with Port A of AVR microcontroller. Consider that this circuit is used in elevator (lift) of 8 storied building to display floor number. When elevator reach to first floor program to display pressed switch number on seven segment display. It should display “0” if SW0 is pressed, “1” if SW1 is pressed and so on up to “7” if SW7 is pressed. MARKS 07

Q.4

  1. (a) Write assembly language program to read data from PORT A and PORT B. Perform addition of these data and store answer at memory location 0x0AF9 MARKS 03
  2. (b) Push-button switch S is connected to port pin PA7 in such a way that when switch S is pressed, pin PA7 is at logic “0” and when switch S is not pressed pin PA7 is at logic “1”. Buzzer is connected to port pin PC5 with help of NPN transistor driver circuit. Write assembly language program as per following requirements. “When push-button switch S is pressed, buzzer should sound and when push-button switch S is released, buzzer sound should stop”. Use unconditional loop to run this program continuously to check status of the switch S and perform above task in infinite loop. MARKS 04
  3. (c) Write C or assembly language program for object counter. Display count value on output device connected with port A (send hexadecimal count value on port A). Optical sensor is connected to port pin PD2 to sense the object. MARKS 07
  4. --- Content provided by FirstRanker.com ---

Q.5

  1. (a) Write assembly language program to toggle port pin PD7 200 times using conditional branching instruction. MARKS 03
  2. (b) Write assembly language instructions for the following task: Read data from port A and store it in register R16, compare it with 0x7F. If data in register R16 is greater than 0x7F, set port pin PD0 else clear port pin PD0. Use unconditional loop to do above task continuously. MARKS 04
  3. (c) Draw and explain interfacing diagram of LCD with AVR Microcontroller. Use Port A to connect data lines, RS with PC0, RW with PC1 and Enable with PC2. Write Assembly or C language program to display Message “WELCOME TO GTU” on the first line and ‘Outcome based Education” on second line of LCD. MARKS 07

Q.6

--- Content provided by⁠ FirstRanker.com ---

  1. (a) Explain any three assembler directives. MARKS 03
  2. (b) Which protocol allows to connect 120 devices with AVR microcontroller using only 2 pins of AVR microcontroller? What is name of these 2 pins which allows multiple device interfacing. MARKS 04
  3. (c) Explain ADCSRA register of AVR microcontroller for ADC programming. Write assembly or C language program to read analog signal using channel 0 (ADC0) of AVR microcontroller. Display equivalent digital data on PORTC and PORTD. MARKS 07

Q.7

  1. (a) Write any six features of AVR microcontroller. MARKS 03
  2. --- Content provided by FirstRanker.com ---

  3. (b) For 10 bit ADC of AVR microcontroller, Vref=2.56V.Calculate D0-D9 output if analog input value is 0.25 volt. What will be resolution of ADC? MARKS 04
  4. (c) DC Motor is interfaced to port pins PC0 to PC2 of AVR microcontroller using DC motor driver IC LM293D. PC0 is connected to I1, PC1 is connected to I2 and PC2 is connected to Enable terminal (E1) of LM293D. Draw interfacing diagram and write C or assembly language program to operate DC motor in clockwise direction for 5 seconds, stop for 2 seconds, anti-clockwise direction for 5 seconds continuously in infinite loop. MARKS 07

Q.8

  1. (a) What will be content of PORTC after executing following C Programming instructions? MARKS 03
      PORTC=0x00; PORTC=PORTC | (1<<2);  
  2. (b) 8 bit DAC is connected to port B of AVR microcontroller. Write assembly or C language program to generate stair-step ramp output from DAC. MARKS 04
  3. --- Content provided by‌ FirstRanker.com ---

  4. (c) Stepper motor is controlled by four port pins PB0 to PB3 in uni-polar mode. Switch S1 is connected to port pin PD2(External interrupt 0) pin. Switch S2 is connected to port pin PD3(External interrupt 1) pin. Write assembly or C language program to rotate motor clockwise if switch S1 is pressed and anti-clockwise of switch S2 is pressed in full step mode. Draw interfacing diagram and write assembly or C language program. MARKS 07

FirstRanker.com



--- Content provided by‌ FirstRanker.com ---

This download link is referred from the post: GTU B.Tech 2020 Winter Question Papers || Gujarat Technological University