Nothing Special   »   [go: up one dir, main page]

0% found this document useful (0 votes)
8 views2 pages

Winter 2023

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 2

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.
*************

You might also like