Back to the 2022 paper

Module 5: External Communication Interface

20227m

Explain serial ports of 8051 microcontroller. Also discuss about registers used in serial communications.

Worked SolutionAI Assisted

Serial Ports of 8051 & Registers

8051 has one full-duplex UART.

Modes: Mode0 shift, Mode1 8-bit var baud, Mode2 9-bit fixed, Mode3 9-bit var.

Registers:

  • SCON (98H): SM0,SM1 (mode), SM2 (mp), REN (enable), TB8,RB8, TI,RI.
  • SBUF (99H): Separate shift registers for TX/RX but same address; write starts TX, read gets RX.
  • PCON (87H.7 SMOD): Double baud bit.
  • TMOD/TH1/TL1/TCON: Timer1 sets baud in modes 1&3.
  • IE/IP: ES, PS for interrupt control.

Baud: Mode0 Fosc/12, Mode2 Fosc/64 or /32, Modes1/3 via Timer1 overflow. Frame start/data/stop handles via flags TI/RI.

Similar questions

Student FinanceWeb Platform

Pocketly — Personal Finance for Students

Keep your hostel and college expenses under control. Track accounts, log spending in seconds, and stay within your monthly budget.