You are on page 1of 2

Darshan Institute of Engineering & Technology - Rajkot

Department of Electronics & Communication


Mid Sem Examination Question Bank
Sem.:

5th (EC)

Subject: Microcontroller & Interfacing (2151001)


SECTION A Prof. M. R. Khandhedia

Sr.
No.
1.
2.
3.
4.

5.

6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.

18.

Questions

Marks

What is data type of AVR? Enlist various data format and directives of AVR.
Enlist various instructions to access data memory. Explain each in detail with
example
What is difference between IN and LDS instruction?
Explain the role of program counter in AVR. What is size of program counter?
What is ROM width in AVR?
Explain difference between following
1. Harvard architecture and Von-neumann architecture
2. Little endian and big endian
3. RISC and CISC
Write a program in assembly to add data of memory locations F000 to F005
memory locations. Store result in F006 (lower byte) and F007 (higher byte).
Explain various unconditional jump instructions.
Explain various CALL instructions.
Write a program in assembly to generate delay of 5 seconds. Assume crystal
frequency of 8 MHz
Write a program to Turn on and off LEDs connected to PORT B with delay of 0.5
second. Assume crystal frequency of 2 MHz
Enlist various data types with data range in C for AVR. Explain any two in detail
Explain various bit wise logical operators in C
Write a program in C to monitor bit 4 of Port C. If it is 1 (one) then send FFh to
Port B else send 77h to Port B
Write a program in C to Turn on and off LEDs connected to PORT B with delay
of 0.5 second.
Write a program in C to display I Love My India on Port B
Write a program to find maximum number in a given block of data. The block
starts at 3000H. The 1st data shows the length of block. Store the result at end of
the block
Write an assembly language program to copy block of 10 data stored in memory
starting from memory location 2050h to memory locations starting from 3000h
A set of readings is stored in memory locations starting from 2050H and last
reading is FFH. Write a program to check each byte in the string and save the
bytes in the range of (100)d to (150)d (both inclusive) in memory location starting
from 2070H.Also store number of bytes in a given range at 206FH memory

07
07
02
03

02
02
03
07
07
07
07
07
07
04
04
04
04
07

07
07

19.
20.

location
A set of five readings is stored in memory locations starting at 2050H. Sort the
readings in ascending order
A set of 5 reading is stored in memory location starting from 2050H. Write a
program to count number of 1s (bit 1) present in each data byte (e.g. 33h
=00110011 has 4 1s). Store the result in the same memory location

07
07

SECTION B Prof. K. B. Sanghvi


Sr. No.
1.
2.
3.
4.

Questions
Draw & explain each pin of AVR ATMega32
Draw & explain AVR Status Register
Explain the role of PIN, PORT & DDR register
Explain addressing modes of AVR ATMega32

NOTE
The following topics are common for both portions:

All the instructions of AVR ATMega32 (Refer Appendix A of The AVR Microcontroller &
Embedded Systems by Muhammad Ali Mazidi, Sarmad Naimi, Sepehr Naimi)
All the programs done in class/lab