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.
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.
Step by Step Solution
3.49 Rating (149 Votes )
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Introduction To Statistical Quality Control
Authors: Douglas C Montgomery
7th Edition
1118146816, 978-1-118-3225, 978-1118146811
Students also viewed these Computer Engineering questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App