Question: ( 4 pts ) An 8 - bit microcontroller is being used to control the voltage applied to a DC motor. You have a 1

(4 pts) An 8-bit microcontroller is being used to control the voltage applied to a DC motor. You have a 12 Volt battery. Assuming you have access to the function void set_pwm_O(int duty). Show one line of code indicating how to make the function call if you need to apply 2.5 volts to the motor.
Write your answer here: set_pwm_o()
(3 pts) If a register named Reg has 4-bits, what is the result of the following operations:
Reg =8
Reg=Reg1
Write your answer here:
(5 pts) Set bits 0 and 2 of PORTB to one and keep the remaining bits unchanged. Write your operation using decimal notation.
Write your answer here:
(5 pts) Set bits 0 of PORTA to zero and keep the remaining bits unchanged. Write your operation using hexadecimal notation.
Write your answer here
(5 pts) Verify if PAO is one regardless of the other bits. Write your operation using binary notation.
Write your answer here:
(5 pts) Set all pins of port D as inputs. Use decimal notation.
Write your answer here:
 (4 pts) An 8-bit microcontroller is being used to control the

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!