SNAS648C October 2014 – February 2023 TDC1000
PRODUCTION DATA
Mode 2 is intended for transit time water flow metering applications (see Water Flow Metering). In this mode, the channel definitions are the same as for Mode 1: Channel 1 = "TX1/RX1" and Channel 2 = "TX2/RX2". The TDC1000 will perform one TOF measurement and go into READY state waiting for the next trigger signal.
Mode 2 supports averaging cycles and automatic channel swap. The averaging mode is active if NUM_AVG > 0 and allows for the stopwatch or MCU to perform the average of multiple TOF measurement cycles. In this mode, the device performs a TOF measurement on one channel (direction) for every trigger pulse until the averaging count is reached, and if CH_SWP = 1, the device will automatically swap channels and perform a TOF measurement on the other channel (direction) for every trigger pulse until the averaging count is reached.
The number of averages is controlled with the NUM_AVG field found in the CONFIG_1 register. Channel swapping is controlled with the CH_SWP bit in the CONFIG_2 register. The EXT_CHSEL bit in the CONFIG_2 register must be 0 for automatic channel swap to work. If EXT_CHSEL is 1, the active channel selection is controlled manually with the CHSEL pin.
If an echo measurement times out in averaging mode (indicated by the error flags or ERRB pin), the state machine should be reset and the error flags should be cleared. The state machine can be cleared by writing a 1 to bit [1] of the ERROR_FLAGS register and the error flags can be cleared by writing a 1 to bit [0] of the ERROR_FLAGS register. After completing these steps, the averaged measurement should be restarted.