🎓 BookMCQ
← Back to 15. Applications of Microprocessor

📝 8085 Microprocessor Based Temperature Controller (17 MCQs)

Microprocessor Regulation of Temperature Through Sensor Feedback

An 8085-based temperature controller measures temperature through a sensor, converts the sensor signal into digital data and adjusts a heating or cooling device. The 8085 compares the measured value with programmed limits and controls an output interface accordingly. A typical arrangement uses a temperature sensor, signal-conditioning circuit, ADC, programmable input/output interface and power driver.

Temperature Sensor and Analog-to-Digital Conversion

A sensor such as an LM35 produces an analog voltage proportional to temperature. Since the 8085 accepts digital data, an ADC such as ADC0808 or ADC0809 converts this voltage into an eight-bit code. The ADC reference range and sensor scale determine the relationship between the measured code and actual temperature.

Comparison Logic and Heater or Cooling Control

Software converts or compares the digital measurement with stored temperature limits. If the temperature is below the lower threshold, the controller activates heating. If it exceeds the upper threshold, heating is stopped and cooling may be activated. Separate thresholds prevent rapid switching when the measured temperature fluctuates near the set point.

Example of Maintaining a Temperature Near Thirty Degrees Celsius

Suppose the required range is 29–31 °C. The 8085 reads the ADC result and converts it using the sensor calibration. Below 29 °C, it activates the heater; above 31 °C, it switches the heater off and enables cooling if provided. Within the range, the previous safe control state is maintained.

Feedback, Switching Devices and Temperature Stability

Repeated measurements provide feedback so that the controller can respond to changing temperature. A relay, transistor or other rated power stage operates the heater or fan; the ADC and processor do not supply their operating power. Sensor placement, conversion resolution, measurement interval and switching delay affect temperature stability and control response.

Distinguishing Sensor Voltage, ADC Code and Temperature

'The 8085 reads temperature directly from the sensor' is incorrect because an ADC converts the analog voltage first. 'An eight-bit ADC measures only eight temperature values' is incorrect because it provides 256 codes over its reference range. 'The relay is driven directly by the ADC output' is incorrect because the processor and a suitable driver control switching.

ADC Scaling and Temperature-Control Decisions in Examinations

Trace the sensor voltage through the ADC to the 8085 input, and calculate temperature using the sensor scale and ADC reference. Identify lower and upper switching thresholds, explain hysteresis and distinguish heating from cooling control. Questions may also test ADC resolution, interface signals and the need for an external power driver.

Temperature Measurement and Control Terms

  • LM35 - Analog temperature sensor.
  • ADC0808 - Converts sensor voltage into an eight-bit code.
  • Set Point - Desired control temperature.
  • Hysteresis - Difference between switching thresholds.
  • Relay Driver - Switches heater or cooling loads.
  • Feedback - Uses measured temperature to adjust output.
4
Easy
7
Medium
6
Hard

📝 All 8085 Microprocessor Based Temperature Controller MCQs

Q1. In order to show a temperature value on the six 7‑segment displays, which register must contain the BCD‑coded digit before the display routine is called?

A.Register A ✅
B.Register B
C.Register C
D.Register D
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The display routine reads the register that holds the Binary‑Coded Decimal (BCD) digit for each segment. Register A is conventionally used for this purpose because the monitor program expects the value there; registers B, C, and D are either used for other control flags or remain untouched. By loading Register A with the correct BCD value, the routine sends the proper pattern to the 7‑segment, ensuring the temperature appears correctly on the display.

Q2. If the 8085 uses the RST7.5 interrupt every 1 ms to count seconds, how many interrupts must occur to represent one full second?

A.500500 ✅
B.10001000
C.20002000
D.10241024
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Each interrupt occurs after 11 ms, so a full second (10001000 ms) requires 10001000 interrupts. Option A (500500) would represent only half a second, while option C (20002000) would double the count, and option D (10241024) is a power‑of‑two unrelated to the timing. Correctly counting 10001000 interrupts lets the program increment the seconds field precisely, keeping the clock accurate.

Q3. When adding a heating element control to the temperature controller, which port bit should be toggled to switch the heater on after the measured temperature exceeds the setpoint?

