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

Search:

Type: Posts; User: mborgerson

Page 1 of 3 1 2 3

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    147

    The SD write routines generally do not mask...

    The SD write routines generally do not mask interrupts for very long (a few microseconds??). Most of the SD write operations are carried out with DMA from file buffers to the SDC hardware. When...
  2. Replies
    4
    Views
    147

    It's a sad fact of life that micro-SD cards often...

    It's a sad fact of life that micro-SD cards often take 100mSec or more to complete a write on the occasions that the internal controller has to erase a block of flash. Since you seem to be...
  3. Replies
    12
    Views
    274

    I'm glad you got something working. Your...

    I'm glad you got something working. Your "Collect during yield" approach should work OK, since the SD routines will keep checking for data during the longer SD card write intervals.

    Note: If...
  4. Replies
    24
    Views
    798

    I can understand that. Serial.flush() starts a...

    I can understand that. Serial.flush() starts a series of USB transactions to send the data. How fast that can be done probably depends on how busy the computer on the other end of the USB cable...
  5. Replies
    24
    Views
    798

    To make that kind of decision you need to specify...

    To make that kind of decision you need to specify very carefully what you mean by 'accuracy'.

    If your sensor has significant output impedance, or you add an RC filter at the ADC input, if you...
  6. Replies
    24
    Views
    798

    I modified my sample code to use interleaved ADC...

    I modified my sample code to use interleaved ADC collection per jonr's sample code and added some timing data collection using the ARM cycle counter. I also tested with the resolution set to 12...
  7. Replies
    24
    Views
    798

    Note that the sample code writes the ADC data in...

    Note that the sample code writes the ADC data in binary format as a series of bytes. Part of the process of uploading the binary data would be to convert the series of binary bytes to human-readable...
  8. Replies
    35
    Views
    678

    Just out of curiosity I dug out a PCB with a...

    Just out of curiosity I dug out a PCB with a Linear Technology LTDC1867L and wired it up to a T4.1. I collected data at 1000 samples per second to check noise levels.

    Test Setup: T4.1...
  9. Replies
    35
    Views
    678

    It gets even worse when you try to write the data...

    It gets even worse when you try to write the data to an SD Card. Parts of the write cycle can involve short current spikes of 100mA or more. That puts a lot of stress on the Teensy's 3.3V...
  10. Replies
    12
    Views
    274

    I ran the posted example code overnight and it...

    I ran the posted example code overnight and it collected good data for about 16 hours.

    Once you get the GPS collection and file open/close stuff under control, you can start to work on the really...
  11. Replies
    12
    Views
    274

    The generic logger code and examples were posted...

    The generic logger code and examples were posted in the "Project Guidance: forum a month or two ago. You can search for "generic data logger:.

    Here is a mod of your code that I've simplified a...
  12. Replies
    12
    Views
    274

    You do not need to open and close your file each...

    You do not need to open and close your file each time you write to it. Your code should look more like this:




    file myFile;
    void setup(){
    // generate initial file name, start timers, etc....
  13. Replies
    86
    Views
    2,419

    I haven't worked with external card readers on...

    I haven't worked with external card readers on the T4.0. I got out my binocular microscope, finest tweezers and soldering tip and coerced a micro-sd card socket to bond with the misfit pads on the...
  14. Replies
    86
    Views
    2,419

    Here is a link to the MTP library I am using. I...

    Here is a link to the MTP library I am using. I haven't posted it before because you have to edit some of the core USB libraries to get it to work. If you've gone through that before, you should...
  15. Replies
    86
    Views
    2,419

    I've attached a zip file with the latest...

    I've attached a zip file with the latest incarnation of the generic data logger. It has been updated to allow the use of more than one logger object in a program. I have added an example that...
  16. Replies
    86
    Views
    2,419

    With some simple mods to the generic logger, I...

    With some simple mods to the generic logger, I am now able to use two logger objects to save data to two different files at different collection rates. Apparently, SDFat 2.0B has no problems having...
  17. Replies
    86
    Views
    2,419

    Your comment that some applications really don't...

    Your comment that some applications really don't fit the timer-based buffering and storage model is spot on. The GPS logger is really a bit of a stretch. It might be be better done by increasing...
  18. Replies
    86
    Views
    2,419

    I've considered the possibility of...

    I've considered the possibility of event-triggered logging, and I think it could be implemented with a modification of the solar logger example. For event-triggered logging, the attached binary...
  19. Replies
    86
    Views
    2,419

    Sorry about the delay in response to...

    Sorry about the delay in response to questions---but I was on a camping trip where I tested a version of the data logger software to collect GPS data. GPS collection is a bit of a PITA in that you...
  20. Replies
    1
    Views
    86

    I suggest that you be very cautious when you try...

    I suggest that you be very cautious when you try to run multiple devices at high speeds on the same SCK line. The capacitive loading of many connected devices has caused problems for other users.
  21. Replies
    321
    Views
    41,176

    This afternoon I did some tests in a common data...

    This afternoon I did some tests in a common data logger configuration:

    * Logger is powered by an external power supply.
    * The trace on the bottom of the Teensy that connects USB 5V to VIN is...
  22. Replies
    321
    Views
    41,176

    Buried in the code for the base FSFile type is...

    Buried in the code for the base FSFile type is the following:


    /** The parenthesis operator.
    *
    * \return true if a file is open.
    */

    operator bool() {return isOpen();}
  23. Replies
    321
    Views
    41,176

    Integrating MTP Responder into Data Logger application

    I have taken the first steps toward integrating the MTP responder into my generic data logger application. One thing that was apparent early on was that having the data logger and the MTP...
  24. 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...
  25. 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...
  26. Replies
    86
    Views
    2,419

    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...
  27. Replies
    17
    Views
    533

    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...
  28. Replies
    86
    Views
    2,419

    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...
  29. Replies
    86
    Views
    2,419

    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...
  30. Replies
    86
    Views
    2,419

    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?
  31. Replies
    86
    Views
    2,419

    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...
  32. Replies
    86
    Views
    2,419

    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...
  33. Replies
    86
    Views
    2,419

    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...
  34. Replies
    86
    Views
    2,419

    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...
  35. Replies
    86
    Views
    2,419

    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...
  36. Replies
    86
    Views
    2,419

    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...
  37. Replies
    86
    Views
    2,419

    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...
  38. Replies
    86
    Views
    2,419

    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...
  39. Replies
    86
    Views
    2,419

    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...
  40. Replies
    17
    Views
    533

    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...
  41. Replies
    17
    Views
    533

    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...
  42. Replies
    6
    Views
    280

    There was another thread about connecting to...

    There was another thread about connecting to multiple SPI devices sometime in the last few months.:...
  43. Replies
    86
    Views
    2,419

    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...
  44. 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...
  45. 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...
  46. 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...
  47. Replies
    17
    Views
    533

    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...
  48. 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...
  49. [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...
  50. Replies
    5
    Views
    159

    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...
Results 1 to 50 of 123
Page 1 of 3 1 2 3