Hello Everyone. I have a word variable with a number that begins at 0 and slowly advances to 1199. It then resets to 0 and the cycle repeats. What I want to do is set flags at certain points to toggel a port high. For example, if flags are set at variable 11 and variable 126, as the variable advances and reaches 11, portb.1 goes high. Now it goes low until variable 126 is reached and goes high again, etc. Does anyone have an idea to accomplish this? Thank you.