A.Port A bit 0
B.Port B bit 3
C.Port C bit 7 ✅
D.Port D bit 2
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: Port C is commonly assigned to output devices in many 8085 kits, and bit 7 provides a clear, high‑order line for driving a relay that powers the heater. Using Port A or B would interfere with existing input or display lines, and Port D bit 2 may be reserved for other peripherals. Selecting Port C bit 7 ensures the heater can be turned on without affecting other functions, maintaining reliable operation.

Q4. What is the purpose of initializing registers A and B to 00 or 01 before invoking the display routine?

A.To select address versus data field ✅
B.To set the clock speed
C.To enable interrupts
D.To reset the microprocessor
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The monitor program distinguishes whether the memory contents represent address fields (hours/minutes) or data fields (seconds) based on the values in registers A and B. A value of 00 signals an address field, while 01 indicates a data field. The other options—clock speed, interrupt enable, or processor reset—are unrelated to the display routine's selection mechanism, making option A the correct explanation.

Q5. How does using separate address and data fields for hours/minutes versus seconds improve the readability of the clock display?

A.It groups related digits together ✅
B.It reduces power consumption
C.It enables faster clock updates
D.It allows use of fewer pins
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: By placing hours and minutes in the address field and seconds in the data field, the display groups time components logically, making it easier for a user to read the time at a glance. Faster updates and lower power are not directly linked to this arrangement, and the number of pins remains unchanged; thus, the primary benefit is the logical grouping of related digits.

Q6. Why must the real‑time clock routine handle BCD overflow after 59 seconds, and what operation is required?

A.Subtract 6060 and increment minutes ✅
B.Add 11 to seconds
C.Reset the entire clock
D.Ignore the overflow
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: When the seconds field reaches 5959 and increments, it rolls over to 0000 and the minutes field must increase by one. This requires subtracting 6060 (or resetting to zero) and then adding one to the minutes BCD value. Simply adding 11 would produce an invalid BCD digit, and resetting the whole clock or ignoring the overflow would break accurate timekeeping.

Q7. What is the hexadecimal address of the monitor program that clears the display?

A.0347 H ✅
B.05D0 H
C.2050 H
D.2055 H
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The monitor routine responsible for clearing the seven‑segment displays resides at address 0347 H. The other addresses correspond to the display routine (05D0 H) and the memory locations used for storing time values (2050 H–2055 H). Knowing the correct clearing routine address is essential for initializing the display before the clock starts.

Q8. To turn off a fan after exactly 30 minutes using the timer, which combination of registers and loop structure is most appropriate?

A.Use Register C as a minute counter with a nested loop for seconds ✅
B.Use Register D for minutes and a single loop for seconds
C.Use Register A for hours and ignore minutes
D.Use Register B for seconds only
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Register C can serve as a minute counter that increments each time the inner seconds loop reaches 6060. Nesting the second‑count loop inside the minute loop allows precise tracking of 30 minutes (30 increments). Using Register D alone would not provide the needed nested structure, and ignoring minutes would make the 30‑minute interval impossible to detect.

Q9. When interfacing an LM35 temperature sensor with the 8085, which ADC conversion factor correctly translates the sensor’s output voltage to temperature in Celsius?

A.1010 °C per mV
B.100100 °C per V
C.11 °C per mV ✅
D.0.10.1 °C per mV
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: The LM35 provides an output of 1010 mV per °C, so each millivolt corresponds to 0.10.1 °C. However, the ADC conversion factor must convert the measured voltage directly to temperature, which is 11 °C per 10 mV, i.e., 11 °C per mV after scaling. Therefore, option C correctly reflects the direct conversion used in the program; the other options either invert the relationship or use incorrect scaling.

Q10. Why is it advantageous to store display routines in ROM/EPROM rather than RAM for this clock design?

A.ROM/EPROM retain code after power loss ✅
B.ROM/EPROM are faster than RAM
C.ROM/EPROM are cheaper
D.ROM/EPROM allow dynamic updates
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Placing the display routine in ROM/EPROM ensures the code remains available even when the system is powered off, which is critical for a clock that must resume correct operation after a power interruption. While ROM may be slightly slower, its persistence outweighs speed concerns. Cost and dynamic updating are not primary considerations for fixed routines.

