I'm using an Arduino Mega to control motors via PWM and Adafruit DRV8871 motor drivers. I also use TIMER1 for a timed interrupt. After adding the TIMER1 interrupt I discovered I had problems with motor control, which I finally tracked down to using pins 11 & 12 for PWM simultaneously with using TIMER1 for timed interrupts.
My initial thought was to change the timer used for the ISR to avoid the pin 11/12 conflict, but now I'm uncertain as to what the restrictions are for using pins associated with timers. I now realize that pins associated with a timer interrupt can't be used for PWM using analogWrite(int val), but can they be used as general purpose digital outputs?
For instance, if I change from TIMER1 to TIMER0 for my timer interrupt, that appears to change the pin dependency from 11/12 to 4/13. I don't use pin 13, but I do use pin 4 as a digital output. Will using pin 4 as a digital output still work properly?