This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MCU Timing not responding!

The 8051 micro-controller(P89V51RD2FN) that I have been using is configured on a 11.0592 Mhz crystal. But the delays do not respond as per programmed. The programs are perfectly written and there is no issue in the code. Is my controller faulty? How to check that? Please provide some troubleshoot tips and tricks. Thank you very much.

Parents
  • Bind your delays to timer hardware. Unless you don't want it to work...
    OR write them in assembler

    it is the correct action of a good optimizer to say that this code

         for (i = 0; i < 30000; i++)
          { /* Delay for 10000 Counts */
            wait (); /* call wait function */
          }
    


    affect nothing and thus should be ignored

    Try setting the optimization level to zero

    also what happens when main() ends?

    Erik

Reply
  • Bind your delays to timer hardware. Unless you don't want it to work...
    OR write them in assembler

    it is the correct action of a good optimizer to say that this code

         for (i = 0; i < 30000; i++)
          { /* Delay for 10000 Counts */
            wait (); /* call wait function */
          }
    


    affect nothing and thus should be ignored

    Try setting the optimization level to zero

    also what happens when main() ends?

    Erik

Children