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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/13/09 20:37
Read: times


 
#161501 - reply to Jan
Responding to: ???'s previous message
Jan Waclawek said:
And you recklessly throw it away, clearing it and taking no other action upon detecting it set, signalling you "I am ready with transmission, you may now send an another character"...

I added this line in the ISR before TI bit was cleared:
 jnb TI,$
 

still it does not work.

The ISR routine should then wait until TI is set before clearing TI, shouldn't it?
Isn't that the right way to do it?

Jan Waclawek said:

What you should do now is to set your own flag - e.g. a bit in the bit addressable RAM - in the same moment when you clear TI in the ISR. And then the "main" shall wait until this flag is set, clear it and send the next byte then.


Sounds like a good idea. Thank you for the suggestion, I will try it.


List of 23 messages in thread
TopicAuthorDate
serial interrupt?            01/01/70 00:00      
   Your Problem            01/01/70 00:00      
      still not working            01/01/70 00:00      
         you need to flag somehow the end of transmission            01/01/70 00:00      
            reply to Jan            01/01/70 00:00      
   Several            01/01/70 00:00      
      To Hans            01/01/70 00:00      
         And my reply to Charles            01/01/70 00:00      
   no interrupts works            01/01/70 00:00      
   the solution            01/01/70 00:00      
      Isn't that what Hans said?            01/01/70 00:00      
      Perfectly????? Prolly should look again.            01/01/70 00:00      
         Got to look ahead...            01/01/70 00:00      
         Another thing to consider            01/01/70 00:00      
            reply to Andy Neil            01/01/70 00:00      
         reply to Michael Karas            01/01/70 00:00      
      why is this a bad idea            01/01/70 00:00      
         Exactly why not perfect !!!            01/01/70 00:00      
         response to Jan Waclawek            01/01/70 00:00      
            interrupts forever            01/01/70 00:00      
            nope            01/01/70 00:00      
               Re: Erik            01/01/70 00:00      
   if you HAVE to mix ...            01/01/70 00:00      

Back to Subject List