subject

A module on the microcontroller is configured using a control register called CTL that has the format shown below. SLP CLK CAP IE
2- 3- 2- 1-

• SLP: selects sleep mode; value between 0 and 3
• CLK: selects clock speed; value between 0 and 7
• CAP: selects built-in capacitor value; choice between () and 3
• IE: interrupt enable bit (I: enable/ (): disable)

To support programming the device, the environment has declared the symbolic constants:

SLP_3: 1100 0000
SLP_2: 1000 0000
SLP_1: 0100 0000
SLP_0: 0000 0000
CLK_7: 0011 1000
CLK_6: 0011 0000
CLK_0: 0000 0000
CAP_3: 0000 0110
CAP_0: 0000 0000
IE_1: 0000 0001
IE_0: 0000 0000

Required:
a. Write a line of code that configures the module as the following:
(Sleep mode 1)(Clock speed 5)(Capacitor value 2)(Interrupts enabled)
b. For the operation above, show the masks used and the final value of CTL in binary.
c. Write a piece of code that changes SLP to 2. The current value of SLP is unknown.
d. Write a piece of code that changes CLK to 6. The current value of CLK is unknown.
e. Write an if-condition line that checks if SLP=2.
f. Write an if-condition line that checks if CLK=6.
g. Write an if-condition that checks if the current value of CLK is either of (0, 2, 4, 6).

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:00
Which option should u select to ignore all tracked changes in a document
Answers: 1
question
Computers and Technology, 23.06.2019 05:20
Which operating system is a version of linux?
Answers: 1
question
Computers and Technology, 23.06.2019 21:10
Asample of 200 rom computer chips was selected on each of 30 consecutive days, and the number of nonconforming chips on each day was as follows: 8, 19, 27, 17, 38, 18, 4, 27, 9, 22, 30, 17, 14, 23, 15, 14, 12, 20, 13, 18, 14, 20, 9, 27, 30, 13, 10, 19, 12, 26. construct a p chart and examine it for any out-of-control points. (round your answers to four decimal places.)
Answers: 2
question
Computers and Technology, 24.06.2019 06:30
Adrawing that places all lines parallel to the z axis at an angle from the horizon is 99 ! a. an oblique drawing b. a perspective drawing c. an auxiliary view d. a one-point perspective drawing
Answers: 2
You know the right answer?
A module on the microcontroller is configured using a control register called CTL that has the forma...
Questions
question
Mathematics, 24.09.2019 04:30
question
Chemistry, 24.09.2019 04:30
Questions on the website: 13722367