Q11. If the current time shown is 23:59:58, what will the six 7‑segment displays show after two seconds have elapsed?

A.1 ✅
B.0
C.0.0006712962962962532
D.0
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: After 23:59:58, the clock increments the seconds to 59, then rolls over to 00 while also incrementing the minutes and hours, resulting in 00:00:00. Option A shows an invalid 60 seconds, option C repeats the original seconds, and option D correctly displays the reset time.

Q12. What role does the monitor program located at 05D0 H play in debugging the real‑time clock design?

A.It displays memory contents for verification ✅
B.It clears the display before start-up
C.It provides interrupt handling
D.It sets the system clock speed
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The routine at 05D0 H reads the memory locations holding the time values (2050 H‑2055 H) and presents them on the address and data fields, allowing the programmer to verify that the clock is updating correctly. Clearing the display is handled by the program at 0347 H, while interrupt handling and clock speed configuration are managed elsewhere.

Q13. If the clock loses 2 seconds per hour due to oscillator drift, how should the program be adjusted to keep accurate time over a 24‑hour period?

A.Add a correction of 48 seconds at the end of the day ✅
B.Subtract 48 seconds each hour
C.Add 2 seconds to the minute counter each hour
D.Ignore the drift
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Over 24 hours, a loss of 2 seconds per hour accumulates to 2×24=482 \times 24 = 48 seconds. Adding a one‑time correction of 48 seconds at the day's end restores the clock to the correct time. Subtracting each hour would over‑compensate, and adding 2 seconds to the minute counter each hour would create an erroneous minute increment.

Q14. How does using BCD representation affect arithmetic operations in the timer routine?

A.It requires decimal‑adjust instructions after addition ✅
B.It simplifies binary addition
C.It eliminates the need for carry handling
D.It allows direct bit‑wise shifts
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: When adding BCD values, the result may exceed the valid BCD range (0‑9) for a digit, so a decimal‑adjust (DAA) instruction is needed to correct the nibble and set the carry appropriately. Binary addition alone would produce invalid BCD digits, and carry handling is still necessary; bit‑wise shifts do not address BCD overflow.

Q15. To implement an on/off timer that toggles a relay every 5 minutes, which instruction sequence best achieves this using register counters?

A.Load R0 with 5, loop decrement R0, toggle relay when R0 = 0 ✅
B.Load R1 with 300, decrement each second, toggle at 0
C.Use the stack to count minutes, pop when 5 reached
D.Use a jump instruction without counters
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Loading a register (e.g., R0) with the count of 5 minutes and decrementing it each minute provides a clear, deterministic way to know when the interval has elapsed; when R0 reaches zero, the relay is toggled and R0 is re‑loaded. The other methods either misuse registers, rely on the stack unnecessarily, or omit counting altogether.

Q16. Why is the 8085's single‑step execution mode useful when testing the alarm logic of a temperature controller?

A.It lets the programmer observe each instruction’s effect on registers and flags ✅
B.It speeds up the testing process
C.It disables all interrupts automatically
D.It clears the display after each step
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Single‑step mode pauses after each instruction, allowing the developer to watch how the alarm condition sets flags, updates ports, and changes memory. This granular view helps locate logical errors. The mode does not accelerate testing; rather, it provides detailed insight. Interrupts remain enabled unless explicitly masked, and the display is unaffected unless the program commands it.

Q17. In a scenario where temperature exceeds the high‑limit for 10 seconds, which sequence ensures the buzzer sounds for exactly that duration?

A.Start a 10‑second counter when limit is crossed, stop buzzer when counter reaches zero ✅
B.Toggle buzzer continuously while temperature is high
C.Use a delay loop of 10 seconds irrespective of temperature
D.Activate buzzer once and rely on hardware timer
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: By initiating a dedicated 10‑second software counter at the moment the temperature passes the high‑limit, the program can control the buzzer precisely: it turns on, counts down, and turns off when the counter expires, even if the temperature remains high. Continuous toggling would keep the buzzer on longer, a fixed delay ignores the limit crossing time, and relying on hardware alone lacks programmatic control.

🔗 Related Topics (MCQs)