Computers and Technology

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).

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 18:30, emmaishere69
List 3 items that were on kens resume that should have been excluded
Answers: 1
image
Computers and Technology, 24.06.2019 13:20, ana9340
3. ranga ramasesh is the operations manager for a firm that is trying to decide which one of four countries it should research for possible outsourcing providers. the first step is to select a country based on cultural risk factors, which are critical to eventual business success with the provider. ranga has reviewed outsourcing provider directories and found that the four countries in the table that follows have an ample number of providers from which they can choose. to aid in the country selection step, he has enlisted the aid of a cultural expert, john wang, who has provided ratings of the various criteria in the table. the resulting ratings are on a 1 to 10 scale, where 1 is a low risk and 10 is a high risk. john has also determined six criteria weightins: trust, with a weight of 0.3; quality, with 0.2; religious, with 0.1; individualism, with 0.2; time, with 0.1; and uncertainity, with 0.1. using the factor-rating method, which country should ranga select? why? (2 points)
Answers: 3
image
Computers and Technology, 24.06.2019 23:30, ninja12302
Does anyone have the problem where you try to watch a video to get your answer but it brings up a thing asking your gender to make ads relevant but it doesn't load? btw i won't be able to see the answer so use the comments .
Answers: 1
image
Computers and Technology, 25.06.2019 08:10, kappy10
A(n) is a step-by-step direction for performing a specific task, which is written in a language the computer can understand. servercachearrayprogram
Answers: 1
Do you know the correct answer?
A module on the microcontroller is configured using a control register called CTL that has the forma...

Questions in other subjects:

Konu
Mathematics, 25.11.2020 17:00
Konu
Mathematics, 25.11.2020 17:00