• Why can't I read SBUF?
    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...
  • Why can't I read SBUF?
    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...
  • I can't read the SBUF. The local variable don't receive the value of the SBUF. Thank you very much f
    void getSBUF() interrupt 4 using 1 { char temp = 1; temp = SBUF; RI = 0; }
  • I can't read the SBUF. The local variable don't receive the value of the SBUF. Thank you very much f
    void getSBUF() interrupt 4 using 1 { char temp = 1; temp = SBUF; RI = 0; }
  • I am using the uVision2 compiler and I can't store the SBUF in local variable.(I am using the debug
    void getSBUF() interrupt 4 using 1 { char temp = 1; unsigned char rData[3] static short n = 0; short i ; if (RI==1) temp = SBUF; RI = 0; TI = 0; } // This is part of the routine