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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/20/06 08:52
Read: times


 
#118587 - Debugging
Responding to: ???'s previous message
You need to adopt a scientific approach to debugging:

1. Observe
Observe precisely what the system does - just saying, "it doesn't work" helps nobody!

2. Form a Hypothesis
ie, construct a theory to explain the observed behaviour

3. Test your Hypothesis
Devise an "experiment" that will verify whether your hypothesis is correct or not:
  • If your hypothesis is correct, you have identified the problem, and can then work on fixing it;
  • If your hypothesis is not correct, you need to form another - maybe re-check your Observations


    Arvind Shrivastava said:
    The problem is the LED is remaining ON for indefinate period of time ...

    You need to think more carefully:

    Do you mean that the LED switches on correctly when the button is pressed but then never goes off?
    In that case, think what could cause this; eg,
  • you are not correctly detecting the switch after turning the LED on;
  • you detect the switch OK, but your code to turn the LED off is wrong;
    etc, etc,...

    Or do you mean that it's on even before the button is pressed?

  • List of 10 messages in thread
    TopicAuthorDate
    Program not working ...            01/01/70 00:00      
       Okay            01/01/70 00:00      
          and what happens when tested            01/01/70 00:00      
          How to post code            01/01/70 00:00      
       LED problem            01/01/70 00:00      
          Debugging            01/01/70 00:00      
             flickering            01/01/70 00:00      
       have look again to the code ...            01/01/70 00:00      
          Code is still unreadable            01/01/70 00:00      
          at least you tried            01/01/70 00:00      

    Back to Subject List