Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Program needs to be in C language. Assignment You are to design, code, and implement a program that reads two input switches and blinks an
Program needs to be in C language.
Assignment You are to design, code, and implement a program that reads two input switches and blinks an LED (your choice) according to the following truth table: S10 OFF OFF ON ON S11 OFF ON OFF ON LED on time LED off time 500 mS 1000 mS 1000 mS 500 mS 1000 mS 500 mS 1000 mS 500 mS For the time base, you are to set up a timer that interrupts the processor every 10 mS. In order to verify that your interrupt is working correctly, designate a port pin as an output, and toggle it every time the timer ISR is run. Connect the pin to the oscilloscope so that you can verify it is exactly 10 mS on, and 10 mS off. To save CPU cycles, switch inputs should be set up to only be read on a change of value. This can be done by using the interrupt-on-change feature of RB4-RB7. You are free to select any valid port pins to drive the LED, and output the square wave produced by the timer ISRStep by Step Solution
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 Started