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 MAX_COUNT and should use a programmable delay (in mSec) between each LED turning on. For example, if the value of MAX_COUNT is set to 16, the count value should go from 0 to 16(i.e. not 17), and display the value 16(i.e.0b00010000) as the last count value in the sequence before going back to 0 and repeating the sequence. Inputs:- None Outputs:-8 outputs on PORTB (i.e. RB7 RB0)
Instructions:-1. Create a programmable delay parameter as a macro:- E.g. #define DELAY 1002. Create a max count parameter as a macro:- E.g. #define MAX_COUNT 163. Use a variable called count that is incremented every iteration of a while loop. 4. Increment the value of count from 0 to MAX_COUNT with a delay (as defined in by DELAY) between each value where count is incremented. 5. The couting process repeats continuosuly from 0 MAX_COUNT. 6. Add comments to your code (marks lost for no comments).7. Ensure all code is properly indented (i.e. marks lost for no indentation).
Description: - This program turns the LEDs

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!