Duty cycle

FIND A SOLUTION AT Academic Writers Bay

For this lab assignment, you must use the Timers/Counters on the AVR board.
Here are the detailed functions, which will adjust the LED brightness based on the pushbutton:
• The brightness of the LED should increase from the current brightness when the button is pressed (ON)
and decrease when the button is released (OFF)
In the main() loop, when the pushbutton is pressed, generate a PWM waveform to drive the LED so that the
ON time (duty cycle) varies from 0 to 100% in about a second so it is clearly visible and stopping at 100%
(fully ON) until the button is released
When the pushbutton is released, the duty cycle should be reduced, from the brightness at the point when
the button is released until it is completely OFF (0% duty cycle). If the button is released after achieving
100% brightness, the LED should go from Full brightness (100% duty cycle) to 0% duty cycle in about 1
Use a timer to generate PWM waveform having a total time cycle (Ton + Toff) of 10 millisecond.

YOU MAY ALSO READ ...  Francis is an experienced businessman working
Order from Academic Writers Bay
Best Custom Essay Writing Services