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

Reading SBUF

unsigned char GetSerial =0;

SCON = 0x50; /* SCON: mode 1, 8-bit UART, enable rcvr */
TMOD = 0x20; /* TMOD: timer 1, mode 2, 8-bit reload */
TH1 = 0xfd; /* TH1: reload value for 9600 baud */
TR1 = 1; /* TR1: timer 1 run */

GetSerial = SBUF;

the problem is when i add some data in serial window, and while running this command GetSerial = SBUF; , there is no data will copy from SBUF to GetSerial,

i see the watch-window.

so what is the problem??????????

0