This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

About SBUF

Hi, in a serial communication program, do I have to "SETB P3.0" in order to receive from the serial port ??

Parents
  • Presumably, you're talking about a chip where RxD shares a pin with P3.0 as an "Alternate Function" ?

    Look on page 3 of chapter 3 (Hardware Description) of the so-called "bible" for the 8051:

    "The alternate functions can only be activated if the corresponding bit latch in the port SFR contains a 1. Otherwise the port pin remains at 0"

    www.8052.com/.../120112

    Also, look at this post, and follow the links, about how the 8051 Quasi-Bidirectional port pins work: www.8052.com/.../182887

    It is important that you take time to understand this - as it is quite different from most other architectures!

    It has nothing specifically to do with Keil.

Reply
  • Presumably, you're talking about a chip where RxD shares a pin with P3.0 as an "Alternate Function" ?

    Look on page 3 of chapter 3 (Hardware Description) of the so-called "bible" for the 8051:

    "The alternate functions can only be activated if the corresponding bit latch in the port SFR contains a 1. Otherwise the port pin remains at 0"

    www.8052.com/.../120112

    Also, look at this post, and follow the links, about how the 8051 Quasi-Bidirectional port pins work: www.8052.com/.../182887

    It is important that you take time to understand this - as it is quite different from most other architectures!

    It has nothing specifically to do with Keil.

Children