Search results

  1. M

    I need to test an old EEPROM and I need single cycle writes and reads (20ns timing is OK)

    Well, since the latest messages from the OP indicate that he can't tell us about the hardware, I'm going to use my imagination and assume that he's been handed a damaged PC board from an Iranian ballistic missile that got intercepted over Jordan. Somebody at the DIA would like to examine the...
  2. M

    New USB Host library for Teensy 4.x

    This looks really interesting. When I get back home next week, I want to see what it would take to adapt my USBTMC host library to use this new USBHost system. It looks like it should be free of all the mods to the TEENSY USB Host source code that was needed to add a new device type to the...
  3. M

    Puzzling PWM Problems

    Where was your code released? I'm very interested in what it took to set up the isochronous transfers and negotiate the bandwidth allocation between the Teensy and the camera.
  4. M

    Puzzling PWM Problems

    I read the referenced article. My takeaways were: 1. As of last fall, the LLM models used often failed to generate correct code even after as many as 100 test-and-adjust iterations. 2. The test runs were done using python coding. This means that their results are hard to apply to...
  5. M

    Puzzling PWM Problems

    At a social function a few weeks ago, I had occasion to ask a senior software engineer at NVidia about the impact of Claude Code and other AI systems on their coding practices. His response was that the agentic AI coders could generate reasonably good code, but the results almost always...
  6. M

    Puzzling PWM Problems

    I'm sorry I left this thread hanging for so long. I encountered most of the problems noted in this post, considered my options, and discovered that exact starting phase sync was not an issue for the demonstration data that I needed. I reverted to simply calling AnalogWriteFrequency() in...
  7. M

    IDE 2.x - If your main drive is running out of space...

    I must have made some good decisions on my last Arduino install---my staging folder is only 321MB. I'm at Arduino 2.3.6. With a Gigabit internet connection, the advantages of staging .zip files are probably minor.
  8. M

    Arducam Mega SPI Camera

    This brings back memories of the hours I spent on various video drivers. One of the most common problems I encountered was that many cameras returned 16-bit RGB565 data--but with BYTES swapped---not with the bit order reversed. Most often, I was able to reverse the byte order either within...
  9. M

    Fast Data Logger

    Me Too---I think. But first I have to remember where I put the calculator app on this computer!
  10. M

    Fast Data Logger

    I worked at WETLabs in Philomath, OR for about 5 years in the late '90s. The was before they got acquired by SeaBird. I got bummed out by some startup shenanigans and lots of overtime near the holidays to finish government research projects, so I started my own one-person consulting company...
  11. M

    Fast Data Logger

    IIRC, many of the larger SD cards have erase block sizes of 4-16MB. Depending on the prior write history, it may be hard to predict when a block erasure may be scheduled by the card's internal processor. When it does happen, you will see a spike in the busy time. The busy time was not an...
  12. M

    Fast Data Logger

    The OP may indeed need only one buffer---until the internal SD card controller decides it needs to swap out a failing block and handle wear leveling within a few milliseconds of each other. What is the power penalty for adding DRAM. (I'm assuming that the Teensy DRAM design doesn't use the...
  13. M

    Fast Data Logger

    It's too bad that you are space-constrained. If this is a pure store-now/analyze-later system, you could always try doubling your storage rate by adding a second T4.1 and have the two boards take turns capturing samples and writing them to SD. That way you get twice the SD write bandwidth...
  14. M

    Puzzling PWM Problems

    Updated demo code to display two pairs of traces. One of each pair has a constant phase offset from the other. The one pair has a PRI 100nSec longer than the other, which causes the top pair of traces to scroll with relation to the bottom two. // Revised test of Hardware PWM for POPPY...
  15. M

    Puzzling PWM Problems

    I tried bracketing my initialization with the disable/enable code. All it did was remove the effects of the delays inserted between the initializations. The display reverted to having all the trailing edges aligned. I reverted to the RTFM mode and discovered that the aligned trailing edges...
  16. M

    Puzzling PWM Problems

    Yes, I want to have two pairs of two traces representing two different satellites receiving pulses from two different radars. One pair, representing the signals from one target will have 80uSec pulse widths. The other two traces will represent the same pair of satellites receiving pulses...
  17. M

    Puzzling PWM Problems

    I'm working on a document describing a satellite ELINT system from the 1970's (That's old enough that I can actually find declassified technical information.) I want to simulate the display the ground station operators would see if they were receiving two channels of data from each of two...
  18. M

    Let's talk of possible new accessory boards

    Interesting. I’ll have to check my 2 and 4 year old schematics to see how I got the FLIR Boson and OV7670 cameras to send images to the T4.1 through the CSI interface ;-) At this time I just remember that the OV7670 software was difficult due to the lack of documentation of the control codes...
  19. M

    Fast data exchange between four microcontrollers

    You may save a lot of time and complexity in the transmission if you bypass the serial driver and simply store your two bytes in the UART transmission FIFO. That should take only a few lines of code and eliminates all the code and latency issues of the normal serial transmit handler...
  20. M

    Fast data exchange between four microcontrollers

    Given the fairly low data rates ((3*12bits + 4 overhead )* 10,000 samples) transmitted = 50KBytes/sec or ~500KBits/S serial, it might be possible to use a pseudo-star network: (Packing and unpacking 40 bytes into 3 12-bit values shouldn't take a teensy more than a microsecond.) Teensy 1...
  21. M

    T4.1 GPT2 Output Compare setup

    I'm working on a project where I need to generate three output pulse trains at about 1millisecond intervals with 450usecond pulse width and variable rising edge timing. The pulses will be used to simulate the outputs of three ELINT receivers intercepting radar pulses at three different...
  22. M

    Precision and drift of GPS position

    It's too bad that locomotives don't have a CAN port! The more expensive race car loggers can plug into a car's CAN port and record throttle, brake and steering inputs. Those input can be compared to tachometer output, wheel ticks, and accelerometers to get a pretty complete picture of vehicle...
  23. M

    Precision and drift of GPS position

    The antenna was usually taped in place on the front dashboard or inside the rear window. We tried to keep it near the center of the car. One thing we learned is that YOU CANNOT place the antenna on the flat deck under the rear window and just above the engine. At certain engine speeds when...
  24. M

    Precision and drift of GPS position

    Back in 2023, a friend and I developed a logger for race cars. The logger was based on the Sparkfun SparkFun GPS-RTK Dead Reckoning Kit (SMA). This module uses a UBlox ZED-F9R, which integrates a high-end GPS chip with accelerometers and wheel-tick sensors (which we did not use). My friend...
  25. M

    Teensy4.0 slows down while logging data to SD card

    For the OP's case, erase time should not be an issue. I think that writing 33 bytes five times per second should not show any major delays due to block erase time. The block erases, when required. should be covered by the internal RAM buffers managed by the SD Card. Long write times are...
  26. M

    Teensy4.0 slows down while logging data to SD card

    One problem that I see is that your data structure is either 33, 34, or 36 bytes in length---depending on whether you've done anything to adjust the structure packing size. None of those sizes will fit evenly into a 512- byte SD sector. At some point, writing a structure to the file will...
  27. M

    MTP file size limits.

    I have developed a wildlife image-capture app for the FLIR Lepton thermal imaging camera. It is designed to capture about 8 38Kbyte frames /second when an object above a threshold temperature is in the frame. I must have set the threshold too low in the last 36-hour session, as I recorded...
  28. M

    Communicating with an ADC via master/slave SPIs

    One thing to remember with these LTC ADCs is that they get the channel for the NEXT conversion in the SPI command word you send. Thus, the first result you get will not be the result for the channel you specified. You always get a dummy result or the result for the last specified channel...
  29. M

    Issues with time_t in printf()

    I added a line to my test program to print the sizeof(time_t). It returned 8, so you are correct that the something in the current compiler or libraries is setting time_t to a long-long 64-bit variable type. All the versions of time.h, TimeLib.h, etc. I've looked at to show time_t as an...
  30. M

    Issues with time_t in printf()

    I was using printf() to show some intermediate results in a data collection program. I found that using printf() to show the time and two other variables didn't work as expected: var1 = 1; var2 = 2; Serial.printf("now: %lu var1: %u var2: %u\n", now(),var1,var2); produced: "now: 1725965454...
  31. M

    Using teensy 4.1 to generate square wave at precise frequency

    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 storage for F_CPU_ACTUAL, so you can’t call it...
  32. M

    Using teensy 4.1 to generate square wave at precise frequency

    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, but 512MHz would probably work. To set the F_CPU to...
  33. M

    Using teensy 4.1 to generate square wave at precise frequency

    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 tomorrow.
  34. M

    What is the maximum FPS one could achieve on a teensy 4.1?

    Just out of curiosity, what camera are you using that can send 200 frames per second?
  35. M

    Teensy to Teensy comms over USB

    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 a T4.1 host receiving about 2MBytes/second from...
  36. M

    SD card - setting file pointer for read

    Is that one sector per file, or one sector for all open files?
  37. M

    SD card - setting file pointer for read

    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 demonstrates that reading from one file writing to...
  38. M

    Call to arms | Teensy + SDRAM = true

    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 that ended about 15 years ago. When I need a row...
  39. M

    Problem with size of enum variables

    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 LEP_SYS_ENABLE_E_TAG { LEP_SYS_DISABLE = 0...
  40. M

    FreqMeasureMulti glitching with slow-ish rising inputs

    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 available in the comparator hardware.
  41. M

    commas for thousands separator in printf

    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 years when I had to log GPS data in NMEA format...
  42. M

    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. SEACON Connectors We often used a 2-pin connector as...
  43. M

    commas for thousands separator in printf

    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. When it comes time to present the data to a human...
  44. M

    Export Restrictions for Teensy 4.1?

    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 Paul has signed the NDA and is keeping his...
  45. M

    Error trying to implement an ADC + Timestamp timer logger using Ringbuf

    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 averaging may also be needed. I also wonder if...
  46. M

    Limits of delay effect in audio library

    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 occupied with other projects.
  47. M

    ADC->adc_timer_dma with Adafruit SSD1306 128x32 I2C

    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 Report to work will let you know whether the crash...
  48. M

    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 format, while useful for saving data that can be...
  49. M

    PulsePosition Library not working correctly

    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 stall out. In addition, USB Serial.print generates...
  50. M

    GPS Module and Library Recommendations

    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 as much as possible. The Sparkfun library uses...
Back
Top