   }
   
   AVG_CYCLES = 0x00;  // 0x00 for 1 measurement cycle
-  NUM_STOP = 0x00;    // SHOULD BE 0x00 for 1 stop but that doesn't work
+  NUM_STOP = 0x01;    // SHOULD BE 0x00 for 1 stop but that doesn't work
 
   reg_byte = CALIBRATION2_PERIODS | AVG_CYCLES | NUM_STOP;
   write(CONFIG2, reg_byte);  

 //write(CLOCK_CNTR_STOP_MASK_L, 0x01); // was 0x00 // hold off no clocks before enabling STOP
 //write(COARSE_CNTR_OVF_H, 0x0F);  //was 0xF0  -- only doing this because STOP doesn't raise INTB 
 //write(COARSE_CNTR_OVF_L, 0x00);
 //write(CLOCK_CNTR_OVF_H, 0xF0);   // was 0xF0
 //write(CLOCK_CNTR_OVF_L, 0x00);  // was 0x00
  
}


   
  PICcount = 0;
  pinMode(COARSEint, INPUT);
  pinMode(STOP_A, INPUT);
  pinMode(STOP_B, INPUT);
  pinMode(STOPAint, INPUT);
  pinMode(STOPBint, INPUT);
  
  enableInterrupt(COARSEint, coarseTimer, RISING);
  enableInterrupt(STOP_A, catch_stopA, RISING);
  enableInterrupt(STOP_B, catch_stopB, RISING);
  
//  attachInterrupt(digitalPinToInterrupt(COARSEint), coarseTimer, FALLING); // falling edge avoids timing issue
//  attachInterrupt(digitalPinToInterrupt(STOPAint), catch_stopA, RISING); 
