A couple of Ideas here.
I believe that modifiers can only be used with a byte variable.
Counter VAR BYTE all the bits can be address as: Counter.0, Counter.1, Counter.2, Counter.3......Counter.7
If you were to define
Timer VAR WORD then you might have to declare BYTE variables that are inside that word. For example:
Code:
Timer Var WORD
Counter VAR Timer.Byte0
Count2 VAR Timer.Byte1
Now
Counter and
Count2 are the Low and High byte of the Timer variable respectively.
Now you can address the variables bit as Counter.0, Counter.1...etc
All these according to the manual.... I have never really had a chance to use something like this.
You also have one error on yout
IF ...THEN statement. By putting the whole thing in one line PBP thinks that is not going to have an ELSE and therefore will not need a ENDIF. Also the
HIGH and
LOW statements are to make a PIN HIGH or LOW, not to make a variable 1 or 0.To fix all that do something like:
Code:
IF time.count2 = 1 THEN
Count2 = 1
ELSE
Count2 = 0
ENDIF
Also remember that you Timer variable will overflow after 65535.
Good Luck
Ivancho