We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
The code is like this: #include <reg51.h> void main() { unsigned char ch; SBUF = 0xcc; ch = SBUF ; } I found that the value in ch is always zero,however, when I substituated SBUF with other SFRs, the result in ch is 0xcc, which is correct. What is the problem here and how can I read the value in SBUF? Thanks!