8051 Timers — Loading TH0 Which instruction correctly loads the immediate value 35H into the high byte of Timer 0 (TH0)?
-
AMOV TH0, #35H
-
BMOV TH0, 35H
-
CMOV T0, #35H
-
DMOV T0, 35H
Answer
Correct Answer: MOV TH0, #35H
Explanation
Introduction / Context:Timer registers in the 8051 are split into THx (high) and TLx (low) bytes. Correct immediate loading syntax ensures predictable starting values for counting or timing operations.
Given Data / Assumptions:
- Target register is TH0 (timer 0 high byte).
- Value to load is 35H.
- Assembler syntax uses # for immediate data.
Concept / Approach:Immediate moves use the form MOV destination, #immediate. TH0 is a valid SFR symbol. Therefore the correct instruction is MOV TH0, #35H.
Step-by-Step Solution:1) Select the register: TH0.2) Use immediate notation: prefix with #.3) Write the instruction: MOV TH0, #35H.
Verification / Alternative check:Assembler reference confirms that omitting # interprets the operand as a direct address, not a literal, which is not intended here.
Why Other Options Are Wrong:
- MOV TH0, 35H: Treats 35H as a direct address, not a literal value.
- MOV T0, #35H and MOV T0, 35H: T0 is not a valid 8051 SFR name for the high byte; the correct symbol is TH0.
Common Pitfalls:Forgetting the # for immediate data and mixing up TH0 with TL0.
Final Answer:MOV TH0, #35H