Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Help with C++ coding problem We are asked to Create a program that blinks the LED when the button is pressed and KEEPS COUNT of
Help with C++ coding problem
We are asked to Create a program that blinks the LED when the button is pressed and KEEPS COUNT of the number of times the button has been pressed.
We are asked to Create a program that blinks the LED when the button is pressed and KEEPS COUNT of the number of times the button has been pressed.
polling key press LaunchPad F5529 has two user buttons: S1 is connected at port 2 BITI (P2.1. S2 is at port 1 B?TI (P1.1 ) User Buttons User LEDs S1 R30 P21 12 LED2 ?? R29 ND GND I LED1 PWR 470R There are two ways of knowing if a key has been pressed, interrupt or polling. We will do the polling here using previous code and add a simple polling loop to observe the value of P1.1. Note that before the BIT1 can be observed, we need to turn on the "intenal pull up resister" on BIT1, otherwise, there is no voltage supplied to the key button. If you are not famillar with the BITWISE operation (AND, OR, XOR, NOT), check this page. polling key press LaunchPad F5529 has two user buttons: S1 is connected at port 2 BITI (P2.1. S2 is at port 1 B?TI (P1.1 ) User Buttons User LEDs S1 R30 P21 12 LED2 ?? R29 ND GND I LED1 PWR 470R There are two ways of knowing if a key has been pressed, interrupt or polling. We will do the polling here using previous code and add a simple polling loop to observe the value of P1.1. Note that before the BIT1 can be observed, we need to turn on the "intenal pull up resister" on BIT1, otherwise, there is no voltage supplied to the key button. If you are not famillar with the BITWISE operation (AND, OR, XOR, NOT), check this pageStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started