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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/05/06 11:02
Read: times


 
#109227 - No pb isr as such.
Responding to: ???'s previous message
According to what Ian wrote, the timer isr reads the pushbuttons and sets flags for the main code to interpret.

The timer interrupt will wake the cpu every 20mS, read the pushbutton status, copy this into some flags. The main line code will execute after the timer interrupt has completed. The main code will interpret the pushbutton flags, update the displays etc then sleep. Another 20mS, it will do the same thing again.

As such, you don't need to put the cpu to sleep unless you want to save power (especially if its run off a battery). Otherwise a dead loop waiting on a flag set by the timer tick would suffice.




List of 41 messages in thread
TopicAuthorDate
Polling vs interrupts in a chess clock.            01/01/70 00:00      
   Polling            01/01/70 00:00      
      Debounce            01/01/70 00:00      
   Either            01/01/70 00:00      
      debounce?            01/01/70 00:00      
         Yes            01/01/70 00:00      
      Alternatively            01/01/70 00:00      
         but PBs update clocks asynchronously            01/01/70 00:00      
            micro time vs real time            01/01/70 00:00      
               One second is a long time in Blitz chess            01/01/70 00:00      
            Use a fast main loop            01/01/70 00:00      
               but this won't let us power-down            01/01/70 00:00      
                  Do what Ian says            01/01/70 00:00      
                     I don't understand            01/01/70 00:00      
                        set a flag in the PB ISR right?            01/01/70 00:00      
                           No pb isr as such.            01/01/70 00:00      
                              The PB INTs wake up the cpu also            01/01/70 00:00      
                                 re: The PB INTs wake up the cpu also            01/01/70 00:00      
                                    Still LCD            01/01/70 00:00      
                              Isn't PB bouncing going to be a problem?            01/01/70 00:00      
                                 No            01/01/70 00:00      
                                    OK, I get it now, thanks            01/01/70 00:00      
                                       In the timer loop            01/01/70 00:00      
                                          Is it?            01/01/70 00:00      
                                             No            01/01/70 00:00      
                                                ISR capability?            01/01/70 00:00      
                                                   Pick a way            01/01/70 00:00      
                                                   ISR reources            01/01/70 00:00      
               Debounce            01/01/70 00:00      
            Define Immediately            01/01/70 00:00      
               No if the debounce is post delay            01/01/70 00:00      
                  Granted            01/01/70 00:00      
               naah and to the question bu the OP            01/01/70 00:00      
   The smartest thing ...            01/01/70 00:00      
      Re the smartest thing            01/01/70 00:00      
         Re Re the smartest thing            01/01/70 00:00      
         as for the character LCD ...            01/01/70 00:00      
            There are several IC to do this            01/01/70 00:00      
               Perhaps it's cheaper ...            01/01/70 00:00      
                  DigiKey has them            01/01/70 00:00      
      Saving Power            01/01/70 00:00      

Back to Subject List