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, 21.06.2019 21:00
Analyze the following code. int x = 1; while (0 < x) & & (x < 100) system.out.println(x++); a. the loop runs forever. b. the code does not compile because the loop body is not in the braces. c. the code does not compile because (0 < x) & & (x < 100) is not enclosed in a pair of parentheses. d. the numbers 1 to 99 are displayed. e. the numbers 2 to 100 are displayed.
Answers: 3
question
Computers and Technology, 22.06.2019 10:00
You need a reliable network for about twenty-five computers that will be distributed across a large building. it is important that the network be relatively cheap. which topology should you use?
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
Select all that apply. which of the following are proofreading options included in microsoft word? spell check find replace grammar check formatting check
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
Select the correct answer. a company is currently focusing on creating specific management goals for itself. which level of maturity is the company demonstrating under the sse_ccm framework? a. performed informally b. planned and tracked c. quantitatively controlled d. well-defined e. continuously improving
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
question
English, 20.11.2020 23:30
question
History, 20.11.2020 23:30
question
Mathematics, 20.11.2020 23:30