Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4923

Do I need interrupts in this program?

$
0
0
Hi,

I'm programming an ATMEGA16 Microcontroller.

This what I am trying to do:
I need to output a 50Hz PWM Signal to control a servo. I want to vary the pulse width from 800uS to 2200 uS by using push buttons with deboucing. I also need to display the actual pulse width on 7 segments displays. Another feature is that if I keep the button pressed after 2 seconds (let's say) the pulse widh should start incrementing/decrementing by 1 until I unpress the button.

This is the code fragment I...

Do I need interrupts in this program?

Viewing all articles
Browse latest Browse all 4923

Trending Articles