Question: Description: - This program turns the LEDs connected to PORTB on to reflect the value of a variable count as shown below. The variable count
Description: This program turns the LEDs connected to PORTB on to reflect the value of a variable count as shown below. The variable count should be incremented to a a max value MAXCOUNT and should use a programmable delay in mSec between each LED turning on For example, if the value of MAXCOUNT is set to the count value should go from to ie not and display the value ieb as the last count value in the sequence before going back to and repeating the sequence. Inputs: None Outputs: outputs on PORTB ie RB RB
Instructions: Create a programmable delay parameter as a macro: Eg #define DELAY Create a max count parameter as a macro: Eg #define MAXCOUNT Use a variable called count that is incremented every iteration of a while loop. Increment the value of count from to MAXCOUNT with a delay as defined in by DELAY between each value where count is incremented. The couting process repeats continuosuly from MAXCOUNT. Add comments to your code marks lost for no comments Ensure all code is properly indented ie marks lost for no indentation
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
