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

Search:

Type: Posts; User: mborgerson

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. I am using SDFat 2.0b. I installed the latest...

    I am using SDFat 2.0b. I installed the latest version today---which still wants to include Time.h somewhere in the Fcntl.h chain. Fcntl.h is used by default in SDIOConfig.h in SDFat 2.0b on ARM...
  2. Warnings to use Timelib.h instead of Time.h

    These warnings started popping up in my generic data logger code after the install of Teenysduino 1.52. I finally tracked down the source of these warnings to the fact that SDFat 2.0b includes the...
  3. Replies
    47
    Views
    661

    I note that all the errors shown post #37 above...

    I note that all the errors shown post #37 above occur when the buffer pointer is ~0x70E12400. I think this is in the memory range occupied by the 2nd PSRAM, which is soldered onto pads normally...
  4. Replies
    17
    Views
    328

    The problem with all these proposals are some...

    The problem with all these proposals are some things I hadn't yet considered:
    1. Many speakers that have adequate output at 500 to 2500Hz are an inch or two in diameter. The resulting audio output...
  5. Replies
    47
    Views
    661

    Hmm, if the issue is something happening at...

    Hmm, if the issue is something happening at interrupt time, then increasing the IntervalTimer priority might have an effect. I think I will also
    investigate the code for reading the...
  6. Replies
    47
    Views
    661

    Errors that pop up just a few times in millions...

    Errors that pop up just a few times in millions of records are hardest to troubleshoot.

    I can think of several reasons that things like this might happen:

    * Something strange in interrupt land...
  7. Replies
    47
    Views
    661

    Another thought just occurred to me: How does...

    Another thought just occurred to me: How does the PSRAM handle storage of 33-byte structures? Is there some mechanism unknown to me that doesn't cope well with odd-sized writes?
  8. Replies
    47
    Views
    661

    Thanks for the notes. 1. I'll definitely...

    Thanks for the notes.

    1. I'll definitely check for proper spelling of file names. Windows HAS made me a bit lazy in that respect.

    2. A 33-byte packed structure??? I've always avoided...
  9. Replies
    47
    Views
    661

    This update to the data logger has the following...

    This update to the data logger has the following changes:

    1. Used method proposed by @defragster to avoid blocking interrupts on every call to CheckLogger.

    2. Added code which checks free...
  10. Replies
    47
    Views
    661

    On the subject of SD Cards: Five to 10 years...

    On the subject of SD Cards:

    Five to 10 years ago, I used a lot of SanDisk cards with good results. Then about five years ago SanDisk cards started getting counterfeited on a large scale. A...
  11. Replies
    47
    Views
    661

    I'll work over these issues today: 1. type...

    I'll work over these issues today:

    1. type casts to make sure the buffer needed calculation is done with uint64_t internally.
    2. Investigate ways to handle "disk Full" situations. The logger...
  12. Replies
    47
    Views
    661

    Here is an update library source and some new...

    Here is an update library source and some new examples that illustrate file playback. One program is designed to log timing data very quickly on a T4.1, then verify that no records were skipped...
  13. Replies
    47
    Views
    661

    Xfer and defragster: I took your comments to...

    Xfer and defragster: I took your comments to heart and made the following changes:

    1. The internal calculations for the buffer size now use a uint64_t and check for values out of the uint32_t...
  14. Replies
    47
    Views
    661

    The calculation of bufferneeded does need some...

    The calculation of bufferneeded does need some work. Your example of:

    bufferneeded = ((structsize * collectionrate ) / 1000) * mSecLen;

    Is OK for very fast collection, but will return zero...
  15. Replies
    47
    Views
    661

    I'll be trying out some of the T4.1 tests later...

    I'll be trying out some of the T4.1 tests later today. I got the headers and PSRAM chip soldered on yesterday, so the hardware is ready to go.

    I agree that there should be some way to verify...
  16. Replies
    47
    Views
    661

    First release of DataLogger class

    The DataLogger class provides the collection, buffering and storage elements for a generic data logging application. It has the following characteristics:

    * A user-defined storage structure...
  17. Replies
    17
    Views
    328

    I just caught on to the fact that you want to...

    I just caught on to the fact that you want to measure the distance between the microphone and the speaker. That's somewhat easier than the problem I was working on: measuring the distance from the...
  18. Replies
    17
    Views
    328

    I think you're out of luck trying to measure with...

    I think you're out of luck trying to measure with 1mm resolution using sound at frequencies below 100KHz. Given that the speed of sound is about 343mm/millisecond,
    one mm resolution means a time...
  19. Replies
    6
    Views
    163

    There was another thread about connecting to...

    There was another thread about connecting to multiple SPI devices sometime in the last few months.:...
  20. Replies
    47
    Views
    661

    Generic data logger object

    After posting some example data logger code in other threads, I have decided to try to write a generic logger object which can become the basis of a data logger library.

    One of the first things I...
  21. I've included an updated version of the timing...

    I've included an updated version of the timing logger. This one has a single #define USE_EXFAT
    and some #ifdefs sprinkled through the code where there are differences between SD file access and...
  22. Wow! Those long times at 44810 and 131850...

    Wow! Those long times at 44810 and 131850 indicate that there must be some significant block erase and remap times. The faster times on the low end (~11-12mSec) show the increased speed of the T4.1...
  23. Since I was less than complimentary about the...

    Since I was less than complimentary about the capabilities of that simple logger example, I decided to add some code to back up my comments.

    The following data logger example has the elements I...
  24. Replies
    17
    Views
    328

    The major problem with your code is that you are...

    The major problem with your code is that you are waiting 50milliseconds after your tone starts and then starting to read the ADC values, but you don't really know the phase relationship between your...
  25. This data logger is missing so many of the...

    This data logger is missing so many of the elements of a true data logger that it really doesn't deserve the name "data logger"---but that's another discussion altogether.

    The intermittent longer...
  26. [QUOTE=martianredskies;237898]I had an idea that...

    [QUOTE=martianredskies;237898]I had an idea that an ongoing forum post containing little optimization tricks might be a benefit to the community, and just an interesting read overall. Certainly there...
  27. Replies
    5
    Views
    107

    As you have discovered, a single-precision float...

    As you have discovered, a single-precision float is only good to about 7 significant figures. That's due to the limitations of having only 23 (or 24, depending on normalization) bits for the...
  28. If you want data read, transmitted and received...

    If you want data read, transmitted and received with low jitter, you should probably consider collecting your data with an IntervalTimer, accumulating a buffer with a number of time-stamped...
  29. Replies
    12
    Views
    345

    I see KurtE's point about maintaining multiple...

    I see KurtE's point about maintaining multiple files. We should all remember that these #ifdef issues apply primarily to library code and need not pop up in a user program for a particular...
  30. Replies
    12
    Views
    345

    Thanks for that. To twist another oft-used...

    Thanks for that. To twist another oft-used trope: You can take the programmer away from the sea, but you can't take the sea away from the programmer. Between my Navy years, my oceanography years,...
  31. Replies
    12
    Views
    345

    A potential problem with vsCode and other such...

    A potential problem with vsCode and other such smart editors is that, for a Teensy library, the processor isn't defined in the library file, but in a board file that is selected by Arduino when you...
  32. Replies
    12
    Views
    345

    Adrift in a sea of #ifdefs

    I have 4 different models of Teensy (3.2, 3.5, 3.6, 4.0) and they have all provided many hours of educational and interesting hardware and programming projects. There are lots of excellent...
  33. Replies
    4
    Views
    200

    printf() and sprintf() are not C++ functions. ...

    printf() and sprintf() are not C++ functions. They are documented in my original K&R "The C Programming Language" from 1988. As long as you have the C stdio library, you can use the
    ...
  34. Replies
    4
    Views
    200

    My first advice would be: Don't open and close...

    My first advice would be: Don't open and close your file every time you write to it. Opening and closing can consume a lot of CPU cycles and are not really necessary in the loop().

    Instead,...
  35. While browsing though the source for the timers...

    While browsing though the source for the timers and ADCs, I think I saw something about the ADC Setup changing some system clock dividers to allow the higher sampling rates. Perhaps changing the...
  36. Another possibility is to find a 'quiet spot' in...

    Another possibility is to find a 'quiet spot' in your processing scheme and do your ADC sampling at that time. One way to do this might be to take the ADC samples just before you start your SPI...
  37. Your quest for better than 10 effective bits on...

    Your quest for better than 10 effective bits on the T4.0 ADC is probably doomed to failure with the setup you have. There are a number of reasons for this pessimistic view:

    1. You will never...
  38. Replies
    3
    Views
    226

    There's some apparent conflict in the description...

    There's some apparent conflict in the description you provide. You say

    If you are using the micro-SD slot on the T3.5, it is not intended to be used as an SPI bus device. It should be...
  39. Replies
    10
    Views
    405

    If using SPI flash turns out to be too much of a...

    If using SPI flash turns out to be too much of a problem, you might consider this approach:

    Create a one GByte pre-allocated contiguous EXFat file and treat it like a 1GB flash.
    Once you have...
  40. Replies
    10
    Views
    405

    Until you can sort out the SPI flash situation, ...

    Until you can sort out the SPI flash situation, I suggest that you use the SDFat 2.0 beta and format your SD card as an EXFat device. If you then write your sound files as contiguous files, the...
  41. Replies
    5
    Views
    429

    This afternoon's project was to see if the...

    This afternoon's project was to see if the 1MSample example could be modified to log the 1MSample ADC values to an SD Card. Some time ago, I coerced a micro SD socket into clinging to the bottom of...
  42. Replies
    5
    Views
    429

    Thanks for providing this morning's "stay at...

    Thanks for providing this morning's "stay at home and stay busy" project.

    This code worked fine for recording at 10KHz sine wave. It's a bit too simplified to be up to my professional...
  43. Replies
    13
    Views
    531

    JarkkoL's example is a strong argument for the...

    JarkkoL's example is a strong argument for the "Always post complete source code" warning at the top of the forum. With access to the source JarkkoL and others could certainly spot potential...
  44. Unless you are using a micro-sd card >= 32GB,...

    Unless you are using a micro-sd card >= 32GB, Windows and the standard SDFAT formatter will not format the card as EXFat. You can use the EXFat formatter that is part of the SDFat beta to format any...
  45. Here is my test sketch and the results. The...

    Here is my test sketch and the results.
    The input was a signal generator set to produce a square wave alternating between -1.5 and +1.5V at about 9.8Hz
    ...
  46. In answer to your question: I don't think...

    In answer to your question:


    I don't think it empties the internal cap, but it does siphon off some of its charge to the internal capacitors.

    I think you can use a simple circuit like this:...
  47. Sorry about the error in the power dissipation...

    Sorry about the error in the power dissipation calculation. I should have caught that, especially since I've been using a high-side current sensor based on the Max 471 to do measurements of Teensy...
  48. Replies
    3
    Views
    421

    The Teensy 4.0 doesn't have any capability to use...

    The Teensy 4.0 doesn't have any capability to use anything except V3.3 as the analog reference. If you need better results, you'll need an external ADC.

    Various earlier posts say that the T4.0...
  49. Wow! 150mA across a 10-0hm resistor is going to...

    Wow! 150mA across a 10-0hm resistor is going to dissipate 1.5Watts at full scale. I hope that resistor is big and temperature-stable.

    If you have access to that part of the circuit, you might...
  50. Replies
    6
    Views
    291

    Have you looked over this explanation of digital...

    Have you looked over this explanation of digital envelope detectors: https://www.dsprelated.com/showarticle/938.php

    It seems that you just need access to the signal to do a full-wave...
Results 1 to 50 of 100
Page 1 of 2 1 2