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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/04/09 10:22
Read: times


 
#162036 - Timer + conditional loop.
Responding to: ???'s previous message
Instead of implementing a delay that counts turns through a loop, configure and use a timer.

Then write a loop that continuously checks if the timer is "ringing" or if you have received any characters on the serial port. If you have received characters - parse them and decide if they represents a command to break your delay. If not, wait until the timer has ticked long enough - or overflowed enough number of times - that your delay should time out.

You may also process the serial data in an interrupt, and let the interrupt set an abort flag if it receives a specific character.

List of 28 messages in thread
TopicAuthorDate
Multi Tasking in 8051            01/01/70 00:00      
   No need            01/01/70 00:00      
   to get a taste of it...            01/01/70 00:00      
      Or Not            01/01/70 00:00      
         I am thinking of implementing the superloop            01/01/70 00:00      
            It is one way            01/01/70 00:00      
      microcontroller vs microprocessor            01/01/70 00:00      
         Broad range of microcontrollers            01/01/70 00:00      
   I need help again!!!            01/01/70 00:00      
   Timer + conditional loop.            01/01/70 00:00      
      How do I implement the Interrupt Driven Serail Comm?            01/01/70 00:00      
         Samples            01/01/70 00:00      
         Own work            01/01/70 00:00      
            I am also looking            01/01/70 00:00      
               So where did you get stuck?            01/01/70 00:00      
               it will not            01/01/70 00:00      
               That *is* the trouble with sample code!            01/01/70 00:00      
               look at code library            01/01/70 00:00      
                  You have to read and understand            01/01/70 00:00      
   Some useful links here            01/01/70 00:00      
      Wha shuld the value of TMOD?            01/01/70 00:00      
         what is in TMOD now?            01/01/70 00:00      
            it does not work            01/01/70 00:00      
               what happens to T1 when            01/01/70 00:00      
                  I don't know what happens to TI            01/01/70 00:00      
                     time for some basic debugging            01/01/70 00:00      
                        tx and gnd shorted            01/01/70 00:00      
                           New question, new thread            01/01/70 00:00      

Back to Subject List