I have an Atmega644p which is connected over SPI to a MCP2515 can-controller. In the MCU I use time based interrupts to send messages to the can-controller, which he translates and sends onto the canbus. I also use an external interrupt to tell the MCU when a message needs to be read out of the can-controller.

What I wish to do now is, generating with the same MCU a PWM signal. My question is following, is there another way then time based interrupts to create one PWM output on the MCU? Aswell the other interrupts may not stop the PWM output. Is this possible? or should I use some kind of PWM driver for this?

Kind regard, Toon


1 Answer 1


Your microcontroller includes six PWM output channels as well as timers with PWM capability. Look in the datasheet.

You can programme one of those to drive an I/O pin without needing to generate it in software.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.