subject
Engineering, 26.11.2019 06:31 Juicebox18

Write a program to create a 3-bit counter with direction using the built in led’s for the msp432 launchpad. the program will use two buttons for input. one button will increment the counter and the other will decrement the counter. the rgb led will indicate the state (or value) of the counter and the red led will indicate the direction of the previous 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 count-up function must be activated with the built-in button s1 (p1.1) • the count-down function must be done with another pair of gpio pins** using an external spst switch (s3) that will be provided in class. • the program must configure internal pull-up/pull-down resistors on all inputs • the s3 button must be connected between the input pin and vcc o the s3 vcc connection must be created by outputting vcc to s3 • 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)

countstate

1 off

2 red (r)

3 green (g)

4 yellow (rg)

5 blue (b)

6 pink (rb)

7 blue sky (gb)

8 white (rgb)

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:10
What difference(s) did you notice using a pneumatic circuit over hydraulic circuit.explain why the pneumatic piston stumbles when it hits an obstacle.
Answers: 2
question
Engineering, 04.07.2019 18:10
Aturning operation is performed with following conditions: rake angle of 12°, a feed of 0.35 mm/rev, and a depth of cut of 1.1 mm. the work piece is aluminum alloy 6061 with t6 heat treatment (a16061-t6). the resultant chip thickness was measured to be 1.0 mm. estimate the cutting force, fc. use shear stress of 207 mpa and coefficient of friction on the tool face of 0.6.
Answers: 1
question
Engineering, 04.07.2019 18:20
How much power could a wind turbine produce if it had the following specifications? cp = 0.45 -d=1.2kg/m3 d=50m v 5m/s
Answers: 2
question
Engineering, 04.07.2019 19:10
How to increase the thermal officiency of an ideal simple rankino cycle? among these methods, which one is the best and why?
Answers: 2
You know the right answer?
Write a program to create a 3-bit counter with direction using the built in led’s for the msp432 lau...
Questions
question
English, 09.12.2019 12:31
question
World Languages, 09.12.2019 12:31
question
Mathematics, 09.12.2019 12:31
Questions on the website: 13722360