0% found this document useful (0 votes)
19 views9 pages

M&mpapers

The document outlines the examination details for the Microprocessor & Microcontroller course at Gujarat Technological University, including instructions, subject codes, and exam dates. It contains a series of questions divided into five sections, covering topics such as microcontroller functions, assembly language programming, and interfacing with various components. Each question specifies the marks allocated and requires students to provide detailed explanations or write programs related to microcontroller operations.

Uploaded by

uttekarharshad85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views9 pages

M&mpapers

The document outlines the examination details for the Microprocessor & Microcontroller course at Gujarat Technological University, including instructions, subject codes, and exam dates. It contains a series of questions divided into five sections, covering topics such as microcontroller functions, assembly language programming, and interfacing with various components. Each question specifies the marks allocated and requires students to provide detailed explanations or write programs related to microcontroller operations.

Uploaded by

uttekarharshad85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Seat No.: ________ Enrolment No.

___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–IV (NEW) EXAMINATION – WINTER 2023
Subject Code:3141008 Date: 06-02-2024
Subject Name: Microprocessor & Microcontroller
Time: 10:30 AM TO 01:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

MARKS

Q.1 (a) What will be value of Program Counter (PC) when we connect power 03
supply pin Vcc to RESET pin in AVR Microcontroller? Draw power
on RESET circuit.
(b) Explain role of microcontroller in Embedded System 04
(c) What is importance of General Purpose Input Output (GPIO) Ports in 07
Microcontroller ? Explain DDR, PIN and PORT registers associated
with GPIO with neat sketches.

Q.2 (a) Explain concept of little endian and bid endian with example 03
(b) Can we use LDS instruction to copy content of I/O register into GPR? 04
What is the difference between IN instruction and LDS instruction?
(c) Consider that Ignition Switch is connected to PD0, Seat belt switch is 07
connected to PD1 Buzzer is connected to PD3 and LED is connected
to PD2. Write C Program for AVR microcontroller such that it turn
on LED and sound buzzer if the key is in the ignition (PD0 closed),
but seat belt is not latched.
OR
(c) Write assembly language program to load byte 0x55 in PORT B and 07
complement it 100000 times with minimum delay.

Q.3 (a) Explain difference between JMP, RJMP and IJMP instructions 03
(b) Explain SBI and CBI instructions with examples 04
(c) What is the importance of stack memory in microcontroller? In which 07
situation stack memory is utilized? Explain stack operations in AVR
microcontroller with example.
OR
Q.3 (a) How to check status of input pin in AVR microcontroller? Explain 03
instructions SBIS and SBIC.
(b) Write assembly language program to keep monitoring port pin PB5, 04
send byte 0x11 to PORT A if PB5 is high and 0x22 to PORT A if
PB5 is low.
(c) How serializing a byte of data done? Write assembly language 07
program to bring byte of data serially via pin PC7 and save it in R20
register. Assume that byte comes in with the LSB first.

Q.4 (a) Write set of instructions to store bit 3 from R16 to T flag and then 03
copy T flag into bit 5 of register R17.
(b) What is importance of look up table in microcontroller? In which 04
situations, look up table is used?

1
(c) Assuming that program ROM space starting 0x600 contains message 07
“ HOPE FOR WORLD PEACE”. Write assembly language program
to send all message characters to PORTB one byte at a time using
look up table method.
OR
Q.4 (a) What will be content of register R16 after execution of following 03
instructions?
CLC
LDI R16,0x11
LSR R16
(b) Write C program to toggle all bits of PORT C continuously at the 04
interval of approximately 1 second.
(c) Explain interfacing of 16x2 LCD with AVR Microcontroller. Write 07
assembly or C language program to display message “ONE
NATION” on the first line and “ONE ELECTION” on second line of
the LCD.

Q.5 (a) Discuss interrupt versus polling method of getting service of 03


