Timers at A-Star 32U4 Mini (Interrupt and PWM)


I want to use a A-Star 32U4 Mini for a Robot-System. For that I need Input/Output for:

  • PWM for Motor 1
  • PWM for Motor 2
  • Interrupt for Encoder 1
  • Interrupt for Encoder 2
  • delay is needed
  • I2C and SPI is needed

Now to my question:

What pin do you suggest for that? I am not sure about the 32u4 chip, what internal timer/counter is used for what PWM-pin or interrupt pin. I am concerned about influencing the pwm or SPI or I2C when using interrupt. Or later on when I maybe try to change the PWM-frequency that SPI or I2C or Interrupt are not working anymore.

So please give me a suggestion for a pinout that does work and do not corrupt the timer for other functions.

Do you have a example sketch for Motor with PWM/DIROutputs and Encoder-Input? That would be great!

Best regards and keep the good work up,