sahu
Member
SW2 is a define, and it resolves directly to a number; therefore the compiler never created the code for the test. In order to read a pin in CCS, use the input() function.
So your test code should be:
C:if ((ch<=674) && (input(SW2)==1)) //Low Voltage protection enable if SW2 is always on(conect with GND). return(LOW_VOLTAGE); //if SW2 is always off(no conect with GND & +5 volt.) Low Voltage protection disable
Took me a few minutes to figure this out. I would set a breakpoint in MPLAB SIM, and it would tell me that the 'breakpoint could not be resolved." The reason it could not be resolved was that it was being optimized out.
now OK low volt cut off function ....
thank u Agnes my dear sir rmain1972
and what u about BlinkLED1 & Quake start sw.
Last edited: