Recent content by JBeale

  1. J

    More clarity on SPI.h licensing terms

    "The Free Software Foundation urged developers to choose or any later version..." [gnu.org] but if developers did not so choose, are the terms not precisely as they are written? While FSF may consider it bad, I'm not sure I see an ambiguity in that language itself. If there is ambiguity, it...
  2. J

    measuring pulse width (not position) with best resolution?

    On the T3.2, the large numbers near 4M would make sense if instead of + pulse width, it was counting - pulse width (duration from falling edge to next rising edge). It works out to be about right for the typical interval between pulses, which often come about 10 to 20 per second.
  3. J

    measuring pulse width (not position) with best resolution?

    Update: I found my T4.1 board and ran the same code on it, with the same source signal of pulses. The T4.1 has higher resolution by counting a faster-running clock. It still has the too-large-number glitches described above, but they are far more rare; only two cases out of over 30000 samples...
  4. J

    measuring pulse width (not position) with best resolution?

    In case of interest, here's a histogram of pulse lengths captured by the above code. In this case, pulse length is some function of gamma ray energy, and the rightmost peak around 580 counts on the horizontal axis is due to a small Cs-137 test source emitting gammas near my detector. The...
  5. J

    measuring pulse width (not position) with best resolution?

    I'm wondering if you might comment on what I'm seeing. I have pulses typically around 5 microseconds in length, on average about 20 of them per second, but each one arrives at a truly random time (this is a gamma scintillator, timing is random like a geiger counter). My code nominally works as...
  6. J

    measuring pulse width (not position) with best resolution?

    Very helpful, thank you! It appears I am looking for the MARK version:
  7. J

    measuring pulse width (not position) with best resolution?

    I'm wondering if there is some example Teensy 4 code that demonstrates how to measure a positive-going pulse width (as distinct from either pulse position, or frequency) with the best available accuracy, which I presume would mean hardware input capture to avoid uncertain interrupt latencies. In...
  8. J

    AD7124 code example at maximum speed

    Here is some measured data on noise performance at Gain = 1. I was looking at RMS noise on Ch.0 (differential input pins AD0 and AD1) with 10 ohms across them. The high side goes through 10k to the Vref Out of the chip (2.5 V) and the low side goes through 10k to ground. So I have R1, R2, R3 in...
  9. J

    AD7124 (24-bit ADC) and epsilonRT library : how fast will it go?

    Just for reference, today I made a sketch without using any library beyond the plain SPI device, that does achieve 19.2 kHz reads with this chip. That post is here: https://forum.pjrc.com/threads/71064-AD7124-code-example-at-maximum-speed
  10. J

    AD7124 code example at maximum speed

    I'm sure people have done it, but I did not find a code example to demonstrate using the 24-bit ADC chip AD7124 in its "continuous read" mode at the maximum speed. Normally the data is read out by first putting the 0x02 data register address into the COMMS register for each read, but in the...
  11. J

    AD7124 (24-bit ADC) and epsilonRT library : how fast will it go?

    experiment with removing 1 msec delay I was able to get 4.4 kHz readout at a filterWord of 2, by simply removing the 1 msec delay in ad7124-private.cpp Ad7124Private::waitForSpiReady and waitForConvReady Using the simple continuous read mode would get you faster still, but this is actually...
  12. J

    AD7124 (24-bit ADC) and epsilonRT library : how fast will it go?

    detailed timings on AD7124 SPI bus In case of interest, my Saleae logic analyzer says the reading loop in my test code goes like this, on the SPI bus: 1) wait a millisecond 2) read the 1-byte status register 0x00 (3 bytes, 25.4 usec) 3) wait a millisecond 4) read the 3-byte error register...
  13. J

    AD7124 (24-bit ADC) and epsilonRT library : how fast will it go?

    Thanks for having a look Paul. Still can't believe how much of your life must be debugging random other people's problems. Yes, that's the one I'm using, AD7124-8. Good point about the SPI clock, I think the chip can take SCLK up to 5 MHz (minimum t3 = t4 = 100 ns). Also, the chip has a...
  14. J

    AD7124 (24-bit ADC) and epsilonRT library : how fast will it go?

    I'm just curious if anyone has used this AD7124 24-bit ADC at higher data rates, for example 1 kHz or above. The Analog Devices AD7124 datasheet claims it is capable of sampling rates up to 19200 sps. Using the "continuous conversion" mode and whether or not I wait for a sample to complete, I...
  15. J

    Teensy 4.1 NTP server

    Here is a plot of my Teensy's onboard crystal drift during 34 hours after a restart. (At least, I think this TeensyNTP-reported value is the onboard clock drift). Total change over that time was less than 0.4 PPM so that looks reasonably stable to me. The data plotted comes from running curl...
Back
Top