microcontroller by device. Which method is efficient?
(b) Explain TCCR0 timer register. What value should be loaded to 04
TCCR0 to program Timer 0 in normal mode with external clock
source (falling edge) on T0 pin.
(c) Draw stepper motor interfacing diagram in unipolar mode using port 07
pins PA0 to PA3. Write C or assembly language program to rotate
stepper motor in full step mode continuously in clockwise direction.
When External interrupt 0 occurs, it should change to anticlockwise
direction.
OR
Q.5 (a) What is importance of monitoring UDRE flag while writing byte into 03
UDR register during serial transmission ?
(b) How timer interrupts are enabled and disabled. Explain TIMSK 04
register of AVR Microcontroller.
(c) Explain steps for enabling external interrupts for AVR 07
microcontroller. Write program to toggle port pin PD3 when external
interrupt 0 occurs.
*************

2
Enrolment No./Seat No_______________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE- SEMESTER–IV (NEW) EXAMINATION – WINTER 2024
Subject Code:3141008 Date:03-12-2024
Subject Name:Microprocessor & Microcontroller
Time:02:30 PM TO 05:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

Marks
Q.1 (a) High light main differences between microprocessor and microcontroller 03
(b) Explain role of microcontroller in embedded systems 04
(c) Explain internal architecture of 8085 Microprocessor. What is the 07
significance of flags in the 8085 microprocessor? Explain any two flags.

Q.2 (a) What is the AVR status register, and what information does it hold? 03
(b) Explain any four bit manipulation instructions in AVR microcontroller with 04
example.
(c) What is importance of General Purpose Input Output (GPIO) Ports in 07
Microcontroller ? Explain DDR, PIN and PORT registers associated with
GPIO with neat sketches.
OR
(c) Consider that Ignition Switch is connected to PD1, Seat belt switch is 07
connected to PD2 Buzzer is connected to PC3 and LED is connected to PC4.
Write C Program for AVR microcontroller such that it turn on LED and
sound buzzer if the key is in the ignition closed(PD1 is at logic 0), but seat
belt is not latched (PD2 is at logic 1).

Q.3 (a) Which register is used to configure a PORT C as an input or output in AVR 03
microcontroller? Write assembly language instruction to configure PORT C
as an output port.
(b) Draw interfacing diagram to interface push-button switch with port pin 04
PD0. Explain instructions SBIS and SBIC to check status of input pin PD0
in AVR microcontroller with help of example.
(c) What is the importance of stack memory in microcontroller? In which 07
situation stack memory is utilized? Explain stack operations in AVR
microcontroller with example.
OR
Q.3 (a) What will be value of Program Counter (PC) when we connect power 03
supply pin Vcc to RESET pin in AVR Microcontroller? Draw power on
RESET circuit.
(b) What are the methods by which we can generate time delay in AVR 04
Microcontroller? Write a simple C program for generating a time delay in
AVR.

1
(c) Write assembly or C language program to toggle all bits of PORTD 07
continuously at every 200 microsecond. Use timer 0, CTC mode with 1:8
pre-scaler. XTAL=8 MHz

Q.4 (a) Write assembly language program to read data from pins of PORTA, 03
compare data with value 0x7F, Set port pin PD0 to high if data is greater
than 0x7F and low if data is less than 0x7F.
(b) What is interrupt? Explain the process of configuring interrupts in AVR 04
(c) Assuming that program ROM space starting 0x600 contains message 07
“UNIVERSAL HUMAN VALUES”. Write assembly language program to
send all message characters to PORTD one byte at a time using look up
table method.
OR
Q.4 (a) What are the advantages of using assembly language in time-critical 03
applications?
(b) Compare SPI and I2C protocols 04
(c) Describe process of interfacing LCD with AVR Microcontroller with 07
interfacing diagram and write program to display message
“Microprocessor” and on first line and “Microcontroller” on second line of
16x2 LCD display.

Q.5 (a) Explain ADC control and status register ADCSRA 03


