Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/14/06 20:45
Read: times


 
#118327 - Unclear
Responding to: ???'s previous message
Unfortunately, it's a bit hard to tell whether you're just having trouble expressing this in English, or if you really don't understand how SBUF works.

So, let's go back to basics:

take a look at Figure 14 on page 13 of the 80C51 Family Hardware Description - Chapter 3 of the so-called "bible" for the 8051:

http://www.semiconductors.philips.com/acrobat/v...WARE_1.pdf

You will see that there are two boxes labelled "SBUF":
  • the one at the top of the diagram has a write-only connection to the "80C51 Internal Bus";
  • the one at the bottom of the diagram has a read-only connection to the "80C51 Internal Bus".

    This is why, if you write to SBUF and then immediately read from SBUF you will not read back the same value that you just wrote!
       MOV SBUF, A     ; Write to SBUF
       MOV A,    SBUF  ; Read from SBUF - will NOT read-back the same value!


    That's the way a real 8051 works so, hopefully, the simulator will behave the same; ie, the value it displays for SBUF will be the value that you would get for a read from SBUF - which will not be the same value that you just wrote to SBUF!

    The Keil simulator provides separate SIN and SOUT simulation registers to represent the two independant parts of SBUF - maybe yours does too? You will have to study its Manual to find out!

  • List of 23 messages in thread
    TopicAuthorDate
    UART Simulator            01/01/70 00:00      
       Explain            01/01/70 00:00      
          did Keil go out of business?            01/01/70 00:00      
             i explain            01/01/70 00:00      
                bible time            01/01/70 00:00      
                   ???            01/01/70 00:00      
                      you will, it has nothing to do with the            01/01/70 00:00      
                         :)            01/01/70 00:00      
                            you go ahead            01/01/70 00:00      
                            SBUF            01/01/70 00:00      
                               sorry for disturb any from here            01/01/70 00:00      
                                  already answered            01/01/70 00:00      
                                  Unclear            01/01/70 00:00      
                                     Keil simulator            01/01/70 00:00      
             that's just blatant pimping, Erik!            01/01/70 00:00      
                naah, just facts            01/01/70 00:00      
                   thx            01/01/70 00:00      
                      not a problem            01/01/70 00:00      
       one other thing ... how about mode 0?            01/01/70 00:00      
          if mode 0 was an option, he would have u            01/01/70 00:00      
             Of course, it isn't ... it's not a UART!            01/01/70 00:00      
                then why do you suggest it?            01/01/70 00:00      
                   What I mean is ...            01/01/70 00:00      

    Back to Subject List