Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started