How to interface Arduino Uno with Time to Digital Converter

Hello,

I am new to this Arduino community and am excited about using this microcontroller. I am EE student working on a project and need to make an ultrasonic time transit water flowmeter. Some of the components in my design include an Arduino Uno and a time to digital converter (Acam GP22). Basically what it does is, measures a time difference between the time a signal is sent through water from one transducer and the time when it is received from another transducer. I have never used an Arduino before and have only basic programming knowledge. The GP22 uses SPI communications but I am not sure how to physically connect the two devices. Am I suppose to use the SPI or ICSP pins?

Here is a block diagram of the GP22 device:

Also, my initial testing requires that I program the Arduino Uno to tell the GP22 device to send a packet of sine waves with a certain frequency. How would I do this?

I have tried searching but have not found any info on my application. Sorry if these questions seem too trivial...I am relatively new to embedded systems. Any guidance to helpful documentation would be appreciated.

Here is the link to the GP22 datasheet:

http://www.acam.de/fileadmin/Download/pdf/TDC/English/DB_GP22_en.pdf

Here is another link to some software flowcharts and example code (found in section 6 and 7):

http://www.acam.de/fileadmin/Download/pdf/UFC/English/AN032_en.pdf

Thank you

Start with a link to the datasheet which will tell you how to control the device.

Mark

Sorry if these questions seem too trivial

Far from it, it is a very advanced question and I suspect that even if you got an answer then you would not be able to understand it.

It would be good to have a link to the data sheet of your device, the block diagram you posted is interesting but tells little that is of practical use.

This is quite an advanced project and I would suggest that first you have a play about with the Arduino to get more of a feel of what you are doing. Do some tutorial examples.

Basically interfacing to an SPI device is easy, you just wire up the 4 wires, but from a software point of view there are many combinations of clock edges, number of bits and data transfer edges to consider and that is without the actual data format you need to talk to the device and get it to do what you want. All this should be in the data sheet of the device.

Am I suppose to use the SPI or ICSP pins?

Looks to me you would use the SPI pins.

Thank you for the replies. Very impressive response times guys haha.

Here is the link to the GP22 datasheet:

http://www.acam.de/fileadmin/Download/pdf/TDC/English/DB_GP22_en.pdf

I am very much a novice when it comes to embedded systems so please excuse my lack of competence. I am still a student and have only been exposed to theory and never any actual engineering.

Here is another link to some software flowcharts and example code (found in section 6 and 7):

http://www.acam.de/fileadmin/Download/pdf/UFC/English/AN032_en.pdf

I do not expect anybody to walk me through the whole process, I just need to understand the flow of the code. My goal for now is to get a basic understanding of the program from a high level perspective...

@bmell, are you still working on this or did you complete it? I am working a similar project and would like to share notes. I can help with SPI and other Arduino setup.

Hi Bmell and Dogburt,

I am Vasuki and I am also working on Ultrasonic flow measurement using GP22 TDC. Can you please provide some basic insight about the programming of it.

Thanks

Be aware the GP22 is a 3.3V device and connecting it's SPI to a 5V Arduino could destroy it and there buggers to solder. I have never programmed one for using ultrasonics just to use the timers to count very short time durations for a TDR