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

Search:

Type: Posts; User: mborgerson

Page 1 of 5 1 2 3 4

Search: Search took 0.00 seconds.

  1. DOH! (Slapping self upside the head!) So in...

    DOH! (Slapping self upside the head!) So in this application, it should be able to crank right along as it is reading linearly increasing contiguous bytes. The PSRam should only require an initial...
  2. I've tuned up my TA4.1 code and my PC image host...

    I've tuned up my TA4.1 code and my PC image host program to speed up transfer of images from the PSRam image buffer to the PC. In fact, it seems to be working impossibly well! I'm getting a...
  3. I've gotten my soldered breadboard working with...

    I've gotten my soldered breadboard working with the t4.1 wired for the pins needed to use the SCI. The current version of my code follows Cyrille's plan (interrupts for VSync and HSync and polled...
  4. Replies
    8
    Views
    306

    Once you figure out how to get part-per-million...

    Once you figure out how to get part-per-million timing resolution, you can start to worry about stability. Since the crystals on the Teensy probably have temperature coefficients of up to 25PPM/deg...
  5. To modify the bottom part of the Arduino IDE, ...

    To modify the bottom part of the Arduino IDE, you need to edit the Theme.txt file which is at:

    C:\arduino-1.8.13\lib\theme\theme.txt (Arduino was placed at C:\ on my machine)

    Here is the...
  6. This code from BrainGram seems to connect signals...

    This code from BrainGram seems to connect signals 2-9 by manipulating the IOMUX (which, like the XBARs is still a mystery to me):



    // VSYNC
    IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_06 = 0x4U;
    ...
  7. In some ways, the analog capabilities of the T4.X...

    In some ways, the analog capabilities of the T4.X fall behind the T3.X. The T4.X has no internal DAC. They are also limited to using the 3.3V power supply as the ADC reference voltage. This...
  8. Replies
    23
    Views
    867

    I just noted that you asked for a chirp ranging...

    I just noted that you asked for a chirp ranging from 1Hz to 60KHz to play 6 times per second. You need to rethink that frequency range, since you can't play a 1Hz signal 6 times per second!
  9. Replies
    23
    Views
    867

    Since the T4.1 doesn't have an internal DAC, you...

    Since the T4.1 doesn't have an internal DAC, you would need to add an external DAC to get a sine-wave output.

    Here is the code I used to make a chirp table:


    // chirp data float from -1.9 to...
  10. @Kurte: I'm planning to solder up a proto...

    @Kurte: I'm planning to solder up a proto board for the OV7670 in a few days. I intend to use 8 contiguous port pins for the camera data bits, and I thought I'd also have optional wiring to use...
  11. A simple collection routine to get 4 channels...

    A simple collection routine to get 4 channels from the Teensy 4.X ADC channels at 9600 samples per second with an Intervaltimer should consume only about 2% of the CPU resources (~2 microseconds...
  12. Progress

    22025

    I've made reasonable progress getting the OV7670 to work on my T4.1 breadboard. I'm using Cyrille's algorithm where there are interrupts for frame sync and HREF. The HREF service routine...
  13. Within the limits of my 60MHz oscilloscope, it...

    Within the limits of my 60MHz oscilloscope, it seems you get pretty good square waves when you request an analogWriteFrequency() which divides into 150MHz an even number of times:

    150/6 = ...
  14. Offhand, I'm not sure about the Teensy 3.5, but...

    Offhand, I'm not sure about the Teensy 3.5, but on the T3.6, you can have your ADC pins use an internal 1.2V reference. This reference will not be affected as much by the the current spikes from SD...
  15. Replies
    3
    Views
    184

    It would help a bit if you defined what you mean...

    It would help a bit if you defined what you mean by "random values". Do you get values from 0 to 1023 (the full scale for 10-bit resolution), or random over some smaller range near the expected...
  16. I dug up some code from earlier forum posts and...

    I dug up some code from earlier forum posts and figured out how to switch pin 0 (GPIO1_3) as pixel clock to a slow-mode port pin. It does give a faster interrupt response--the time from clock...
  17. According to the app note at : ...

    According to the app note at : https://www.nxp.com/docs/en/application-note/AN12078.pdf

    It should only take about 12 clock cycles. However, I followed the methodology in the app note and found...
  18. I think I've measured the time required to enter...

    I think I've measured the time required to enter and exit an empty ISR. That time is 103 clock cycles. I arrived at this number as follows:

    In a tight loop, read the ARM clock counter in two...
  19. I guess that means that to meet the OV7670...

    I guess that means that to meet the OV7670 waveform specs you would need to limit the clock to 25MHz (3 cycles on , 3 cycles off). If you set up the pixel clock that way, the time between pixels is...
  20. If you want to speed up your pizxel processing...

    If you want to speed up your pizxel processing you can get your pixels directly from the GPIO6 data register and do some bit manipulation. The direct read version in the attached code runs about 7...
  21. Have you run across this thread that shows how to...

    Have you run across this thread that shows how to read a CMOS camera using the CMOS Sensor Interface (CSI) of the IMhttps://forum.pjrc.com/threads/62038-Teensy-4-1-CSI-Example

    The code is not for...
  22. Replies
    5
    Views
    235

    My original values worked OK for 500Hz. If you...

    My original values worked OK for 500Hz. If you want to go down to 100Hz, you need larger resistors and capacitors. It will also depend on the value of the internal pullup resistors on Pin 17. I...
  23. Replies
    5
    Views
    235

    I don't think you'll have much luck finding a...

    I don't think you'll have much luck finding a software-only solution as the FreqMeasure library needs signal transitions and I think those transition thresholds are fixed in the hardware of the I/O...
  24. Replies
    47
    Views
    2,095

    The code in Post #26 writes the ADC data to the...

    The code in Post #26 writes the ADC data to the PSRAM at a speed determined by the ADC conversion speed settings---which is not exactly 1MSamples/second. The code in Post #45 writes to the SD Card...
  25. That is the basis of my question about the...

    That is the basis of my question about the validity of micros() if interrupts have been disabled for more than a millisecond. If a systick() interrupt is missed, by disabling interrupts, will...
  26. I have had no problems using micros() inside an...

    I have had no problems using micros() inside an interrupt handler---as long as the handler executes in less than a millisecond.

    The code in post #1 shuts off interrupts for the duration of...
  27. Replies
    47
    Views
    2,095

    A Quick Note: I was able to run the demo code...

    A Quick Note: I was able to run the demo code in post #45 on a Teensy 3.6 by reducing the buffer sizes a bit and setting the sampling rate to 240KSamples/second. The T3.6 uses the PDB delay block...
  28. Replies
    47
    Views
    2,095

    Trapped indoors by wildfire smoke in the...

    Trapped indoors by wildfire smoke in the Willamette valley, I decided to revisit this issue. I came to several conclusions:

    1. You can collect a single channel of ADC data at 1.000 MHz without...
  29. Replies
    27
    Views
    802

    One way to get a pulse at each change in a clock...

    One way to get a pulse at each change in a clock is to use an XOR circuit like the one shown below. You delay one of the inputs with an RC network to set the pulse width. As others have pointed...
  30. Replies
    27
    Views
    802

    While I appreciate the need for speed in some...

    While I appreciate the need for speed in some applications, it seems that you may be running up against hardware limits, both in pin drive and cpu instruction cycles.

    Where are you getting the...
  31. UhClem is correct. I looked in the SDFat 2.0b...

    UhClem is correct. I looked in the SDFat 2.0b code and interrupts are masked in only one place and that for about two instructions. That would not account for any sampling jitter.

    I think the...
  32. Replies
    7
    Views
    3,059

    You may also run into issues when you try to run...

    You may also run into issues when you try to run the SCK to multiple SPI devices. If the SCK (or any of the other signals) are connected directly from the Teensy to all the devices with only...
  33. Rather than RS-485, you might consider a pair of...

    Rather than RS-485, you might consider a pair of 915MHz transceivers. They should handle 200 feet unless one or both ends of the link are RF-shielded. You can probably find a pair of transceivers...
  34. LOL! According to the EPA the "Hazardous" air...

    LOL! According to the EPA the "Hazardous" air quality index ends at 500. There's even a link on the AirNow.gov web site about what to do when the index goes off scale above 500: ...
  35. The Honeywell HPMA115 sensor in my setup is...

    The Honeywell HPMA115 sensor in my setup is usually within 10% of the EPA sensor about a mile away. Unfortunately, the EPA sensors seem to go off line and return "ND" at very high concentrations. ...
  36. I think we've stepped into the twilight zone...

    I think we've stepped into the twilight zone here. While I've acquired and stored a lot of ADC data at high rates with the T4.1, it has never been with a 16-bit parallel interface. I've used the...
  37. I've had a Honeywell particulate sensor connected...

    I've had a Honeywell particulate sensor connected to a T3.5 data logger for a while now. I used the PM10 data to keep track of allergens--grass pollen is a real problem here in the Willamette valley...
  38. UPDATE 2: After a few interesting hours with...

    UPDATE 2:

    After a few interesting hours with the IMXRT1062 manual and the PWM.c source, I figured out that you can do the generation of the complementary outputs in the FlexPWM hardware with a bit...
  39. UPDATE: * If I pick pins 6 and 9, which are...

    UPDATE:

    * If I pick pins 6 and 9, which are on the same FlexPWM timer, the rising edges occur at the same time----and you lose the phase inversion.

    * If I mix up FlexPWM and QuadTimer pins,...
  40. The following code seems to work, according to my...

    The following code seems to work, according to my oscilloscope. It seems almost too simple to be real, so please test it carefully before running it on the robot you've spent the last 6 months of...
  41. You might meet that requirement with a...

    You might meet that requirement with a modification of the simple multi-channel PWM code I posted in the General discussion forum:
    https://forum.pjrc.com/threads/62857-Simple-multi-channel-PWM
    ...
  42. It's pretty simple to do the same thing with just...

    It's pretty simple to do the same thing with just one interval timer and about 50 lines for the PWM and another 50 for setup and generating the ramp up and down part. Since it doesn't involve any...
  43. Replies
    0
    Views
    168

    Simple multi-channel PWM

    In response to a thread discussing issues with the interval timer in the "Suggestions and Bug Reports" forum:
    ...
  44. I'll taka a look at your example. In the ...

    I'll taka a look at your example. In the meantime, it seems very risky to me to call timer.begin inside an interrupt handler for the timer. The begin() function messes about with the internal...
  45. My simple test program seems to confirm that...

    My simple test program seems to confirm that using mytimer.end(), mytimer.begin(newinterval) can cause a long interval between interrupts:

    Output results are intervals between timer interrupt...
  46. I wonder if calling mytimer.end(), then...

    I wonder if calling mytimer.end(), then mytimer.begin(newinterval) is not guaranteed to result in one longer interval between calls to the timer's interrupt handler. Will the sequence look like...
  47. I guess this all goes to show the advantages and...

    I guess this all goes to show the advantages and disadvantage of the "Always post complete source code" warning at the top of the forum. If you condense the source to something that doesn't...
  48. I added some port output pulses to show the...

    I added some port output pulses to show the timing of your receive program. They seem to show that the problem is not that Serial2.available() is not responding, but that the USB Serial output is...
  49. Your receive test program has a very fast loop...

    Your receive test program has a very fast loop with no delays. Could it be that your loop needs an occasional call to yield() or to a delay that will internally call yield? I don't have the...
  50. If read/write performance is an issue, you should...

    If read/write performance is an issue, you should be using Bill Greiman's SDFat 2.0b and the built-in SD card on the T3.6 or T4.1. I've found SDFat to be very stable and with MUCH higher...
Results 1 to 50 of 202
Page 1 of 5 1 2 3 4