AI-Generated Video Summary by NoteTube

Unit 5 L11 | SBUF & SCON Register in 8051 microcontroller | SFR  of 8051

Unit 5 L11 | SBUF & SCON Register in 8051 microcontroller | SFR of 8051

Techno Tutorials ( e-Learning)

13:19

Overview

This video lecture focuses on two crucial Special Function Registers (SFRs) in the 8051 microcontroller: the Serial Buffer Register (SBUF) and the Serial Control Register (SCON). Both are integral to enabling serial communication within the microcontroller. The SBUF register acts as a temporary storage for data before transmission or after reception, handling the framing of data by adding start and stop bits. The SCON register, on the other hand, is used to program and control various aspects of serial communication, including the data framing, baud rate, and enabling/disabling the transmitter and receiver. The video details the bit configurations and functionalities of both registers, explaining their roles in different serial communication modes.

Want AI Chat, Flashcards & Quizzes from this video?

Sign Up Free

Chapters

  • Introduction to SBUF and SCON registers for serial communication in 8051.
  • Both registers are Special Function Registers (SFRs).
  • SBUF is for buffering data, SCON is for controlling serial communication.
  • SBUF is an 8-bit SFR with RAM address 99h.
  • Used to store data before transmission.
  • Data in SBUF is framed (start and stop bits added) before transmission via TXD.
  • SCON is an 8-bit SFR with RAM address 98h.
  • Used to program start and stop bits for data framing.
  • Controls various aspects of serial communication.
  • SM0 and SM1 are two bits in SCON that define the serial mode.
  • Four possible combinations (00, 01, 10, 11) define different UART modes.
  • Mode 0: 8-bit UART with shift register.
  • Mode 1: 8-bit UART, variable baud rate.
  • Mode 2: 9-bit UART, 32 or 64 baud rate.
  • Mode 3: 9-bit UART.
  • SM2 (Serial Mode 2): Used for multi-processor communication.
  • REN (Receiver Enable): Bit 4, enables or disables the receiver (RXD).
  • TB8 (Transmit Bit 8): Bit 3, used for transmitting the 9th bit in Mode 2 and 3.
  • RB8 (Receive Bit 8): Bit 2, used for receiving the 9th bit in Mode 2 and 3.
  • TI (Transmit Interrupt Flag): Bit 1, set when transmission is complete.
  • RI (Receive Interrupt Flag): Bit 0, set when a byte has been received.
  • Baud rate is determined by the oscillator frequency and SCON modes.
  • Mode 0: Baud rate is oscillator frequency / 12.
  • Mode 1: Baud rate is variable.
  • Modes 2 & 3: Baud rate is oscillator frequency / 32 or / 64 (controlled by SMOD bit).
  • For transmission: Load data into SBUF, set TI flag.
  • For reception: Enable receiver (REN=1), RI flag indicates data reception.
  • RI=1 means a byte has been received and should be read from SBUF.

Key Takeaways

  1. 1SBUF is the 8-bit buffer for serial data, holding data before transmission or after reception.
  2. 2SCON is the 8-bit control register for serial communication, defining modes, enabling transmission/reception, and managing interrupts.
  3. 3The SM0 and SM1 bits in SCON determine the serial communication mode (0-3), affecting data framing and baud rate calculation.
  4. 4The REN bit in SCON is crucial for enabling the 8051 to receive serial data on the RXD pin.
  5. 5TI and RI flags in SCON signal the completion of transmission and reception, respectively, and are used for interrupt handling.
  6. 6Baud rate calculation depends on the selected SCON mode and the system's oscillator frequency.
  7. 7Data framing involves adding start and stop bits to the 8-bit data for reliable serial transmission.
  8. 8Understanding SBUF and SCON is fundamental for implementing serial communication protocols like UART in the 8051.
Unit 5 L11 | SBUF & SCON Register in 8051 microcontroller | SFR of 8051 | NoteTube | NoteTube