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
If you have a lien on your vehicle, you cannot apply for a duplicate copy of your vehicle’s certificate of title. true or false
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Which of the following includes the three primary network access technologies? dsl, cable modem, broadband lan, wan, man voip, uc, iptv tcp/ip, ftp, dhcp
Answers: 2
question
Computers and Technology, 24.06.2019 13:10
Write a program that has a conversation with the user. the program must ask for both strings and numbers as input. the program must ask for at least 4 different inputs from the user. the program must reuse at least 3 inputs in what it displays on the screen. the program must perform some form of arithmetic operation on the numbers the user inputs. turn in your .py file as well as a screenshot of your program's output. include comments in your code to explain how it works an example program run might look like (have fun with this and be creative): ‘what is your name? ’ “josh” ‘, josh. what is your favorite color? ’ “green” ‘mine too. do you also like ice cream? ’ “no” ‘josh, how old are you? ’ “40” ‘ and how many siblings do you have? ’’ “3” ‘that means you are one of 4 kid(s). is green the favorite color of anyone else in your house? ’
Answers: 3
question
Computers and Technology, 25.06.2019 00:00
He computer component that disperses heat from the microprocessor to the cooling fan is a cooler thermometer heat sink
Answers: 1
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: 13722367