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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/12/08 18:11
Read: times


 
#159000 - use a loop
Responding to: ???'s previous message
This is not a case for multitasking - you should simply check the 3 buttons in a loop, as in this pseudo-code:
button2variable = 0
LoopStart:
  if button1pressed
     display "2008"

  if button2pressed
     display_button2variable
     increment_button2variable
  else (button2released)
     button2variable = 0

  if button3pressed
     measure voltage
     display measured voltage

goto LoopStart


JW


List of 14 messages in thread
TopicAuthorDate
multitasking using 8051            01/01/70 00:00      
   Seems fairly simple            01/01/70 00:00      
   use a loop            01/01/70 00:00      
   What does it do when NO BUTTONS are pressed?            01/01/70 00:00      
   State machine            01/01/70 00:00      
   Not multitasking?            01/01/70 00:00      
      Scan keys and do accordingly            01/01/70 00:00      
      I am agree with Andy            01/01/70 00:00      
         Guessing?            01/01/70 00:00      
            Guess            01/01/70 00:00      
            Dear, i think you havent fully got my words...            01/01/70 00:00      
   Here are some guide lines...            01/01/70 00:00      
   Is there something wrong on this thread?            01/01/70 00:00      
      Yes It was Revived by John Smith //eom//            01/01/70 00:00      

Back to Subject List