subject

In the NUCLEO-L476RG board, user LED (green one) is connected to PA.5(GPIOA and pin 5), the Bule user button is connected to PC.13(GPIOC and pin 13). Using this information, write a sequence of C instructions that would do the following. a. Configure the GPIO pin connected to the Green LED as an output.
b. Write a 1 to the pin to turn on the Green LED by writing to the output data register (ODR) of that GPIO port.
c. Configure the GPIO pin connected to the push button as an input.
d. Read the state of the button by reading the input data register (IDR) of that GPIO port.
Notes: provide the segments of your codes. You do not need to provide an entire declaration of GPIOx address and related registers struct of the GPIO (we assume they are already declared). For example, if you want to read the input data for pin 15 of GPIOC, the following code is sufficient: int a = GPIOC->IDR & (1 << 15);

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
What kind of motivation is katrina showing? use the drop-down menu to complete the statement. katrina is using motivation because she is personally interested in learning more.
Answers: 2
question
Computers and Technology, 22.06.2019 18:30
Which cultural aspect does this type of song best portray? a german polka dance
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
What type of slide show is a dynamic and eye-catching way to familiarize potential customers with what your company has to offer? a. ole b. photo album c. brochure d. office clipboard
Answers: 2
question
Computers and Technology, 25.06.2019 02:00
Software and services are used to conceive, plan, and execute projects in any field. these tools are excellent methods of increasing the probability of successful projects. open source linux project management mind-mapping
Answers: 2
You know the right answer?
In the NUCLEO-L476RG board, user LED (green one) is connected to PA.5(GPIOA and pin 5), the Bule use...
Questions
Questions on the website: 13722363