Answered step by step
Verified Expert Solution
Link Copied!

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

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions

Question

Explain how event handlers for controls are registered.

Answered: 1 week ago