SBUF physically two registers? and shift register

My first question is regarding SBUF register of 8051. How come it is two registers while locations is only one i.e; 99H. we call SBUF physically two registers (write only and read only two separate distinct registers as scott mackenzie calls it in his book on 8051)? I studied the 8051 bible on hardware but the timing diagram and the circuitry shown there (Fig-13, Pg:12) was too confusing and difficult to comprehend the operation.

my next question is, where is this shift register and what has it got to how and why it shifts the bits to right. One of the books i studied online on google, mentions that shift register is external. Pardon me if i am asking very basic or easy questions but i am kinda geek in this domain and some how i havent figured out the logic behind physically two registers at same location and shift register operation and location after spending half day through different tutorials. please explain it in simple terms.

Parents
  • If you have "one" register, then you would normally expect that you can write a value to it, and then read back that value again - or maybe with some undefined bits zeroed in the answer. Anyway - there is the expectation that read and write somehow belong together.

    Not so with the UART data register. A write to that address writes to a write-only register that buffers data to be handed over to the shift-register for serial transmission. A read to that address will perform a read of a completely different register that gets its value from the last byte received by that shift register.

    And for some chips, there is additional FIFO buffers inserted between the read and write registers and the shift register handling the actual serial communication.

    Allmost all microcontrollers have this concept with a read register and a write register sharing the same address for incomming/outgoing data to the different peripherials. So you can find it for I2C, SPI, ...

Reply
  • If you have "one" register, then you would normally expect that you can write a value to it, and then read back that value again - or maybe with some undefined bits zeroed in the answer. Anyway - there is the expectation that read and write somehow belong together.

    Not so with the UART data register. A write to that address writes to a write-only register that buffers data to be handed over to the shift-register for serial transmission. A read to that address will perform a read of a completely different register that gets its value from the last byte received by that shift register.

    And for some chips, there is additional FIFO buffers inserted between the read and write registers and the shift register handling the actual serial communication.

    Allmost all microcontrollers have this concept with a read register and a write register sharing the same address for incomming/outgoing data to the different peripherials. So you can find it for I2C, SPI, ...

Children
More questions in this forum