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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/01/04 14:52
Read: times


 
#82295 - The difference is
Responding to: ???'s previous message
"the BIBLE" says serial port interrupt is generated by RI and TI.

Actually, an interrupt is generated only if the ES bit is set in the Interrupt Enable (IE) register - see fig 18 on p17 of the 80C51 Family Hardware Description (chapter 3 of the "bible" for the 8051):
http://www.semiconductors.philips.com/acrobat/v...WARE_1.pdf

It seems to be a quite the same way of original one I posted the last time. What's the difference between two of them?

In your original post, your main code would just "hang" in a loop waiting indefinitely for TI to be set:
while(!TI); // The processor is effectively "hung" here
            // it cannot do any useful work until TI is set;
            // it is simply marking time, wasting instruction cycles!
TI = 0;
SBUF = date;
The whole point of using interrupts is that you do not have to hang the whole processor like this; as I explained before, your main process can get on with other things - it lets ISR handle the tedious detail of detecting when each byte finishes & loading the next one.




List of 27 messages in thread
TopicAuthorDate
THE TIME OF TI            01/01/70 00:00      
   Bitrate            01/01/70 00:00      
      interrupt-driven            01/01/70 00:00      
      Why interrupt driven?            01/01/70 00:00      
         UART Serial Port Interrupt            01/01/70 00:00      
            all the above            01/01/70 00:00      
               UART communication by UART interrupt            01/01/70 00:00      
                  just TI=1            01/01/70 00:00      
                     serial interrupt in adc interrupt            01/01/70 00:00      
                        start with something simple            01/01/70 00:00      
                        misunderstand behaviour            01/01/70 00:00      
                  See the examples            01/01/70 00:00      
                  not has to, but can            01/01/70 00:00      
            The difference is            01/01/70 00:00      
               "            01/01/70 00:00      
                  He's right            01/01/70 00:00      
   How the 8051 UART works            01/01/70 00:00      
      The TI-bit Set Time            01/01/70 00:00      
         no, at the middle            01/01/70 00:00      
            The Transmitter Part, Actually            01/01/70 00:00      
               Setting of TI            01/01/70 00:00      
                  sometimes chip designers listen            01/01/70 00:00      
                     So, Erik            01/01/70 00:00      
                        where does it happen            01/01/70 00:00      
                           Mode 1 TI timing.            01/01/70 00:00      
                              How to post code            01/01/70 00:00      
                                 RS485 & bus turnaround            01/01/70 00:00      

Back to Subject List