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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/23/10 13:36
Read: times


 
#176861 - Divide by 5
Responding to: ???'s previous message
You can easily take your timer interrupt at 50 msec and change the reload value to get to a reload value at 10 msec. Then add one variable that counts 4-3-2-1-0-4-3-2...... and at each time the variable is coming upon zero have it do the functions you used to do at 50 msec rate.

This then gives you the ability to add other software timers with 10 msec resolution which is better for short interval timing than trying to fine tune in steps of 50 msec. (that is if that resolution is too course).

Michael Karas


List of 23 messages in thread
TopicAuthorDate
Ideas for Multi-tap keyboard routine            01/01/70 00:00      
   just follow            01/01/70 00:00      
   Multi-tap is not too difficult            01/01/70 00:00      
      Two-step operation. Keyboard input + post-processing            01/01/70 00:00      
         State Machine!            01/01/70 00:00      
            Agree 100%            01/01/70 00:00      
               Time to code            01/01/70 00:00      
                  Software Timers!            01/01/70 00:00      
                     Practical Limits            01/01/70 00:00      
                        Don't lock up in infinite loops everywhere            01/01/70 00:00      
                           In the pseudo code...            01/01/70 00:00      
                           State Machine            01/01/70 00:00      
                              Divide by 5            01/01/70 00:00      
                                 Timer resolution            01/01/70 00:00      
                              State Machine            01/01/70 00:00      
                              Looks not bad programming practice            01/01/70 00:00      
                  Using Timer May Still be Possible            01/01/70 00:00      
                     Done !            01/01/70 00:00      
                        Very Cool!!!            01/01/70 00:00      
                        Compare with zero is better            01/01/70 00:00      
                           Avoid ISR jitter using timer T1            01/01/70 00:00      
                           Code!            01/01/70 00:00      
                              Thanks Munish...            01/01/70 00:00      

Back to Subject List