Hi, I have experienced a strange problem. When a particular variable is initailised to a particular value, sometimes it never works. But if a debug statement is put before the initialisation statement, it starts to work. This problem need not be only during initiasation but this can happen anywhere( i.e... before calling a function or initialising the structure variables etc..). Strange thing is that after removing the debug statement and recompiling, The code works properly. Sometimes it need not be only debug statement, a "delay" or "wait" can also work wonders. We are using C51 compiler - ver 3.20. Pls let me know if there is any solution for this. Thanks in advance. Guruprasad K
Turning down the level of optimisation and see if the code starts to work If the problem is timing or interrupt interaction, this might hide the problem, rather than fix it. Erik