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:
Which is where the first question comes in. Each signal is just enough out of phase that it has to be treated distinctly; can I share two inputs there, or do I need to move pins so that the inputs are on separate FlexPWMs?
Then there's the tachometer signal, which is a falling line (standard fan tach.) The outputs can be fairly lossy - I believe about 15% before there's a problem there. But there's two separate inputs that get mapped to those outputs. Obviously by default the answer there would be "attachInterrupt(pin, func, etc.)" but I'm questioning if that would be the right answer here.
Is there a better way to handle two interrupts like this? (Unfortunately, no, they aren't synchronized and do need to report two different values.)
The super short version is:
- 4 x 25kHz PWM signals in, which have to be treated individually -> averaged value
- 2 x 25kHz PWM signals out
- Read falling line (tachometer output) -> map to much higher values (e.g. 300 -> 9900)
- Write higher tachometer values out on 4 pins
Which is where the first question comes in. Each signal is just enough out of phase that it has to be treated distinctly; can I share two inputs there, or do I need to move pins so that the inputs are on separate FlexPWMs?
Then there's the tachometer signal, which is a falling line (standard fan tach.) The outputs can be fairly lossy - I believe about 15% before there's a problem there. But there's two separate inputs that get mapped to those outputs. Obviously by default the answer there would be "attachInterrupt(pin, func, etc.)" but I'm questioning if that would be the right answer here.
Is there a better way to handle two interrupts like this? (Unfortunately, no, they aren't synchronized and do need to report two different values.)