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.
SBUF='L'; tam1=SBUF; you can see this code,when i debug it,i was very surprised that tam1=0x00 not 0x4c.I don't know why?You can help me.
because there are two register for serial function :one read only and one write only.
I don't know why?
Then you should definitely read chapter 3 of the "bible", aka the 8051 hardware documentation, until you know:
www.nxp.com/.../80C51_FAM_HARDWARE_1.pdf
Because there it says (emphasis mine):
Writing to SBUF loads the transmit register, and reading SBUF accesses a physically separate receive register.