Due to jitter with gating pulse, most code from T0 was moved to main loop