"...reaches 11, portb.1 goes high. Now it goes low until variable 126 is reached and goes high.."

Could you be more specific at Value=11 ?

How long to make it high then low again?


------------