Question: 2 . Initialize the LED GPIOs to be Outputs Next we will need to enable PB - 2 as an output. This is done in
Initialize the LED GPIOs to be Outputs
Next we will need to enable PB as an output. This is done in the GPIOB MODER register, which can
be found described in section of the manual. This register has fields, each two bits wide. To set to
output, the corresponding field must be set to for MODER # To do this you will first need to clear the
two bits to zero, then or in the value. So calculate the mask below, then the value to OR in first in binary
then in hex.
Register
MODER
MODER
MODER
MODER
MODER
MODER
MODER
MODER
MODER
MODER
MODER
MODER
MODER
MODER
MODER
MODER
MODER
Mask
Value
Mask in hex: Value in hex:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
