Re: PWM and MEMORY
you only need the "endif" if the "if" statement takes up more than one line...
IF A=B THEN dosomething
versus...
IF A=B THEN
dosomething
ELSE
IF B>A THEN
dosomethingelse
ENDIIF
And as far as your question to Jersen...
It looks to me that he is just having the code check the stored value in EE memory only on power up (or after a reset).
You would not need to keep checking the stored value in EE every time the program loops
You only wanted to retrieve the last stored value on power up so it does not need to be in the Main block.
check the PBP manual for the IF statement...
5.35 IF..THEN
IF Comp {AND/OR Comp...} THEN Label
IF Comp {AND/OR Comp...} THEN Statement...
IF Comp {AND/OR Comp...} THEN
Statement...
{ELSEIF Comp {AND/OR Comp...} THEN
Statement...}
{ELSE
Statement...}
ENDIF
hope this helps
dwight
Nice lab!!
lets see the other half (or is that where all the dead bodies are)
Last edited by Heckler; - 13th May 2016 at 21:43.
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Bookmarks