Quote Originally Posted by Tabsoft View Post
Have you thought of using a Flag variable?
During your checking routine, set a Flag if you need to write to the PCA.
Check the Flag to determine if you need to do the gosub to write to the PCA chip.
Can't get my head round it, at least because the condition at which the PCA get written to will be true.

I thought of
Code:
If Counter1 => CH1_on_Time and counter1 < CH1_off_time then                     ' check to see if the time in minutes since midnight matches the Channel on time
CH1_PWM  = fadeset1
flag=1  
endif
with a IF Flag=1 then gosub update... but that would still cause the update subroutine to be updated on each pass of the loop...