Task 1: Write a program using both external interrupt and PORTB interrupt to adjust a PWM signal.
Fantastic news! We've Found the answer you've been seeking!
Question:
Task 1: Write a program using both external interrupt and PORTB interrupt to adjust a PWM signal.
• Connections: Two buttons at RB0 and RB4. One LED at RA1
• Concept: There are two delay loops named t_up and t_down. Their total is always constant T.
• Main program: Star with t_up = t_down. In an infinite loop, turn on the LED and wait for t_up, turn off LED and wait for t_down.
• External Interrupt: Increase t_up by 10% of T. If t_up is 100% of T don’t increase.
• PORTB Interrupt: Decrease t_up by 10% of T. If t_up is 0% of T don’t decrease.
Write button functions.
Related Book For
Introduction to Statistical Quality Control
ISBN: 978-1118146811
7th edition
Authors: Douglas C Montgomery
Posted Date: