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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:50, christinavelez26
Using least squares fitting, you are to fit the data sets to the following models and solve for the parameters ai , where i is the index of the parameter. the input/output data for the systems are linked in the bblearn site. for each of the systems use matlab to plot the supplied data vs. the model fit on one plot. include your code in the solutions. (a) linear fit "lineardata. mat" y=a1x^3 + a2x^2 + a3x + a4 (b) plant fit "plantdata. mat g(s) = a1/(s + a2)
Answers: 1
image
Computers and Technology, 22.06.2019 18:00, abbygriffin2009
Martha is a healer, a healthcare provider, and an experienced nurse. she wants to share her daily experiences, as well as her 12 years of work knowledge, with people who may be interested in health and healing. which mode of internet communication can martha use?
Answers: 3
image
Computers and Technology, 22.06.2019 18:30, Jessieeeeey
Kto rozmawia z clamentain przez krótkofalówke w the walking dead która śledzi lee w 4 epizodzie
Answers: 1
image
Computers and Technology, 22.06.2019 18:30, Liantic8738
List the five on-board vehicle subsystems
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 in other subjects:

Konu
Biology, 29.09.2019 04:30
Konu
Mathematics, 29.09.2019 04:30