ISR(TIMER1_COMPA_vect) equivalent for Teensy 3.2

Status
Not open for further replies.
That zip file has 4 programs using ISR(TIMER1_COMPA_vect). I looked at Stepper4_linearSpeedInterrupt.ino.

This code appears to be using the timer to generate interrupts with a variable amount of time, where OCR1A controls how much time until the next interrupt. It's not using the timer to generate the actual waveform, so at least that makes porting the code simpler.

Perhaps the TimerOne library can help? Or you could dig into the low-level timer details, but it's probably much simpler to just use a library to replace the direct timer usage, since all it's doing is running the interrupt at intervals and changing each interval as it goes.
 
Status
Not open for further replies.
Back
Top