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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/11/07 12:35
Read: times


 
#136968 - "bible" time
Responding to: ???'s previous message
Bob Robertson in the first post said:
	SBUF0=0x00;
	TI_0=1;
	while(1){
		TI_0=1;
	}


It is definitively "bible" time.

TI gets set automatically by hardware, when the byte gets completely transmitted. So there is no need to set it once you write into SBUF.
Setting TI manually would trigger the interrupt.
Not clearing TI in the interrupt would trigger the interrupt again and again, leaving time to execute only one machine instruction between consecutive invocations of the ISR.
Setting TI in "main" does not make sense, so it does not make sense to set it again and again in the loop (which, as you correctly said, loops forever... :-) )

JW (the C-hater)


List of 17 messages in thread
TopicAuthorDate
"Newbie's" etc with indents            01/01/70 00:00      
   a recommendation and a question            01/01/70 00:00      
      am I missing something?            01/01/70 00:00      
         Re: missing something?            01/01/70 00:00      
      re: recc's and question            01/01/70 00:00      
         glossary            01/01/70 00:00      
         "bible" time            01/01/70 00:00      
   Where is the Interupt Handler?            01/01/70 00:00      
      re: handler location            01/01/70 00:00      
      re: actual handler location            01/01/70 00:00      
   Status update            01/01/70 00:00      
      that is problematic            01/01/70 00:00      
         re: Problematic.            01/01/70 00:00      
      just spotted this            01/01/70 00:00      
         re: Interrupt number            01/01/70 00:00      
            if you do like this (http://....)            01/01/70 00:00      
               re: interrupt *solution*            01/01/70 00:00      

Back to Subject List