Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Create drivers for SW1, the RGB-LED, the COP, and the SysTick timer. Using these components, create a program that cycles through the 8 LED colors

Create drivers for SW1, the RGB-LED, the COP, and the SysTick timer. Using these components, create a program that cycles through the 8 LED colors , changing the color once per button press. To test the functionality of the COP/WDT, after the 10th button press the program should enter an infinite loop, causing a CPU reset which should change the color back to black.

Be sure to enable the COP in the Makefile. The RGBLED driver should have the following interface:

void initialize_rgbled(); //initialize the three cathodes and make initial color black

void turn_on_red_led();

void turn_on_green_led();

void turn_on_blue_led();

void turn_off_red_led();

void turn_off_green_led();

void turn_off_blue_led();

set_rgbled_color_to( enum color_t color); //use the functions above to set the color to one of the color values (below)

void turn_off_rgbled(); //turn off all LEDs (equivalent to set color to black)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting Principles

Authors: Jerry Weygandt, Paul Kimmel, Donald Kieso

11th Edition

9781118566671

Students also viewed these Accounting questions