Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program to create a 3-bit Ring Counter With Direction using the built-in LEDs for the MSP432 Launchpad. The program will use the S1

Write a program to create a 3-bit Ring Counter With Direction using the built-in LEDs for the MSP432 Launchpad. The program will use the S1 and S2 buttons for input. One button will increment the counter and the other will decrement the counter. The RGB LED (LED2) will indicate the state (or value) of the counter and the Red LED (LED1) will indicate the direction of the most recent button event (i.e. was the last button press an increment or decrement)

Register level configuration using bitwise operators and proper mask must be used to configure all registers o The program may not use any DriverLib function calls

The program must have an init() function containing all one-time configuration The increment/decrement functions must be activated with the built-in buttons S1 (P1.1) and S2 (P1.4)

The program must configure internal pull-up/pull-down resistors on inputs

The RGB LED should change state only once for every button event o A button event is defined as the press and release of a button o Both the press and the release must be de-bounced

The program must poll the S1 button for its value (No interrupt service routine)

The states for the RGB LED as defined as follows:

Count/State LED2(RGB)
1 Off
2 Red (R)
3 Green (G)
4 Yellow (RG)
5 Blue (B)
6 Pink (RB)
7 Sky Blue GB)
8 White (RGB)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Continuous Auditing Theory And Application

Authors: David Y. Chan, Victoria Chiu

1st Edition

1787434141, 978-1787434141

More Books

Students also viewed these Accounting questions

Question

7. Discuss the key features of the learning organization.

Answered: 1 week ago

Question

7. Understand the challenges of multilingualism.

Answered: 1 week ago