(b) Draw interfacing diagram of one push-button switch and relay with AVR 04
Microcontroller. Write program such that status of relay should toggle at
every press of push-button switch.
(c) List any four applications of servo motor. Explain interfacing of servo motor 07
with AVR Microcontroller and write program to control servo motor for
angle 00, 900 and 1800.
OR
Q.5 (a) Discuss interrupt versus polling method of getting service of 03
microcontroller by the device. Which method is more efficient in terms of
response time?
(b) How does the baud rate affect UART communication? Which register is 04
used to set baud rate? What value should be loaded in that register for 9600
baud rate for crystal frequency of 8 MHz?
(c) Discuss the role of PWM in controlling DC motors with AVR. Interface DC 07
motor with AVR microcontroller with Motor driver chip. Write program to
rotate DC motor. Interface two push-button switches at pin PD0 and PD1.
Speed of DC motor should increase in step when switch connected with
PD0 is pressed and should decrease when switch connected with PD1 is
pressed.
*************

2
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER– IV(NEW) EXAMINATION – SUMMER 2023
Subject Code:3141008 Date:17-07-2023
Subject Name:Microprocessor & Microcontroller
Time:10:30 AM TO 01:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

Q.1 (a) Write the conditions when Parity flag, Zero flag and Sign flag will be set and reset in 8085. 03
(b) What is the size of stack pointer and program counter in 8085? Explain their functions also. 04

(c) Explain the function of following pins of 8085. 07


1. TRAP 2. SOD 3. HLDA 4. READY
Q.2 (a) Explain (1) LDS (2) STS instruction with the help of an example. 03
(b) Draw and explain Data memory space of AVR with no extended I/O memory. 04
(c) List down criteria for choosing a microcontroller to use it in any electronics circuits and 07
system.
OR
(c) Assume that R20 has packed BCD.Write a program to convert the packed BCD to two 07
ASCII numbers and place them in R21 and R22.

Q.3 (a) Write down the conditions when Negative flag and Overflow flag will be set and reset in 03
AVR.
(b) Explain the function of DDRx,PORTx and PINx registers in AVR. 04
(c) Write a program to find number of 1s in a given byte. 07

OR
Q.3 (a) What is branch penalty and its role in AVR? 03
(b) Specify the reasons for writing program in C language instead of assembly language. 04
(c) List down logical instructions used in AVR and explain any 4 of them with an example. 07
Q.4 (a) List down sources of interrupts in the AVR. 03
(b) Explain function of each bit of TCCR0 (Timer/Counter Control Register). 04
(c) Explain following instructions with an example. 07
1.SWAP 2.ASR 3.ROL 4.LSR
OR
Q.4 (a) Discuss the function of X, Y and Z register in AVR? 03
(b) Write a AVR C program to toggle only bit 4 of PORT C continuously without disturbing 04
the rest of pins of PORT B.
(c) Write down steps to program Timer 2 in normal mode. 07
Q.5 (a) Find the value for TCCR1A and TCCR1B to program Timer 1 as Normal mode and the 03
OC1A generator as square wave generator and no prescaler.
(b) List down the registers associated with USART and explain the role of each register in 04
brief.
(c) Write down steps to program A/D Converter using polling. 07
OR
Q.5 (a) Explain with neat diagram, stepper motor interfacing with AVR 03

(b) Give the name and functions of register used for SPI Protocol. 04
(c) List down features of I2C protocol and explain any two in details. 07
**********************
1
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–IV (NEW) EXAMINATION – SUMMER 2022
Subject Code:3141008 Date:02-07-2022
Subject Name:Microprocessor & Microcontroller
Time:10:30 AM TO 01:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

MARKS
Q.1 (a) List differences between 8085 Microprocessor or AVR 03
Microcontroller.
(b) What is the role of DDR Register in GPIO Programming in AVR 04
Microcontroller? Write assembly language instructions to initialize
PORT A as an input and PORTD as an output port.
(c) What is the meaning of address space partitioning? Draw interfacing 07
diagram to interface 16KB RAM and 16KB PROM with starting
address 0000H and 8000H respectively

