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:01
Read: times


 
#161499 - you need to flag somehow the end of transmission
Responding to: ???'s previous message
To transmit a byte via UART, it takes time. Quite a lot of time, in your case its around a thousand of instruction cycles. And, the TI bit is the perfect indicator, that this time has elapsed. 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"...

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.

JW


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