Hi everyone,
I've some problem storing the data in register on C lang. My SBUF was stored with some data and i want to view what data was inside. I want to store my SBUF value into R0 but i not sure how to write the code in C lang.
I know that in asembly lang, it was MOV R0, #01H<<<<<example
Can anyone help me on this? Thanks alot
"My SBUF was stored with some data"
No, you cannot "store" data in SBUF!
When you write to SBUF, you are feeding the UART's transmit buffer; When you read from SBUF, you are fetching from the UART's receive buffer;
So you cannot read-back the data that you wrote to SBUF!
This is fundamental to the operation of the 8051 hardware - it has nothing specifically to do with 'C', Assembly, or any other programming language.
www.8052.com/.../120112