Open slangshot opened 7 years ago
Hi Tim,
- It is not clear how to use the enable pins EN_START and EN_STOP1 pg 2-10 of the datasheet says to connect STOP1 to VIO IF UNUSED
That doesn't seem right; do you mean "connect EN_STOP1 to VIO"?
(it seems the START and STOP enabled by default), right? I have just left them unconnected.
Not sure, but I don't think EN_START is enabled if left unconnected. (Unless you change the setting SEL_TSTO2
- see SEL_TSTO2
in the datasheet). Have you tried setting the Enable pins high?
Hi Leo Please delete the new issue I put up - I didnt realize the first attempt was fixed.
The signals look fine to me. Any number of issues may not be visible from the picture. For example, are the grounds on the Arduino, TMC1294, and GP22 shared?
Hence connecting a pin to VIO seems odd to disable it ...
I'm not sure I understand. To clarify, this row in the datasheet:
says "If you don't actively use the pin EN_STOP1
, connect it to VIO". When you connect EN_STOP1
to VIO, STOP1
is always enabled.
Does your code set up to trigger off rising edge?
I don't know what code you are running. The example code in the example TDCtalk.ino
initially sets NEG_STOP1
to 1, which is falling edge. It shouldn't matter here, since your stop pulse has both a rising and falling edge.
Since the problem seems to be with registering any input at all, I would debug by trying the simplest possible program first (e.g, no calibration step).
Hi Leo Yes I have been running the example code TDCtalk.ino. It looks like I need to set bit 31 in Reg 6 - EN_ANALOG as soon as I did this I got responses on INT0 and what looks like sensible data from the output registers corresponding to the inter-pulse interval I can see on the scope. I didn't see enabling analog front end in your code nor the START_TOF opcode. How did you use the GP22 to measure TCSPC? In any event I am hopeful that Im on the right track now. I want to run the chip continuously at 40 kHz to process dynamic frequency modulation in air (what might normally be thought of nuisance noise) of an ultrasonic carrier. The specs say it can be run at up to 500 kHz in mode 1. Tim
It is odd that you would need to use Analog mode for a digital input, but I'm glad you have something working.
For TCSPC I had a digital pulse from a photon counting module (details).
Best of luck with the application.
Hi Leo and Tim, First of all thanks to Leo for this code. I am having similar issues to Tim with a GP-22 hooked up to an Arduino Nano. I also manage to see the measured resonator value in debug mode, so SPI is working. Testing with TTL pulses shifted to 3.3 V, I haven't been able to measure time delays between pulses (timeout error). I'm pretty sure that I'm missing the correct combination of settings of the EN_START and FIRE_IN settings and levels which match the TDCtalk example.
Could you provide the details of how you connected the non-SPI pins of the GP-22 evaluation board? Ideally for both Tim's inter-pulse delay scheme as well as Leo's TCSPC scheme? My aim is to measure delay times between two APDs, somewhat a mix of the two.
Thanks very much! Kevin
Hi Kevin, I probably can't be much help because it's been so long since I had the equipment and notes, but I will answer what I can.
Could you provide the details of how you connected the non-SPI pins of the GP-22 evaluation board?
The non-SPI pins on the eval board are
Int
: connect to an Arduino interrupt pin (pin 2 in my example).Reset
: leave unconnectedGND
: give groundLVL
: leave unconnectedVCC_in
: give 5VThat you "see the measured resonator value in debug mode" suggests these are connected properly.
Start
and Stop
inputs: application-dependent. In my case, Start
was the output of a photon counter and Stop1
was a reference square wave, with the Stop1
jumper in the Digital
position.EN Start
and EN Stop
: left unconnected. Note they are pulled high by the eval board.I'm pretty sure that I'm missing the correct combination of settings of the EN_START and FIRE_IN settings and levels which match the TDCtalk example.
I didn't use the FIRE_IN
connection at all; not sure what you mean.
Hi Leo,
thanks for the quick response. I realise that in fact I am using the GP-22 demo board (https://www.digikey.es/product-detail/en/ams/GP22-DEMO-MODULE/GP22-DEMOMODULE-ND/5405930), which has less easy access to the "Start" input, for example, therefore I suppose that your code may not readily run on that board. For that reason I was wondering how you had set up the FIRE_IN channel to externally start the TDC signal. I checked and saw that on this board, START is grounded permanently so it may not be suitable for my application in the end - it seems specific to ultrasonic flow measurement. I will see if I can adapt the code to trigger externally somehow or use two stop inputs + the internal start to measure.
Thanks again, Kevin
Hi Leo First - thanks for making the GP22 arduino code available. I would like to do something fairly simple : send a short 400 ns pulse to the START pin then some brief time later (eg 300ns (seen on the O-scope) send a similar pulse to STOP1 and measure the time difference. I am running the GP22 in Mode 1. I have the following set up
Tim