Jump to content

rkstowe

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About rkstowe

  • Rank
    Newbrie
  1. I must be getting blind in my old age! The semicolon after the if statement causes the problem. Geez.
  2. // update the real time clock void real_time_update (void) { // the interupt handler updates real seconds if (real_seconds > 59) // if we have a minute, update the clock { real_seconds = 0; real_minutes++; // add another minute if (real_minutes > 59) { real_minutes = 0; real_hours++; // add another hour if (real_hours > 24); // ERROR OCCURES HERE { real_hours = 0; real_day++; // add another day if (real_day > 6) real_day = 0; } } } } // end of real time update any false if statement should break out of this function. The proper goto statements are generated for all if's except if(real_hours > 24). The if statement codes as though it is always true. The goto the next line is generated. All clock variables are declared global. No error messages are reported. Only warning about bogus delay_us in linker. I relocated the code and have same problem, the clock wont count hours. Days however do work, and all others. SourceBoost 5.9.1, PIC18F252 target, Windows XP. ??? Ron
×
×
  • Create New...