i was counting the time using Timer0 interrupt on overflow, and everytime that i changed the value of Clock or Alarm's time (Clock.Time.Min or Alarm.Time.Hour) Timer0 stops to counting and my program becomes crazy.. whats the problem with that ? i wouldnt use the same Name of one type of struct on diferents structs ??
like struct TTime Time in both struct TAlarm and TClock ?
and i was having another problem with local variables. i wrote a menu function to work with lcd display and my function returns a value of a choice.
if i declares the variable that will take this value and return it from the function its value is lost. It just work if i use this variable like a global variable.
so, that is it...
hope to someone has answers for these questions..
regards. _________________ Andre
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Tue May 02, 2006 3:09 pm
Can you post a small test program that shows the problem ?
Post a complete program that can be copied and pasted into MPLAB
and compiled with no errors. It must have all the necessary
#include, #use, and #fuses statements. Make the program be
very short -- a maximum of 50 lines. Use a printf statement
to display the problem. Indicate the line of code that you think
is causing the problem with a comment.
Also post your compiler version. You can find the version number
at the top of the .LST file for your project. The .LST file is in your
project directory. The version will be a number like 3.191 or 3.249, etc.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum