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. An alternative to getting good sound is to...

    An alternative to getting good sound is to measure the response and then fix it with equalization. Most flexible is with fast, partitioned convolution, but other methods work.

    I'll admit that I...
  2. Replies
    7
    Views
    121

    Yes, use an op-amp that is labeled "rail-to-rail...

    Yes, use an op-amp that is labeled "rail-to-rail input and output".
  3. > Does the reference ground also vary as a result...

    > Does the reference ground also vary as a result of SD card activity?

    Typically yes. But generically (T3.5?), this can be addressed by using differential inputs - one attached to ground at the...
  4. All your reading are proportional to the "3.3V"...

    All your reading are proportional to the "3.3V" rail. Which will vary with load.
  5. Start simplifying until the issue goes away. For...

    Start simplifying until the issue goes away. For example, what happens if you only write values to memory (no SD card involvement)?
  6. Replies
    498
    Views
    298,474

    OK, now step through your code in the case where...

    OK, now step through your code in the case where analogRead() returns 127 and then 128. What values do you get for pot_1 and what happens?
  7. Replies
    498
    Views
    298,474

    Say that analogRead() returns 127 and then 128. ...

    Say that analogRead() returns 127 and then 128. What do you expect your code to do?
  8. Replies
    8
    Views
    196

    +1 on never using sprintf(); use snprintf(). ...

    +1 on never using sprintf(); use snprintf().

    > for (int i = 0; i < numOflistOfSynthTypes; i++) {

    Don't bury array sizes down in the code. In most cases, should be more like:

    for (auto...
  9. Replies
    498
    Views
    298,474

    Two things: 1) take a few thousand samples and...

    Two things:

    1) take a few thousand samples and use an average or trimmed mean

    2) do a comparison more like "if ((new_ad + 32 < old_ad) || (new_ad > old_ad + 32)) ..."


    // take mean of...
  10. Possibly just by changing _heap_start and...

    Possibly just by changing _heap_start and _heap_end values to what would normally be unused stack space (above zeroed variables)? For some users, I'm sure the speed is more important than the heap...
  11. You can review your sampling rate and your need...

    You can review your sampling rate and your need for low frequency resolution to use less memory. Or go to something like a Raspberry Pi Zero.
  12. Whoops, I meant USB 3.0 port (on the PC end), not...

    Whoops, I meant USB 3.0 port (on the PC end), not USB-C.
  13. So if I connect the teensy to a USB-C port, then...

    So if I connect the teensy to a USB-C port, then there is at least .6A available for HATs and .3A for the teensy? With no need to cut the jumper on the teensy?
  14. Replies
    3
    Views
    222

    Yes, but I encourage your to measure how much...

    Yes, but I encourage your to measure how much yourself.
  15. Nice, I see it also has a power supply.

    Nice, I see it also has a power supply.
  16. Replies
    4
    Views
    192

    I'd time stamp all the values and store them in a...

    I'd time stamp all the values and store them in a FIFO buffer. Then it's easy to go through the FIFO and do any comparisons you want.
  17. I just tried it and it worked well. Much faster...

    I just tried it and it worked well. Much faster and passed all tests. But probably not fast enough for Dirk.
  18. Posting 10 examples of input and expected output...

    Posting 10 examples of input and expected output would be enough.

    Here is a int16_t table lookup that compiles and works in the Arduino environment. But in your case, a formula may be a better...
  19. Replies
    2
    Views
    202

    I would like to see a global flag that is set if...

    I would like to see a global flag that is set if any allocation ever fails.
  20. > values from about 1006.0f to about 2500.0f to...

    > values from about 1006.0f to about 2500.0f to 1-127

    I call this a 1D byte table. You should post the full table that you want to use - typically with more values in any non-linear portions....
  21. Yes. But I think you will find it difficult to...

    Yes. But I think you will find it difficult to figure out. Tell me more about your application and I'll make an example. 1D or 2D? What are the axis values and values in the table?
  22. Some code for 1D and 2D table lookups is here. ...

    Some code for 1D and 2D table lookups is here. You pass it either an X value or X&Y values and it returns an interpolated table value. It was designed so that the tables could be edited by...
  23. If speed isn't an issue, I agree with a curve...

    If speed isn't an issue, I agree with a curve fit. For high speed, I use table look-ups with interpolation. I could dig out that optimized code.
  24. Replies
    235
    Views
    25,309

    For me, a common use would be one core doing ...

    For me, a common use would be one core doing input and calculations and a second core handling high speed asynchronous output. They share a single, atomic ram variable but there is no...
  25. Replies
    235
    Views
    25,309

    As MCUs do more and more, their timing...

    As MCUs do more and more, their timing predictability (and probably code reliability) has been declining. Interrupts, DMA, cache misses, heap use, preemptive threads, etc. So I like the idea of a...
  26. Replies
    4
    Views
    224

    I have a related question - what is the fastest...

    I have a related question - what is the fastest possible clock rate? Ideally for the GPT.
  27. Replies
    27
    Views
    572

    Outputting a clock signal as a 17th bit in the...

    Outputting a clock signal as a 17th bit in the data is a good idea to reduce instruction count. Could delay it and use it with a clock doubler - so a single instruction per DAC output. Or output...
  28. Replies
    7
    Views
    323

    I tried using epoxy to make it stronger but it...

    I tried using epoxy to make it stronger but it ended up causing too many problems. Perhaps a small, never unplugged extender cable to provide strain relief?
  29. With enough time, oversampling and possibly...

    With enough time, oversampling and possibly repetition you might get the results you need from analog integration and then reading with an ADC. A known calibrating pulse just before a real pulse...
  30. Replies
    27
    Views
    572

    Seems clear to me that the plan is for the pulses...

    Seems clear to me that the plan is for the pulses and new parallel data to be continuously and synchronously output at high speed - by the T4. The MCU speed is crystal controlled, so maybe jitter...
  31. Replies
    27
    Views
    572

    With hardware assist, you could reduce it to a...

    With hardware assist, you could reduce it to a single statement (while still creating a pulse). I'm curious - what is the purpose of these very short pulses?
  32. > You mean the MCU's timer or a dedicated IC? ...

    > You mean the MCU's timer or a dedicated IC?

    Either one. The MCU's is better if it can do it.
  33. Replies
    8
    Views
    3,374

    What is the fastest rate (words/sec) that DMA can...

    What is the fastest rate (words/sec) that DMA can output?
  34. While it's great for detecting the occurrence of...

    While it's great for detecting the occurrence of very short pulses, note that it's not what you want to measure a 100 usec wide pulse accurate to 20ns.

    As Mark said, you could use a fast timer...
  35. You use both nano-seconds and micro-seconds, so I...

    You use both nano-seconds and micro-seconds, so I guess the former is the resolution you need. Consider using a teensy 4.0.
  36. Replies
    15
    Views
    278

    I'd check with volt and ohm meters.

    I'd check with volt and ohm meters.
  37. Replies
    7
    Views
    297

    My version is here: ...

    My version is here:

    https://forum.pjrc.com/threads/29105-Sub-Micro-Second-Pulses
  38. Thanks. I see similar here: ...

    Thanks. I see similar here:

    http://ww1.microchip.com/downloads/cn/AppNotes/cn586761.pdf
  39. Is it possible to get ~100 Mbps with ethernet...

    Is it possible to get ~100 Mbps with ethernet without magnetics? For example, can two teensy 4.1s be connected directly with a few inches of wire - rx to tx?
  40. Generically (as in not necessarily a T4/ESP32),...

    Generically (as in not necessarily a T4/ESP32), what is the feasibility of getting higher speed (perhaps 40 mhz), lower overhead (for one end, the other has to do bit-banging) and more flexibility by...
  41. You have checked pins for shorts to 3.3V and...

    You have checked pins for shorts to 3.3V and ground? There is no chance someone used some MKL04s not from PJRC? Decoupling capacitor is positioned correctly?
  42. Replies
    4
    Views
    177

    Seems to me that since the arduino IDE can...

    Seems to me that since the arduino IDE can (usually) cause a program update without a button press, such a feature could be (but isn't) included in the teensy loader.

    You could do updates with the...
  43. Why a pull-up on reset when none of the various...

    Why a pull-up on reset when none of the various examples have one?
  44. There isn't much needed for the PJRC boot loader...

    There isn't much needed for the PJRC boot loader to run. You could post your schematic and PCB layout.

    Also review everything here carefully:

    https://www.pjrc.com/store/ic_mkl02.html
  45. Replies
    7
    Views
    264

    You aren't the first custom teensy designer to...

    You aren't the first custom teensy designer to think that decoupling capacitors can be placed anywhere. Google with "decoupling capacitors pcb placement" should fix this.
  46. Replies
    7
    Views
    264

    I'd use a BOM, crystal layout and decoupling...

    I'd use a BOM, crystal layout and decoupling capacitor layout similar to what is here:

    https://gitlab.com/our-sci/reflectance-spec-PCB

    Or possibly here:
    ...
  47. Replies
    7
    Views
    264

    I'd post your PCB layout too. Crystal and...

    I'd post your PCB layout too. Crystal and decoupling capacitors can be important.

    Also the info here:

    https://www.pjrc.com/store/ic_mkl02.html
  48. Replies
    9
    Views
    399

    If you use 3.3V and the sensor gets unplugged,...

    If you use 3.3V and the sensor gets unplugged, nothing bad happens to the ADC. With higher voltages, the ADC will see the full supply voltage. So you need input protection, with a zener diode...
  49. Possibly the esp32 side has a too small buffer. ...

    Possibly the esp32 side has a too small buffer. Can you reliably send a short ascii string using similar code?
  50. Replies
    12
    Views
    627

    Interesting that the MISRA C coding standard...

    Interesting that the MISRA C coding standard doesn't allow the use of dynamic memory allocation. I believe that JPL/NASA does the same.
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4