Question: Background We're going to design a simple C program today to which is used to produce an accurate timer that blinks an LED You'll need

Background We're going to design a simple C program today to which is used to produce an accurate timer that blinks an LED You'll need to refer to the trainer manual that is posted on Blackboard for IO pin assignments. 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 SW7-2 OFF OFF ON ON SW7-1 LED on time 500 mS 1000 mS 500 mS 1000 mS LED off time 500 mS 1000 mS 1000 mS 500 mS OFF ON OFF ON 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, SW7 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 ISR Demonstrate your working code to me, and then hand in your C source file Background We're going to design a simple C program today to which is used to produce an accurate timer that blinks an LED You'll need to refer to the trainer manual that is posted on Blackboard for IO pin assignments. 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 SW7-2 OFF OFF ON ON SW7-1 LED on time 500 mS 1000 mS 500 mS 1000 mS LED off time 500 mS 1000 mS 1000 mS 500 mS OFF ON OFF ON 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, SW7 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 ISR Demonstrate your working code to me, and then hand in your C source file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
