Question:

What is the operation carried out by the 8051 instruction: ‘SETB 0D3’?

Show Hint

The SMOD bit in the PCON register controls the baud rate. Using SETB PCON.7 doubles the baud rate for serial communication in 8051 microcontrollers.
Updated On: Feb 10, 2025
  • It disables all of the interrupts temporarily.
  • It doubles the baud rate of the serial communication.
  • It switches to bank1 from the default bank0.
  • It makes the timer-0 run in mode-3.
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: The instruction SETB 0D3 means "Set Bit D3 in the Special Function Register (SFR)". 
Step 2: In 8051 microcontrollers, bit D3 (PCON.7 - SMOD bit) in the Power Control Register (PCON) is responsible for doubling the baud rate of the serial communication. 
Step 3: The PCON Register (Power Control Register) structure is: \[ \begin{array}{|c|c|c|c|c|c|c|c|c|} \hline \textbf{SMOD} & - & - & - & \textbf{GF1} & \textbf{GF0} & \textbf{PD} & \textbf{IDL} \\ \hline D7 & D6 & D5 & D4 & D3 & D2 & D1 & D0 \\ \hline \end{array} \] - D7 (SMOD bit) = 1 → Baud rate doubles. 
Step 4: Evaluating options: 
- (A) Incorrect: Interrupt disable is controlled by the IE (Interrupt Enable) register. 
- (B) Correct: Setting SMOD (D3 in PCON) doubles the baud rate. 
- (C) Incorrect: Bank switching is done via the PSW (Program Status Word) register. 
- (D) Incorrect: Timer-0 mode selection is done via the TMOD register.

Was this answer helpful?
0
0