Why in this ISR I can't read the value of SBUF0? Always I read '00', but i can write what i want: void serial (void) interrupt 4 using 1 { unsigned char kk; EA = 0; if (RI_0) { RI_0=0; kk=SBUF0; flag = 1; } if (TI_0) { TI_0 = 0; SBUF0 = kk; } EA = 1; }
on SBUF, read "the bible" Erik here are the links to "the bible" Chapter 1 http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_ARCH_1.pdf chapter 2 http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_PROG_GUIDE_1.pdf chapter 3 http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_HARDWARE_1.pdf