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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/26/11 23:31
Read: times


 
#180831 - getting there
Responding to: ???'s previous message
Tom Piggin said:
within the SCON register SM0 and FE (framing error) bit share the shame bit within the byte

One is read-only; the other is write-only.

It is quite common for registers (or bits within registers) to have distinct functions for read & write; eg, reading SBUF access the receiver buffer; writing SBUF access the entirely separate transmitter buffer.

should I set SM2 when sending an address and disable when sending data

No!

or should I set TB8 when transmitting an address and clear TB8 when sending data?

Yes!

Think about it: if you take the UART out of 9-bit mode, then there is no 9th bit - is there?!

i.e so the 9th bit indicates whether an address or data is being transmitted

Yes, that is exactly what the 9th bit is for!

As the book says:
An address byte differs from a data byte in that the 9th bit is 1 in an address
byte and 0 in a data byte.




List of 28 messages in thread
TopicAuthorDate
automatic address recognition on 8051            01/01/70 00:00      
   8-bit or 9-bit?            01/01/70 00:00      
      google            01/01/70 00:00      
         8051 microcontrollers: an applications-based introduction            01/01/70 00:00      
      You need both 9-bit *and* the "Enhanced" UART            01/01/70 00:00      
         I guess he has the enhanced            01/01/70 00:00      
            Indeed!            01/01/70 00:00      
               rephrase            01/01/70 00:00      
   which chip?            01/01/70 00:00      
      Aside: multi-UART chips not necessarily all Enhanced?            01/01/70 00:00      
         UART0 and UART1            01/01/70 00:00      
            continued            01/01/70 00:00      
               Accessing the 9th bit            01/01/70 00:00      
               Did you check the link I mentioned?            01/01/70 00:00      
                  risky suggestion            01/01/70 00:00      
                     Yes - staying in the 9-bit mode            01/01/70 00:00      
                  google            01/01/70 00:00      
                  link checked and other queries            01/01/70 00:00      
                     also...            01/01/70 00:00      
                         Accessing the 9th bit (again)            01/01/70 00:00      
                           another moment of stupidity            01/01/70 00:00      
                     getting there            01/01/70 00:00      
                        thanks for clearing this up            01/01/70 00:00      
                           fig 14 of WHAT            01/01/70 00:00      
                              link            01/01/70 00:00      
                           SM2            01/01/70 00:00      
               enhanced            01/01/70 00:00      
   thanks            01/01/70 00:00      

Back to Subject List