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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/06/11 15:48
Read: times


 
#184111 - Not uncommon to have
Responding to: ???'s previous message
Andy Neil said:
Per Westermark said:
In this case, there doesn't seem to be any other tasks to do for the processor so it doesn't matter if it busy-loops.


And the checking of the buttons appears to be within the busy loop - so it shouldn't get in the way of that...

Yes, it is a common trick to either have to main loop constantly check flags (set by hw timers) to figure out when things should be done.

Of to have a delay or keypad scan function check for some extra tasks to do while busy-looping. Having a delay or keypad scan function that also checks if it's time to blink a LED or something similar, means that parts of the super-loop can be maintained even when entering special submodules.

List of 16 messages in thread
TopicAuthorDate
Speed control of running light            01/01/70 00:00      
   Please insert the legible source code            01/01/70 00:00      
      comments            01/01/70 00:00      
   please suggest some idea            01/01/70 00:00      
   Bad            01/01/70 00:00      
   Better to use timer            01/01/70 00:00      
      May be better - but not essential            01/01/70 00:00      
      Ok that 's fine            01/01/70 00:00      
      hw-timers for delays            01/01/70 00:00      
         there doesn't seem to be any other tasks            01/01/70 00:00      
            Not uncommon to have            01/01/70 00:00      
   no, you don't            01/01/70 00:00      
   do you have pullups on P0?            01/01/70 00:00      
   ***__HORRIBLE CODE__***            01/01/70 00:00      
   This Problem Shouts "Use a Table"            01/01/70 00:00      
   new tutorial needed            01/01/70 00:00      

Back to Subject List