         // grab this as soon as we can
         PICstop_long = PICCount;
 
-        // read tof into tmp   
-        last_tof_long = tof_long;
+        // remember last tof, then get new one   
+        prev_tof_long = tof_long;
         tof_long = channels[i].read();
 
-        // get ready for next reading
+        // done with chip, so get ready for next reading
         channels[i].ready_next(); // Re-arm for next measurement, clear TDC INTB
+
+Serial.print("  ");Serial.print(PICstop_long);
+Serial.print("  "); Serial.print(tof_long);
+
+        // There is jitter when PICstop is about to insert/remove a 100us tick, which should beg
+        // synchronous with TOF rollover.  Fllowing is an attempt to mask that jitter and only
+        // insert/delete when the TOF rolls.
         
         // has the TOF rolled over or under?  This depends on PICtick_ps being 1e8  HELP ME!!!
-        if ((tof_long <  4e7L) && (last_tof_long > 6e7L)) {
-          tof_rollovers--;
+        if ((tof_long <  1e7L) && (prev_tof_long > 9e7L)) {
+          tof_roll_up = 1;
         }
-        if ((tof_long >  4e7L) && (last_tof_long < 6e7L)) {
-          tof_rollovers++;
-        }
-        
-        PICstop_long += tof_rollovers;
-        
-        // convert long to string, then to bignumber and multiply to get ps result
+        if ((tof_long >  9e7L) && (prev_tof_long < 1e7L)) {
+          tof_roll_down = 1;
+        }            
+             
+        // convert PICstop long to string, then to bignumber and multiply to get ps result
         ltoa(PICstop_long, buf, 10);
-        // calculate the "raw" timestamp as BigNumber
         PICstop = BigNumber(buf) * PICtick_ps;
         
         
-        //convert long to string
+        //convert tof long to string, then to bignumber
         ltoa(tof_long, buf, 10);
         // copy into BigNumber
-        tof = BigNumber(buf);
-
-        
-        
-        // do some math
+        tof = BigNumber(buf);   
+        
+        // do some math; all these are BigNumbers
         tsprev = ts;
         ts = PICstop - tof;
         period = ts - tsprev;
 
-        printBigNum(tof);
-        Serial.print("  ");
-        printBigNum(PICstop);
+
+        // print results
+//        printBigNum(tof);
+//        Serial.print("  ");
+//        printBigNum(PICstop);
+              
         Serial.print("  ");
         printBigNum(ts);
         Serial.print("  ");
-        printBigNum(period);
-        Serial.println();      
-        
+        printBigNum(period);   
+
+Serial.println("");        
         
     } // if
   } // for
 } // loop
+
+/**************************************************************************************/
  
-// ISR for timer. NOTE: uint_64 rollover would take
+// ISR for timer. NOTE: uint_64 rollover would take                          
 // 62 million years at 100 usec interrupt rate.
 // NOTE: change to uint32 for now
 
 void coarseTimer() {
   PICCount++;
 }
+
 
 // Constructor
 tdc7200Channel::tdc7200Channel(char id, int enable, int intb, int csb, int stop):

// Portions Copyright Jeremy McDermond NH6Z 2016
// Licensed under BSD 2-clause license



/*******************************************************************************************
 Set these constants to match your hardware configuration
********************************************************************************************/
#define CLOCK_FREQ            (uint32_t)1e7    // Hz
#define CALIBRATION2_PERIODS  20               // Can only be 2, 10, 20, or 40.
#define PICTICK_PS            (uint32_t)1e8    // 100 uS PICDIV strap is 1e8 picoseconds, 1ms is 1e9
#define FUDGE0_PS             (uint32_t)0      // adjust for propagation delays, in picoseconds
/*******************************************************************************************/

#include <stdint.h>   // define unint16_t, uint32_t
#include <SPI.h>      // SPI support

};

// Initial config for TDC7200
// Chip properties:
// Most Significant Bit is clocked first (MSBFIRST)
// clock is low when idle
// data is clocked on the rising edge of the clock (seems to be SPI_MODE0)
// max clock speed: 20 mHz
// Using TDC7200 timing mode 2...
void tdc7200Channel::setup() {
  digitalWrite(ENABLE, LOW);
  delay(1);
