In the T0 ISR:
  GCambientLoops--;
  if ( !GCambientLoops)
  {
    GCintBas = S0_TH1 ;
    S0_TL1 = 0;
    S0_TH1 = 0;
    GCambientLoops = 15;
    GBupdateIntensity = TRUE;
  }