Q.2 (a) Show how address bus and data bus are de-multiplexed to design 03
8085 microprocessor based application with help of diagram.
(b) List differences between RISC and CISC architecture. Write 04
advantages of RISC architecture over CISC architecture.
(c) Explain Architecture of 8085 Microprocessor with diagram and 07
explain important signals.
OR
(c) Explain Architecture of AVR Microcontroller with diagram. Which 07
registers are used as memory pointers?

Q.3 (a) What will be content of register R16 after execution of following 03
instructions?
SEC
LDI R16,0x01
LSL R16
(b) Explain SBI, SBR, CBI and CBR instructions with help of examples 04
(c) Explain assembly language instruction used for comparison 07
purpose. Write assembly language program using comparison
instruction to Read 8 bit value from Port A, Compare it with
reference value 080, If reading is greater than 0x80, set port pin PD0
and if reading is less than or equal to 0x80, reset port pin PD0.
OR
Q.3 (a) 8 LEDs are connected with PORTB of AVR Microcontroller such 03
that Anode of LEDs tied together and connected to +5 V, Cathode
of LEDs are connected to eight pins of Port B. Write instructions to
(1) glow all LEDs (2) Turn off all LEDs (3) Glow alternate LEDs
(b) What will status of flags C,Z,V and S after execution of following 04
instructions?
LDI R16,0x88
LDI R17,0xFF
1
ADD R16, R17
(c) In AVR microcontroller application, NPN Type Proximity sensor is 07
connected to PB0. Write assembly language program to Turn ON
Solenoid connected to port pin PD7, if object is near to Proximity
sensor. Assume that NPN Proximity switch gives logic 0 when
object is near to it and solenoid is turned ON if controlling pin is at
logic 1.

Q.4 (a) Write AVR C Program to get status of port pin PA0 and send it to 03
port pin PD0 continuously in infinite loop.
(b) What is interrupt? Explain steps for executing interrupts. List any 04
eight interrupts available in AVR Microcontroller.
(c) Explain steps for enabling external interrupts for AVR 07
microcontroller. Write program to toggle port pin PD7 when
external interrupt 1 occurs.
OR
Q.4 (a) What is need of timers in microcontroller? 03
(b) How timer interrupts are enabled and disabled. Explain TIMSK 04
register of AVR Microcontroller.
(c) Write AVR C program to generate square wave of 16 KHz with 50% 07
duty cycle on PB5 pin using Timer 0 generated delay. Assuming
Crystal of 8 MHz

Q.5 (a) What is difference between SPI and I2C ? 03


(b) How SPI interfacing is better than UART interfacing for serial 04
communication? Explain SPI signals showing interfacing of SPI
device with AVR Microcontroller
(c) Explain interfacing of 16x2 LCD with AVR Microcontroller. Write 07
assembly or C language program to display message “Atmanirbhar
Bharat” on the LCD.
OR
Q.5 (a) Common anode seven segment display is connected to port D. 03
Write assembly language or C language instructions to display
number 6 on seven segment display.
(b) Write C language program to rotate DC Motor in full speed. 04
Assuming that DC motor is controlled by IC LM293D using port
pins PC6 and PC7.
(c) Draw stepper motor interfacing diagram in unipolar mode using port 07
pins PD0 to PD3. Write C or assembly language program to rotate
stepper motor in full step mode continuously in clockwise direction.
When External interrupt 0 occurs, it should change to anticlockwise
direction.

*************

