M
Reaction score
34

Latest activity Postings About

    • M
      I cloned the file because the original has no header that I could find and trying to call it caused compilation errors. I tried a few work-arounds that didn’t work to allow me to call the function. A major problem is that the file defines the...
    • M
      It turns out that you can generate a 32MHz output with accuracy as good as the clock on the Teensy. The key to getting exactly 32MHz is to set the F_CPU to a frequency that, when divided by 4, is an even multiple of 32MHz. I picked 768MHz...
    • M
      Will that actually generate a 32-MHz Signal. I thought all the PWM frequencies had to be 150MHz divided by an integer. It's getting late and there are rumbles of thunder here, so I'm going to shut down the computers. I'll try some test code...
    • M
      How to generate a 32MHz square wave on pin 1: analogWriteFrequency(1, 32000000); // 32 MHz analogWrite(1, 128); // 128 / 256 = 50% duty cycle
    • M
      Just out of curiosity, what camera are you using that can send 200 frames per second?
    • M
      This seems like a good fit for the USB Test and Measurement Class (USBTMC) software I was working on last winter. That driver allowed a T4.1 using the USB Host interface to control and receive high-speed data over USB. I got as far as having...
    • M
      Is that one sector per file, or one sector for all open files?
    • M
      This post bothered me in that I was pretty sure that I have been able to have one file open for reading and another open for writing and was able to do a read-modify-write operation. I couldn't find that code, so I wrote a test program that...
    • M
      I've been a fan of the Samtec SSQ line of sockets for a couple decades now. When I started ordering more than a few parts, I found Samtec to be very small-business-friendly. I still have a few dozen socket strips left from production runs...
    • M
      While working on my driver for the FLIR Lepton 3.5, I've run into an issue with the library I'm using to control the camera through the I2C interface: LeptonSDKEmb32OEM. Example enum and structure: // a typical enum typedef: typedef enum...
    • M
      If you search the forums for "analog comparator" you'll find examples of the use of the hardware comparators to add hysteresis to an input signal. @FrankB contributed an example that uses two resistors to allow greater hysteresis than is...
    • M
      50K lines per second is pretty impressive for a CSV recorder. What do you use to examine the file after you've recorded a minute of data? By that time you've got about three times the row limit for Excel! I was stuck in the CSV format for many...
    • M
      mborgerson replied to the thread Humidity issues.
      There are plenty of connectors that not only handle salty air, but seawater immersion to hundreds of meter depth. I've designed loggers using them for more than 40 years. The type with which I'm most familiar is the SEACON All-Wet line...
    • M
      Which reinforces the point that, when logging more than a few values, save the data in binary format. You’ll save processor time and storage space. If the data later needs more processing, you’ll save time and avoid loss of precision as well...
    • M
      I suspect that any export restrictions may be related to the cryptographic hardware functions. Those functions are not documented in the standard data sheets. IIRC, you have to sign an NDA to see the specs for those hardware modules. I think...
    • M
      Using printf() or sprintf() inside an ISR sounds risky to me. I think it would be better to store the binary values in the buffer and do the sprint() or printf from loop(). That would free up more time in the ISR also. Eliminating the ADC...
    • M
      In this post from 2023 I demonstrated that very long delays are possible using a buffer on SD card on a T4.1. https://forum.pjrc.com/index.php?threads/long-audio-delays-using-sd-card.72186/ I haven’t followed up on this capability as I’ve been...
    • M
      There were reports several years ago that the Wire library did not play well with other devices that generate lots of interrupts. Two ADCs interrupting 3000 times per second may be enough to mess with Wire transmissions. Getting the Crash...
    • M
      mborgerson replied to the thread Long time log on SD card.
      This example is very useful for its code to set up and use a USB thumb drive for storage. However, it has some limitations that will need to be addressed to convert it to a long-term logger useful for scientific or engineering use: 1. The CSV...
    • M
      My first suggestion would be to comment out the print code and look at the oscilloscope output. Printing that much data 50 times per second not only puts out data faster than you can read it, but if the receiver can't process it, things may...
    • M
      You asked for it! I've attached a zip file with the tracklogger6 sketch. This a few revisions back and uses the Sparkfun UBlox GNSS library. I started programming embedded systems about 50 years ago and have avoided using dynamic variables...
    • M
      mborgerson replied to the thread Long time log on SD card.
      I don't recall any corrosion problems with SD cards in oceanographic loggers in about 100 logger years of deployment over 50 or more loggers. We did take precautions: 1. The loggers are in watertight cases (Well DOH! they're deployed 10 to...
    • M
      This library may bridge one of the great chasms I've been facing in developing USB_UVC cameras for the Teensy: The lack of host support for Isochronous reception from UVC cameras. I've managed to develop drivers for some FLIR thermal imaging...
    • M
      mborgerson replied to the thread SD Card Write Speed Patterns.
      Since you are saving 10,000 sample per second, it might be worthwhile to switch from saving your data as ascii character and save binary values, then converting them in post-processing of the file. It would probably cut your data storage...
    • M
      That's good. I have several T4.1s without PHYs. I plan to use the low bits of the MAC address as a unique identifier for USB Test and Measurement class devices. Does the T4.0 also get a MAC address? It doesn't seem to have the ability to...
    • M
      Is this also true for T4.1s that do not have the Ethernet PHY chip? It would make sense to set it even if there is no PHY, in case the user added their own PHY chip after purchase.
    • M
      mborgerson replied to the thread SD Card Write Speed Patterns.
      I'm not familiar enough with the RingBuf class to know how often it does file system writes and/or file directory updates. The RingBuf class wasn't around for the code I was writing for the MSP430 in 2014 ;-) If rb.sync does write out the...
    • M
      mborgerson replied to the thread SD Card Write Speed Patterns.
      If you are doing any kind of long-term logging, you definitely want to do a sync() call at regular intervals. The time between sync() calls is based on the amount of data you are willing to lose if the batteries die or mechanical shock causes a...
    • M
      mborgerson replied to the thread weird weird weird.
      You're right about that. I think I missed that part in the related article in post #15. I tested that with some code: struct OrderedValues{ uint32_t big1; uint32_t big2; uint16_t middle1; int16_t middle2; bool goodbad1; bool...
    • M
      mborgerson replied to the thread weird weird weird.
      One practice I try to follow when designing a structure is to order the elements by size: struct OrderedValues{ uint32_t big1; uint32_t big2; uint16_t middle1; int16_t middle2; bool goodbad1; bool goodbad2; uint8_t small1; char...
  • Loading…
  • Loading…
Back
Top