Microprocessor and Micro-controller
CSE · Final · Fall 25
Paper 1 of 2Batch 65 · Md. Ferdous Foysal HridoySwitch
Batch 65
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, Fall 2025
Course Code: CSE317, Course Title: Microprocessor and Micro-controller
Level: 3 Term: 1 Batch: 65
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) You are working with an STM32 microcontroller running an RTOS (Real-Time Operating System). The micro-controller controls a traffic light system via GPIO pins. [5] CO 02
i. Explain how the RTOS scheduler does the job to run simultaneously without interfering with each other with an example.
ii. Describe the GPIO pin Configuration of STM 32 micro-controller
b) A micro-controller is used in a simple LED blinking circuit. The micro-controller turns the LED ON and OFF at a fixed interval using a timer. Illustrate how the micro-controller components interprets to complete this task. [5]
c) Explain how a microcontroller handles interrupts, including the role of vector tables. Compare Von Neumann and Harvard architectures. Which architecture is commonly used in microcontrollers and why? [5]
3. a) 1. You are writing a simple program to hide a secret message in memory. You have a 10-character space in memory where you want to: [3+3] CO 3
Fill all 10 spots with '*' characters (to hide any old data)
Write your name "ALI" at the beginning
Starting Memory
???????????
After Step 1 (fill with '*'):
**********
Step 2
ALI*******
2. Use string instructions to find the first character 'c' from the string "microprocessor" and the position.
b) Write an 8086 assembly program that: [4] CO 03
Pushes five ASCII characters (for example, 'H', 'E', 'L', 'L', 'O') onto the stack
Pops and displays the characters on the screen in reverse order (so the output should be "OLLEH").
Use stack instructions (PUSH, POP) and DOS interrupt INT 21h for display.
Do not use loops -- manually handle the pushes and pops for this exercise.
c) .CODE [5]
MAIN PROC
MOV AX, @DATA
MOV DS, AX
MOV AX, FFFFh
ADD AL, 1
MOV BX, B9F6h
SUB BH, 2
DEC AL
XCHG AX, BX
Apply the flag instruction concepts to find changes for all the instructions where flag bit will be effected and calculate the flag its.
3. A security module stores 8 status flags in AL = 1100 1101. Analyze the results by using Logic, Shift, Rotation instructions. [10] CO 04
AL = D7 D6 D5 D4 D3 D2 D1 D0
D7: CCTV active; D6: Laser fence ON; D5: Siren ON; D4: Motion detected; D3: Tamper alert; D2: Backup battery ON; D1: Night mode; D0: Fire detected
a. Check whether fire detected is active.
b. Turn OFF the motion detected bit.
c. Rotate the register left by 3 bits.
d. After rotation, clear CCTV without direct masking.
e. Extract the top 2 bits after rotation (D7-D6)