Microprocessor and Micro-controller
CSE · Final · Summer 26
Paper 1 of 2Batch 66 · Mehrab Hossain RahiSwitch
Batch 66
Paper 1 of 2
Read the questions as text
Read off the PDF by AI, so it may have mistakes. The PDF is the original.
Daffodil International University
Faculty of Science & Information Technology
Department of Computer Science & Engineering
Final Examination, Summer 2026
Course Code: CSE317, Course Title: Microprocessor and Microcontroller
Level: 3 Term: 1 Batch: 66
Time: 02:00 Hrs
Marks: 40
Answer ALL Questions
[The figures in the right margin indicate the full marks and corresponding course outcomes. All portions of each question must be answered sequentially.]
1. a) A micro controller is used in a smart energy meter to process sensor data and control peripheral devices. Explain how the CPU architecture enables efficient execution of instructions and data processing in this application and which architecture suits the best. [3] CO2
b) i. Show the Pin modes of STM32 Micro-controller. [7] CO2
ii. Illustrate the architecture of the STM32L4 ARM Cortex-M4 processor and Describe the functions of its major components.
2. a) Compare UART and I2C communication protocols used in STM32 microcontrollers with respect to: [2.5] CO2
- Number of communication lines
- Communication type
- Overall performance
- Speed
- Typical applications
b) Explain the function of each of the following components in the STM32 interrupt system: [2.5]
i. Nested Vector Interrupt Controller (NVIC)
ii. Interrupt Service Routine (ISR)
iii. Interrupt Vector Table
Illustrate how these components work together when a push button generates an interrupt
3. a) MOV AX, 7FFFH
ADD AX, 0001H
MOV BL, FOH
AND BL, OFH
INC AL
MOV CL, 80H
SUB AX, 8000H
XOR BL, BL
Identify the status of the flags after each instruction that modifies them [5] CO3
b) i. Two strings of equal length (10 characters each) are stored at memory. Write an assembly language program to compare the two strings character by character. Count the number of matching character [3+3]
4. a) i. A string of 20 characters is stored at a register. Write an 8086 assembly program to replace every occurrence of 'A' with '@' and every occurrence of 'E' with '#'. Store the modified string [4]
C) MOV AX, 1111H
MOV BX, 2222H
MOV CX, 3333H
MOV DX, 4444H
PUSH AX
PUSH BX
PUSH CX
POP SI
ADD SI, DX
POP DI
PUSH SI
POP BX
POP AX
SUB BX, AX
i Find the Final values of AX, BX, CX, DX, and SP.
ii Draw the stack after every PUSH and POP instruction
a) You're implementing a basic encryption system where each byte is rotated 3 bits to the right to obfuscate it. Task: Given AL = 11011010b [10] CO4
Analyze the following tasks
a. Write the instruction(s) to rotate the byte right by 3 bits. Determine the resulting binary value of AL after the rotation.
b. Using the rotated value obtained in part (a), extract the resulting lower nibble as the final value in AL.
c. Write the instruction(s) that make all bits of AL identical to the original Most Significant Bit (MSB).
d. Determine whether Bit 6 and Bit 0 are both active (1) at the same time
e. Explain how the original byte can be recovered.
All these task should be done using appropriate logic, shift, rotation and necessary sequences of assembly codes.