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

sbug not being set

how can the sbuf register be told to send a string that is received?

Parents
  • First of all, you do understand that SBUF is actually two separate registers, don't you?

    There is a read-only SBUF, from which you read received bytes;
    There is a write-only SBUF, to which you write bytes to be transmitted.

    Second, you must realise that these are just single-byte registers - therefore they cannot handle strings directly.

    To handle strings, you need to write your own functions to handle the strings one byte at a time - or use the supplied library functions.

Reply
  • First of all, you do understand that SBUF is actually two separate registers, don't you?

    There is a read-only SBUF, from which you read received bytes;
    There is a write-only SBUF, to which you write bytes to be transmitted.

    Second, you must realise that these are just single-byte registers - therefore they cannot handle strings directly.

    To handle strings, you need to write your own functions to handle the strings one byte at a time - or use the supplied library functions.

Children
No data