Question: 2 . Initialize the LED GPIOs to be Outputs Next we will need to enable PB - 2 as an output. This is done in

2. Initialize the LED GPIOs to be Outputs
Next we will need to enable PB-2 as an output. This is done in the GPIOB MODER register, which can
be found described in section 8.4.1 of the manual. This register has 16 fields, each two bits wide. To set to
output, the corresponding field must be set to 01 for MODER #2. 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.
4
Register 313029282726252423222120191817161514131211109876543210
MODER
MODER15
MODER14
MODER13
MODER12
MODER11
MODER10
MODER9
MODER8
MODER7
MODER6
MODER5
MODER4
MODER3
MODER2
MODER1
MODER0
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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!