Microprocessor, Embedded Systems and IoT
CSE · Midterm · Fall 23
Paper 1 of 2Batch 60 · SYED AHMAD GALIBSwitch
Batch 60
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
Midterm Examination, FALL-2023
Course Code: CSE231
Course Title: Microprocessor, Embedded Systems and IoT
Level: 3
Term: 1
Batch: 60
Time: 1 Hour and 30 Minutes
Marks: 25
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. For the memory location whose physical address is specified by 1256Ah, give the address in segment: offset form for segments 1256h and 1240h. | [5] | CO1
b. A memory location has a physical address of A3E7Bh. In what segment does it have an offset of 5D2Fh?
2. For each of the cases below, determine the value of SF, ZF, PF, CF and OF and justify the values with proper reason. | [2.5*2]=5 | CO2
a. ADD AX,BX Where AX Contain 7FFFh and BX Contain 001h
b. SUB AX,BX where AX contains 8000h and BX contains 0001h
3. Apply the assembly code of the loop using LOOP instruction to get the output even numbers between 0 and 10. | [5] | CO3
4. Suppose you're a developer for designing the traffic light control sequence as described the step below: | [10] | CO4
1. In that, first the Lane 1 gets its Green light turned. Hence, in all the other Lanes, their corresponding Red lights are turned on. After a time delay of predefined time say 5 seconds, the Green light in Lane 3 must be turned on and the Green light in Lane 1 must be turned off.
2. As a warning indicator, the Yellow light in Lane 1 is turned on indicating that the red light is about to light up. Similarly, the yellow light in Lane 3 is also turned as an indication that the green light is about to be turned on.
3. The yellow lights in Lanes 1 and 3 are turned for a small duration say 2 seconds after with the red light in Lane 1 is turned on and green light in Lane 3 is also turned on.
4. The green light in Lane 3 is also turned on for a predefined time and the process moves forward to Lane 4 and finally Lane 2.
5. The system then loops back to Lane 1 where the process mentioned above will be repeated all over again.
How would you program the Arduino to handle this specific traffic pattern, including the timing of green, red, and yellow lights, to efficiently manage traffic at a busy intersection of 4 way lanes with proper diagram?