HowardALandman / QTD

Research project on Quantum Time Dilation, including theory and plans for an experiment to test it.
2 stars 1 forks source link

Add TDC7200 support #7

Open PE1NUT opened 4 years ago

PE1NUT commented 4 years ago

The TDC7201 and TDC7200 are very similar ICs. The TDC7201 contains two,instead of one TDC, and has some improved parameters (higher stop count, longer time interval for mode 1, SPI clock from 20 MHz to 25 MHz) compared to the TDC7200. Notably, both have the same register map.

If there's interest, I can dig into the details, and provide a PR with what's needed to get the TDC7200 properly supported as well. The code as is already seems to work out-of-the-box with the TDC7200.

The TDC7200 EVM uses the same pinout as channel 1 of the TDC7201 EVM.

HowardALandman commented 4 years ago

Thanks. I had noticed the 7200 myself recently, but don’t have one to test against, so I didn’t want to claim that it worked when I had no way of being sure.

Good 7200 support would seem to include minor changes to set_SPI_clock_speed(), different limit checks for some of the control registers, and disabling of any side 2 support.

Moayidd commented 3 years ago

Hi, So would this work with the tdc7200 IC (chip) on its own instead of the tdc7200EVM ? If it does could you possibly provide the pin assignment tdc72000 to GPIO of the Raspberry along with any Caps or resistors needed ? It would help tremendously as I'm really stuck with the TDC7200 chip and am very new to this. Regards

HowardALandman commented 3 years ago

I expect that my code should probably work with the 7200 as long as the changes listed above are made. For example, the upper spec limit in set_SPI_clock_speed() should be dropped from 25 MHz to 20 MHz.

Some of the pin assignment is forced (especially power/gnd and SPI pins) and some is arbitrary (any GPIO will work). You can follow my pin assignment or you can choose your own. You'd also want to make something like my pin table for the 7201 EVM.

If you're not using the EVM's built-in clock, you'll need to provide your own clock and clock control.

It's very important that the traces for START and STOP be perfectly balanced, or else your board layout will introduce skew into the timing. You also don't want any other active signals (especially your clock!) routed anywhere near those, to avoid capacitive coupling.

Moayidd commented 3 years ago

Thanks for all the info, I'll give your suggestions a try. When you say START and STOP traces are perfectly balanced you mean same trace length, correct ? regards