Search results

  1. A

    Non-blocking SPI/SPI via DMA

    I'm working on a project involving a Teensy 4.1 connected to a dsPIC micro, with the dsPIC being used for some of its IO peripherals (such as SENT). My plan is to connect the two via SPI, with the two using DMA to output data buffers with no overhead. This was fairly easy to accomplish on the...
  2. A

    CAN-FD configuration options

    what are propdelay and bus_length actually specifying? Should there be some physical value that I could measure and put in there?
  3. A

    CAN-FD configuration options

    Hi all, I'm trying to get CAN FD working on a T4.1 and having trouble getting above 2Mbps. Initially I was getting garbled data at 2Mbps, but I tried bumping config.sample from 70 to 75 as I saw in an example in this thread and now have a good connection. Now I'm trying to push to 4 or 5Mbps and...
  4. A

    Pin 4 being pulled high by SSD1306 library?

    haha I just finally noticed that and came back here to clear that. That took me entirely too long to find. I've been copying that block of code across projects without really looking at it I guess!
  5. A

    Pin 4 being pulled high by SSD1306 library?

    I'm trying to use an encoder knob on pins 4 and 5, as well as an I2C OLED on pins 18 and 19. If I have the display in the code, pin 4 is pulled high and overpowers the 10k series resistor I have going to the signal from the knob. What causes this? Is it possible to fix this behavior? What other...
  6. A

    display.display() call locking up with generic SSD1306 OLED

    Well I went back and looked at my notes better, and I the post above is wrong-ish. I did switch to the interval timer because at slow speeds I needed to call setFrequency often, but it only became a problem when the display locked up. I went back to the version of code when I first implemented...
  7. A

    FreqMeasureMulti glitching with slow-ish rising inputs

    I found this thread which was very helpful, thank you!
  8. A

    display.display() call locking up with generic SSD1306 OLED

    Shoot I totally just realized I misremembered the history of this project. I switched to using IntervalTimer because at slow output frequencies I'm bit-banging the outputs (the setFrequencySlow function), and to maintain good resolution I need to call that function very often. I had an issue...
  9. A

    display.display() call locking up with generic SSD1306 OLED

    In previous versions of the code I wasn't using IntervalTimer and was still having the issue. Is it documented what priority the I2C interrupt timer is? I could try setting the timer interrupt priority below it.
  10. A

    FreqMeasureMulti glitching with slow-ish rising inputs

    Did you have any luck using the regular FreqMeasure library instead? It's nice to be able to select which pin to measure from but not a design necessity. I don't know the differences in the backend between the two and was wondering if there was some hardware thing that made a certain pin best.
  11. A

    display.display() call locking up with generic SSD1306 OLED

    The serial monitor prints come much slower due to the main loop being held up by display.display(), but they still do come whereas the display just doesn't respond at all anymore.
  12. A

    display.display() call locking up with generic SSD1306 OLED

    I'm wondering if anything in my code could be messing with the I2C bus since that's the only thing I can think of that would mess up the display. It's very unpredictable though, the steps to reproduce that I had found previously don't seem to be working anymore. I can wiggle the jumper wires...
  13. A

    FreqMeasureMulti glitching with slow-ish rising inputs

    I have a 5V TTL signal coming in through a 10k/18k voltage divider with an 820pf cap to GND to convert it to a 3.3V signal being read by FreqMeasureMulti, but with the cap in place it occasionally glitches and reads 2x, 1.33x, or I *think* 4x the actual input frequency for a few counts before...
  14. A

    display.display() call locking up with generic SSD1306 OLED

    The same issue occurs in all 3 input modes, but I can only reliably reproduce it in ANALOG mode. In a previous version I had it set up so that frequency updates occurred based on the same elapsedMillis system as everything else and still had the display issues, so I switched to using the...
  15. A

    display.display() call locking up with generic SSD1306 OLED

    Hi, sorry I took so long, here's some code: #include <FreqMeasureMulti.h> #include <SPI.h> #include <SD.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #define W 6 // Single character width #define H 8 // Single character height #define...
  16. A

    display.display() call locking up with generic SSD1306 OLED

    I'm using a generic 12864 OLED with the Adafruit SSD1306 library, periodically updating it using elapsedMillis while a higher priority function is running in a timed interrupt (Though I previously had everything running based on elapsedMillis timers and had the same issue). I have an IO pin set...
  17. A

    Switching a pin from analogWrite to digitalWrite on the fly for low frequency PWM

    That did it, thank you! I'm also seeing a glitch in the output waveform when it transitions from "slow" to "fast". I'm planning on adding in some sort of hysteresis to stop it from fluttering around this point, but I'd still like to eliminate the glitch if possible. Is there a way to tell the...
  18. A

    Switching a pin from analogWrite to digitalWrite on the fly for low frequency PWM

    Hi all, I'm trying to write a program that takes in a frequency using FreqMeasure and pipes it back out on two pins, as well as piping back out a scaled version of that frequency (say 0.5x for example) on two other pins. analogWriteFrequency has been great for this, but has a lower limit of...
Back
Top