Search results

  1. R

    Best way to implement complicated mix of PWM and interrupt?

    Here's analogWriteResolution(12); analogWrite(28, 4095.0);. Which, yeah, this is definitely not right. No amount of interpolation - even on a budget scope - can explain this one. And no, that's not quite what it looked like before either. Pretty similar though. And obviously not correct. Now...
  2. R

    Best way to implement complicated mix of PWM and interrupt?

    Yeah, and at this point, I have several VERY inexplicable behaviors going on. PWM signal isn't stable there on either the handheld or bench unit; both show the same instability with wide, wide gaps. This program doesn't work as expected either: const int tachoPin = 36; volatile unsigned long...
  3. R

    Best way to implement complicated mix of PWM and interrupt?

    Yep, I've been experimenting a couple days now with my oscilloscope, which honestly has ended up raising more questions than answers so far. I'm really not sure how better to describe the context; essentially it's a motor controller, except it takes input from a device, passes the PWM portion...
  4. R

    Best way to implement complicated mix of PWM and interrupt?

    That's the theory of operations, yep. I realize I keep overthinking it. I'm still in the 'way underpowered microcontroller' mindset, where things are so overloaded and constrained that even simple things like memory are a problem. Particularly when the device sending the PWM has some obnoxious...
  5. R

    Best way to implement complicated mix of PWM and interrupt?

    See, this is the kind of insight I'm in need of. The problem I have is I'm coming from a very different setup where I can get 25kHz, but not in a fun way. Or a consistent way. I have to take a sample over time (about 500ms,) stuff that value into memory, then update the output. So it's a much...
  6. R

    Best way to implement complicated mix of PWM and interrupt?

    That's partly correct. I clearly did a worse job explaining it than I thought. A better attempt at a diagram: Pin -> Function -> Needed Rate 2 -> PWM Input Group0 -> 25kHz 3 -> PWM Input Group0 -> 25kHz 4 -> PWM Input Group1 -> 25kHz 5 -> PWM Input Group1 -> 25kHz 20 -> Digital Output...
  7. R

    Best way to implement complicated mix of PWM and interrupt?

    So, thanks to Teensy 4.1 @ 600MHz, I now have something that's actually powerful enough to do what I need. I hope. But I'm not sure, and this is where the question comes in. The super short version is: 4 x 25kHz PWM signals in, which have to be treated individually -> averaged value 2 x 25kHz...
Back
Top