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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Erik Malund
10/04/12 08:41
Modified:
  10/04/12 08:42

Read: 596 times
Mt Airy, Nc
USA


 
#188573 - you are violating KISS
Responding to: Marshall Brown's previous message
KISS; Keep ISRs Short and Simple.

what you are doing wiil load a '51 with an elephant, have a look at the generated assembler.

there is an old tied and true method

timer ISR;
for (index = 0; index < NO_OF_TIMERS) index++)
{
   if (timerStack[index] !=0)
   {
      timerStack[index]--;

where used

if (timer_active)
{
   if (timerStack[MY_OFFSET]== 0}
   {
       timer_active = FALSE;
       whatever need be done when timed out


Erik

List of 13 messages in thread
TopicAuthorDate
Timers - Function Pointers      Marshall Brown      10/03/12 21:08      
   Too much for a '51?      Oliver Sedlacek      10/04/12 02:05      
      I Agree      Marshall Brown      10/04/12 03:27      
   Function Pointers...      Andy Neil      10/04/12 05:50      
   you are violating KISS      Erik Malund      10/04/12 08:41      
   Various Timer Functions        Michael Karas      10/06/12 01:14      
      Thanks Michael      Marshall Brown      10/06/12 23:34      
         regardless, you are violating KISS        Erik Malund      10/09/12 07:44      
            even on ARM      Stefan KAnev      10/09/12 13:40      
            The timer simply increments      Marshall Brown      10/11/12 15:58      
               bug      Marshall Brown      10/11/12 16:08      
                  more bugs      Maarten Brock      10/13/12 14:30      
                     thanks      Marshall Brown      10/14/12 13:31      

Back to Subject List