Starting from:
$30

$24

Design Assignment 3 Solution

Description




The goal of the assignment is to write an AVR C program to drive an RGB LED to display various colors. You will generate three pulse-width modulated (PWM) signals to drive each of the three RGB LEDs using TIMERs. Use the output compare pins to generate the output. Modify each PWM duty cycle to adjust how much of a given color is shown. The RGB LED will display different colors as the amount of (i.e., brightness of) each color changes. Hold each color for ½ a second (of course, use values that are appropriate when you are testing your program).




Note: The RGB LED will be passed out in class on Thursday 2/16. You can, however, complete the coding portion – or at least a 1st revision of it – before then.




Hint: The longest pin on the RGB LED is the common cathode. However, the LED color corresponding to the other pins may vary. It is a good idea to test your LEDs – for both functionality and color – before integrating it with your PWM code.




What to Turn In




The following must be submitted via WebCampus by the due date/time to receive credit for the assignment. Messy, difficult to understand, or disorganized work will receive no credit.




Total points available: 100




Time: Indicate the amount of time this assignment took in hours. This will not affect your grade (unless omitted) but will help gauge the workload for this and future semesters. [-5 points if omitted]



A pdf or word document that contains details about your design. Be sure to submit them in this order:

A 1-paragraph description of your design. [20 pts]



Your code, which must have been built (i.e., compiled/assembled) and working. The code should be clear, well-formatted, and well-documented. [40 pts]
A flow chart of your program (hand-drawn is fine as long as it’s legible). [15 pts]



A schematic of your hardware (again, hand-drawn is fine as long as it’s legible). [15 pts]
A link to a ~1-2 minute Youtube video showing your program working in hardware.
[10 pts]


































1 | P a g e

More products