100% found this document useful (2 votes)
675 views

Microcontroller Interface For Time To Digital Converter Chip GP2

This document describes a microcontroller interface for a commercial time-to-digital converter (TDC) chip. The interface allows a microcontroller to configure the TDC, read measurement data via a serial peripheral interface (SPI), and present results to a PC. Preliminary test results are shown measuring time differences between start, stop1, and stop2 signals. The interface provides a way to evaluate the TDC chip and obtain time measurements with 65 picosecond resolution.

Uploaded by

rmcnis
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
675 views

Microcontroller Interface For Time To Digital Converter Chip GP2

This document describes a microcontroller interface for a commercial time-to-digital converter (TDC) chip. The interface allows a microcontroller to configure the TDC, read measurement data via a serial peripheral interface (SPI), and present results to a PC. Preliminary test results are shown measuring time differences between start, stop1, and stop2 signals. The interface provides a way to evaluate the TDC chip and obtain time measurements with 65 picosecond resolution.

Uploaded by

rmcnis
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Microcontroller Interface for Time to Digital Converter Chip GP2

S. K. Poudel, V. B. Kulkarni, Santosh Kumar, R. M. Chandak*, and


R. Mukhopadhyay
Solid State Physics Division, Bhabha Atomic Research Centre, Mumbai - 400085, INDIA.
* email: [email protected]

Introduction (see Fig 1, 2). TDC configuration and data


registers are accessible to any microcontroller
High resolution time measurement finds via Serial Peripheral Interface (SPI) protocol.
application in various science and engineering
set-ups. A popular way of measuring time
difference between two logic pulses is, using
Time to Amplitude Converter (TAC) followed
by an ADC. In recent times, time difference
measurement based on propagation delay of
CMOS inverters has evolved. These CMOS
inverters form a long chain, implemented in
Time to Digital Converter (TDC) chip [1]. The
TDC also contains decoding logic for
measurement of time and interface for digital
data readout. Fig. 1 Measurement Principle
We have designed and tested a
microcontroller based evaluation circuit for a Hardware Interface
commercial TDC chip (GP2 Make: ACAM) [2].
TDC is connected to a microcontroller
We present in this contribution overview of
(P89V51RD2) [3] as shown in Fig. 2. TDC can
microcontroller hardware-firmware interface for
be configured to measure time difference
TDC-GP2 and its measurement results.
between start, stop1 and stop2 signals. The
microcontroller reads TDC via four SPI signals
TDC Chip GP2 and presents the result to hyper terminal of PC.
This TDC measures time difference with a In actual set-up more than one TDC can be part
resolution of 65ps. It has two measurement of SPI bus with individual slave select.
ranges 0 to 1.8µs and other 500ns to 4ms. The
time difference is given by the combination of
coarse counts and fine counts. The coarse count
is measured by the reference clock and the fine
counts by the CMOS inverters (see Fig. 1). TDC
gives result in 32 bit fixed point format
containing 16 bit integer and fractional part each.
The ratio of fine counts difference to calibration
count difference takes care of the variation in
delay of CMOS inverters due to temperature.
Time difference is calculated by:
Fig. 2 Hardware Block Diagram
TD = TRef x (Cc + (Fc1 – Fc2 ) / (Cal2 – Cal1))
Microcontroller Firmware for TDC
Where, TRef is time period of ref clock used (250 Readout
ns), Cc is coarse counts, Fc1 and Fc2 are fine
The TDC measurement was done using
counts Cal2 and Cal1 are used for calibration
flow chart presented in Fig 3. The configuration
is done for selection of measurement range,
calibration or no calibration, time differences to
be measured, number of hits expected etc.
Initialization of TDC is done by sending an op-
code, which arms the TDC to accept new start
stop pulses for measurement.
Configuration: Mode & Calibration

Initialization

TDC waits for: Start, Stop pulse(s)


[Time out]

Calibration Fig. 4 Test Measurement Waveforms

ALU post processing The test results are shown in the


oscilloscope waveform captured (Fig. 4) and
frequency distribution of time difference
Interrupt readings captured on hyperterminal (Fig. 5)

Read TDC Data & Send to PC

Fig. 3 Measurement Flow

TDC waits for start and stop pulses. It


generates interrupt when ALU is ready with data
or if no stop pulse arrives (within measurement
range limits) after the occurrence of start pulse.
Upon interrupt microcontroller reads TDC data,
calculates time difference and sends result to PC.
TDC now needs to be reinitialized to accept new
inputs. The preliminary results shown above lack a
While communicating over SPI bus precise test input. A circuit based on temperature
microcontroller has to generate slave select, send compensated oscillator with complementary
op-code byte followed by this are more read or output can be a more reliable test input.
write byte transfers. The SPI master logic in
microcontroller takes care of SPI clock References
generation and data transfers.
[1] Chorng-Sii Hwang, Poki Chen and Hen-
Measurement Results and Conclusion Wai Tsao “A High Precision Time To
To test the TDC a step input was generated Digital Converter Using a Two-Level
after initializing the TDC, by the same Conversion Scheme.” IEEE Trans. Nucl. Sci.
microcontroller which initializes and reads the vol. 51, No. 4, pp 1349-1352 AUGUST 2004
TDC. The step input is start, this is delayed by [2] TDC GP2 Datasheet.
two not gate to generate stop1, stop1 is delayed [3] Microcontroller P89V51RD2 Datasheet.
by two not gates to make stop2.

You might also like