2
Enrolment No./Seat No_______________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–IV (NEW) EXAMINATION – SUMMER 2024
Subject Code:3141008 Date:10-07-2024
Subject Name: Microprocessor & Microcontroller
Time:10:30 AM TO 01:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.
MARKS
Q.1 (a) Which register is used to configure a PORT D as an input or output in 03
AVR microcontroller? Write assembly language instruction to
configure PORT D as an output port.
(b) What is the purpose of the General Purpose Registers (GPRs) in AVR 04
microcontrollers? Which GPRs are used as 16 bit memory pointers?
(c) Explain the purpose of the Status Register (SREG) in AVR 07
microcontrollers. Explain each flag of the SREG with help of example.

Q.2 (a) Explain instructions SBIS and SBIC to check status of input pin in 03
AVR microcontroller with help of example.
(b) Analyze following assembly language program and write content of 04
register R16, R17 and status of C,Z,N,V,H and S flag after execution
of the program.
LDI R16,0x7F
LDI R17,0x01
ADD R16, R17
HERE: RJMP HERE
(c) Explain block diagram of 8085 microprocessor. 07
OR
(c) What is difference between 8085 microprocessor and ATMega32 07
Microcontroller? Explain memory space of AVR microcontroller

Q.3 (a) Which register is useful to enable external interrupts in AVR 03


Microcontroller? Write assembly language or C language instructions
to enable external interrupts INT0, INT1 and INT2.
(b) Write assembly or C language program that responds to an external 04
interrupt 0 (INT0) generated by a push button switch and toggles an
LED connected to the pin PC7 of AVR microcontroller.
(c) What is the importance of stack memory in microcontroller? In which 07
situation stack memory is utilized? Explain stack operations in AVR
microcontroller with example.
OR
Q.3 (a) Write set of instructions to store bit 4 from R17 to T flag and then copy 03
T flag into bit 6 of register R18.
(b) Describe the control signals generated by the 8085 microprocessor 04
during the instruction fetch and execution phases.

1
(c) Draw circuit diagram to interface common anode seven segment 07
display with PORTD of AVR microcontroller. Interface two push
button switches to generate external interrupts INT0 and INT1. Write
assembly or C language program to display count values on seven
segment display in such as way that count value should increment
when external interrupt 0 is generated and count value should
decrement when external interrupt 1 is generated.

Q.4 (a) Write assembly language program to read data from pins of PORTC, 03
compare data with value 0x80, Set port pin PD7 to high if data is
greater than 0x80 and low if data is less than 0x80.
(b) Write assembly or C language program to rotate a stepper motor in 04
both clockwise and counterclockwise directions using half-step control
mode using PORTB of AVR microcontroller.
(c) Write assembly or C language program to toggle all bits of PORTB to 07
continuously at every 100 microsecond. Use timer 0, CTC mode with
1:8 pre-scaler. XTAL=8 MHz
OR
Q.4 (a) Explain ADC control and status register ADCSRA 03
(b) Write C or assembly language program to control a servo motor using 04
pulse width modulation (PWM).
(c) Explain the steps involved in configuring the UART module in AVR 07
microcontrollers for both transmission and reception.

Q.5 (a) Explain the process of data transmission in SPI communication 03


(b) Consider that NPN type proximity sensor is connected to PD3 port pin 04
and solenoid is controlled by PC5 port pin. Write assembly or C
language program to read proximity sensor, when object is near to the
proximity sensor, actuate the solenoid. Consider that in NPN proximity
sensor, active low signal is generated when object is near to it and to
actuate the solenoid, it needs active high signal from the port pin).
(c) Create a temperature monitoring system using an AVR microcontroller 07
and a temperature sensor LM35. Draw interfacing diagram and write
program in C or assembly language.
OR
Q.5 (a) What are the different addressing modes supported by the I2C 03
protocol?
(b) How does the baud rate affect UART communication? Which register 04
is used to set baud rate? What value should be loaded in that register
for 9600 baud rate for crystal frequency of 8 MHz?
(c) Draw interfacing diagram to interface 16x2 LCD module with AVR 07
Microcontroller. Explain functions of RS and E pin. Write assembly or
C language program to display message “HEALTH IS WEALTH” on
LCD.
*************

You might also like