Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: jonr

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Note that the typical motorcycle voltage...

    Note that the typical motorcycle voltage regulator works by shorting out the alternator. But I think enough of the waveform will remain for this to work. Circuit looks OK to me.
  2. +1 for starting with the library here: ...

    +1 for starting with the library here:

    https://github.com/epsilonrt/ad7124
  3. One could use a double or a "long long bin 32"...

    One could use a double or a "long long bin 32" fixed point for the period and counter - but this only reduces, not eliminates error accumulation.

    So +1 on resetting the counters to be in perfect...
  4. Here is code that show how simple it can be to...

    Here is code that show how simple it can be to create two waveforms. Note that if you have two waveforms of the same frequency and continuously shift phase, then one can't be a 50% duty cycle...
  5. Thread: Teensy 16bit ADC

    by jonr
    Replies
    35
    Views
    677

    In some more testing, Teensy 4 ADC performs...

    In some more testing, Teensy 4 ADC performs better than Teensy 3. At 4096x oversampling with median (not mean), short term, stable temperature results are good.
  6. The thread library would allow simple looking...

    The thread library would allow simple looking code and for other tasks to run.
  7. Looks like it refreshes in the short intervals...

    Looks like it refreshes in the short intervals where CE# is high between operations. If so, then nothing to worry about.
  8. Sounds like you need input from Paul :-). ...

    Sounds like you need input from Paul :-).

    Don't know, but 3 usec seems like long enough to do many checks, including operation of a 16mhz crystal.

    I am curious if the duration of reset can be...
  9. > low for about 75us Is this the same for good...

    > low for about 75us
    Is this the same for good and bad boards? If so, I think it suggests that the bootloader is successfully programming the MK66. You could dig deeper to verify.

    Failure to...
  10. Replies
    7
    Views
    188

    If you want some things to continue and others to...

    If you want some things to continue and others to be delayed, consider using threads.

    > It is sometimes hard to know exactly how to answer

    Yes, kudos to the experts that spend valuable time...
  11. Replies
    19
    Views
    208

    +1 on DMA for fast digital outputs, even with...

    +1 on DMA for fast digital outputs, even with multiple pins.

    > with analog input on a fourth?

    Likely to be a problem at the rates you want. Consider the Teensy 4.
  12. Thread: Teensy 16bit ADC

    by jonr
    Replies
    35
    Views
    677

    An external 16bit ADC I've used has a standard...

    An external 16bit ADC I've used has a standard deviation of .5 count and a peak-to-peak of 1 count - with no averaging. With about 16000x oversampling over short periods, I got there with a...
  13. Replies
    19
    Views
    208

    > Is there a way to reliably run a routine at 0.5...

    > Is there a way to reliably run a routine at 0.5 usec intervals on a Teensy 3.2

    You can always turn off interrupts and poll ARM_DWT_CYCCNT. Jitter will be quite low.
  14. Replies
    8
    Views
    226

    A little more testing of EXTMEM speed. Writing...

    A little more testing of EXTMEM speed. Writing up to 48 uint16s was as fast as ram.
  15. Replies
    8
    Views
    226

    > access may be slower I did a quick test of...

    > access may be slower

    I did a quick test of initializing an array of 200,000 uint16s and it was 23 times slower.
  16. Replies
    24
    Views
    798

    I implemented the sampling using polling of...

    I implemented the sampling using polling of ARM_DWT_CYCCNT with interrupts off and while jitter was normally < 2nsec, it had occasional huge jitter - I think the ADC routines turn interrupts back on...
  17. Replies
    24
    Views
    798

    Say one wants the best possible accuracy within...

    Say one wants the best possible accuracy within some amount of time. Is there a process other than "test all combinations" to find the optimal ADC settings?
  18. Replies
    15
    Views
    273

    I believe that Serial.flush() after a print is...

    I believe that Serial.flush() after a print is the best thing to use for debugging.
  19. Replies
    24
    Views
    798

    That's a good summary. Some glitches at 1Mhz...

    That's a good summary. Some glitches at 1Mhz leads to "so how fast can it go". With interleaving, more than fast enough to always complete even with some interrupt jitter.
  20. Replies
    24
    Views
    798

    Whoops, my code in #11 isn't right. To...

    Whoops, my code in #11 isn't right. To interleave the ADCs, it should read from adc0 and immediately start another on adc0 (not adc1). And vice versa.

    Done right, I get 2.55 Msps with...
  21. Replies
    24
    Views
    798

    Interesting. Once I added code to detect...

    Interesting. Once I added code to detect incomplete conversions, I got occasional errors, even at rates that should be possible. Ie, interval timer doesn't guarantee that it won't be called with...
  22. Replies
    24
    Views
    798

    Here is an example of alternating to allow twice...

    Here is an example of alternating to allow twice the speed. Would be better if it verified (vs assumed) that AD conversion was complete.


    void ADCChore(void) {
    static unsigned flipflop = 0;
    ...
  23. Replies
    24
    Views
    798

    > ADMARHI to ADMARKLO takes about 180nS at 600MHz...

    > ADMARHI to ADMARKLO takes about 180nS at 600MHz

    But this says nothing about how long a conversion takes to complete. I find that they take about 1.1 usec - so I think your code is over-reading...
  24. Replies
    24
    Views
    798

    Do some analysis of the data - its likely that...

    Do some analysis of the data - its likely that you will want to use some different settings and both ADCs to get the accuracy that you would expect from 8 bits. Even "12 bits" is possible.

    >...
  25. Thread: Teensy 16bit ADC

    by jonr
    Replies
    35
    Views
    677

    I did some testing and on a T3.1, I get up to 3...

    I did some testing and on a T3.1, I get up to 3 bits (as in 13 bit accurate) of random offset error between reboots, which no amount of oversampling has an effect on. Seems to be related to noise...
  26. Replies
    479
    Views
    291,482

    > trying to do calculations while waiting for...

    > trying to do calculations while waiting for conversions

    Yes, it makes sense to do calculations on A2,A3 values after starting a read on A0,A1. And vice versa.

    > ADC0 will read sensor A0 ......
  27. > What do I search on google to learn more about...

    > What do I search on google to learn more about this??

    Maybe you don't want to go quite this far, but a great way to learn about circuits is to type them into LTSpice and and try things and see...
  28. Thread: Teensy 16bit ADC

    by jonr
    Replies
    35
    Views
    677

    Agreed. If you expect to calibrate and then get...

    Agreed. If you expect to calibrate and then get 16 bit accurate readings a week later, then you need to test over a similar time period and variations in conditions. Don't take a msec of data and...
  29. Thread: Teensy 16bit ADC

    by jonr
    Replies
    35
    Views
    677

    That's similar to the 15.5 bits I got with a good...

    That's similar to the 15.5 bits I got with a good external ADC running from a battery.
  30. Thread: Teensy 16bit ADC

    by jonr
    Replies
    35
    Views
    677

    > If the signal has random uncorrelated white...

    > If the signal has random uncorrelated white noise

    Which based on my tests (good results to a point and then it gets no better), it isn't. But it was a different teensy setup. so I'm curious...
  31. Thread: Teensy 16bit ADC

    by jonr
    Replies
    35
    Views
    677

    > Can you give me an example of how this is done?...

    > Can you give me an example of how this is done?

    Second that - let's see a program and output yielding 16 bit results from a teensy with 256x oversampling.
  32. Thread: Teensy 16bit ADC

    by jonr
    Replies
    35
    Views
    677

    > if you average 256 times, you gain 4 bits ...

    > if you average 256 times, you gain 4 bits

    Only if the noise is high freq, white noise - and it often isn't either one. Go ahead, try it.
  33. > havenít used all of the decoupling caps I...

    > havenít used all of the decoupling caps

    I don't have definitive data, but I think they are necessary.

    Not sure that the crystal will work without a PCB.
  34. Thread: Teensy 16bit ADC

    by jonr
    Replies
    35
    Views
    677

    Unless you happen to synchronize perfectly, 1Hz...

    Unless you happen to synchronize perfectly, 1Hz noise doesn't average out if you average over anything close to 1 second.
  35. Thread: Teensy 16bit ADC

    by jonr
    Replies
    35
    Views
    677

    > can increase the effective number of bits in...

    > can increase the effective number of bits in some circumstances.

    Exactly - I once tried it with a teensy and averaging only helped somewhat - it stopped providing improvement after a point far...
  36. Thread: Teensy 16bit ADC

    by jonr
    Replies
    35
    Views
    677

    No teensys have have 16 bit ADC.

    No teensys have have 16 bit ADC.
  37. Thread: Teensy 16bit ADC

    by jonr
    Replies
    35
    Views
    677

    Amazon and Ebay have many that can be made to...

    Amazon and Ebay have many that can be made to work as a separate board wired to a teensy. But has anyone actually measured 16 bits of SNR from such a module?
  38. Replies
    4
    Views
    257

    I tried it and variations in "time-to-change"...

    I tried it and variations in "time-to-change" also detects shorts to another pin, even with no change to the length of the connected wire. Since both pins change timing, which input pin it is...
  39. Replies
    4
    Views
    257

    Thanks, that's a good idea to look for shorts. ...

    Thanks, that's a good idea to look for shorts.

    On a T4, this code can detect whether or not a pin has < 1 inch of wire connected to it.


    for (register int i = 0; i <= 33; ++i) {

    ...
  40. 100 ohm resistors (for a total of 800 ohms) will...

    100 ohm resistors (for a total of 800 ohms) will be more stable than 1K. Also make sure that the front and rear buss bars don't vary in voltage.
  41. Replies
    4
    Views
    257

    Software to debug teensy hardware

    I design/build custom circuits, some use teensy modules and some are custom designs based on the same MCU/bootloader. Not surprisingly, there can be yield issues and a few don't work. So I'm...
  42. I added a PSRAM chip today and your program...

    I added a PSRAM chip today and your program reports 8Mbyte. That leaves bad soldering, a bad chip, orientation, location, ??
  43. Replies
    91
    Views
    20,672

    Since flash_wait() is Paul's core code, I'll...

    Since flash_wait() is Paul's core code, I'll follow his lead and not change code to work around what appears to be a compiler issue. For now, note that you may need different optimization settings...
  44. If noise is a concern, make it fully differential...

    If noise is a concern, make it fully differential (preamplifier and ADC). Treat both lines exactly the same (actives, passives, routing, etc). Actually achieving > 16 bits is not so easy.

    The...
  45. Replies
    5
    Views
    181

    Perhaps someone could comment as to whether 100K...

    Perhaps someone could comment as to whether 100K in series plus the internal diodes would adequately protect the input.
  46. Replies
    2
    Views
    188

    Depends on how much current you expect to draw -...

    Depends on how much current you expect to draw - but matching the physical size and 100Mhz rating of the teensy ones is a reasonable choice.

    Physically larger sizes will provide more noise...
  47. Can you share some specifics wrt cpu and memory?...

    Can you share some specifics wrt cpu and memory?

    My understanding is that as you use less taps, you lose resolution in the low frequencies. Depends very much on what you want to do, but I use...
  48. I'm curious as to why 16 bit linear isn't enough...

    I'm curious as to why 16 bit linear isn't enough - it's all the range you can hear in most environments.

    If you do non-linear analog->digital, make sure the processing is stable and sufficiently...
  49. Replies
    8
    Views
    336

    Nice. I suggest sticking with the T4 - same...

    Nice. I suggest sticking with the T4 - same price and it's likely that with future features, speed is helpful.
  50. Replies
    13
    Views
    329

    Something like this: ADC::Sync_result sr; ...

    Something like this:


    ADC::Sync_result sr;

    adc->adc0->setAveraging(1); // set number of averages
    adc->adc0->setResolution(12); ...
Results 1 to 50 of 494
Page 1 of 10 1 2 3 4