I am using ATMEGA32U4 (Arduino board ). I am facing problem with TIMER. I want to generate 1 Hz to 40 Hz signal in two pins and change PWM signal with certain period of time.
Deepak88Aagri:
I am using ATMEGA32U4 (Arduino board ). I am facing problem with TIMER. I want to generate 1 Hz to 40 Hz signal in two pins and change PWM signal with certain period of time.
There are no "Arduino comfort functions" to program the Atmega hardware timers directly.
You would need to learn about Atmega timer programming based on low-level register programming to program the timer registers of the Atmega controller directly.
Perhaps you can find a "library" from a third-party which can help you doing what you want.
But for slow frequencies like 10 or 40 Hz it is possibly simpler to establish a programming logic using Arduino comfort functions like "micros()" and "digitalWrite()" instead of direct timer programming.