What does the code segment do assuming that p3.5

Assignment Help Basic Computer Science
Reference no: EM13165595

Consider the following code segment. Assume that processor clock in the active mode is set to 1,000,000 Hz. In this mode

the platform draws 0.5 mA.

1. while(1) {

2. int i;

3. for(i = 2000; i>0; i--); // one loop iteration takes 5 clock cycles

4. P3OUT |= BIT5; // Set P3.5

5. for (i = 2000; i>0; i--); // Delay

6. P3OUT &= ~BIT5; // Clear P3.5

7. }

1).What does the code segment do assuming that P3.5 is configured as a digital output. You may ignore delay

needed to execute instructions in lines 1, 4 and 6.

 

2).What will happen if you connect P3.5 at the buzzer?

 

3). How would you implement functionality achieved by the code segment above using TimerB. Port P3.5 is

multiplexed with the output signal from the capture and compare block 4 of TimerB. Give details. How would you initialize the system? What would you do in the main loop?

Reference no: EM13165595

Questions Cloud

Represent processor demand in the time interval : Let the function D[i, j] represent processor demand in the time interval (i, j). Prove the following theorem.
How many grams of br2 would there be moles of br2 : How many grams of Br2 would there be in 8.00 moles of Br2?
What is the formula weight of cu(no3)2 : What quantity of Cu(NO3)2 is present in 201 mL of a 0.50 M solution?
How many photons does such a laser emit in one minute : Small helium-neon lasers emit 3.60 mJ/s of light at 634 nm. How many photons does such a laser emit in one minute?
What does the code segment do assuming that p3.5 : What does the code segment do assuming that P3.5 is configured as a digital output. You may ignore delay needed to execute instructions in lines 1, 4 and 6.
Which of the following molecules are polar : Which of the following molecules are polar? (There may be more than one; choose ALL the polar molecules for full credit)
Draw line-angle structural formulas : Draw line-angle structural formulas for 8 constitutional isomers that have a molecular formula C4H8O.
Calculate the molar mass of the biomolecule : a 200 gram sample of a large biomolecule was dissolved in 15 grams of carbon tetrachloride. the boiling point of this solution was determined to be 77.85 degees celcius. calculate the molar mass of the biomolecule.
Context of a software system : Identify some examples of testing a safety requirement and a reliability requirement in the context of a software system that controls the electrical components of a roller coaster at an amusement park

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Why information security is not factor for organization

But would not require to give for information security on those systems. Explain that environment and desribe why information security is not factor for that organization.

  Recognize components of system cpu

Recognize the following components of your system: type of central processing unit (CPU), amounts of random access memory (RAM) and read-only memory (ROM), input and output devices, and types of storage.

  Code works and does what it is suppose to do

Please make sure the code works and does what it is suppose to do. I keep getting answers on my other assignments that were copy and pasted from god knows where and had nothing to do with the assignment instructions.

  Factoring is the problem of computing

Consider the one time pad encryption scheme to encrypt a 1-bit message. Replace the XOR operation with another operation X. For which X does the resulting scheme satisfy perfect secrecy?

  What is capacity with two shifts

Given the following data for Albert's fabricating production area:Fixed costs for one shift = $60,000. What is the capacity with two shifts? The additional fixed cost for a second shift is $40,000.

  Explaining regular language and context-free language

Let L1 be a regular language and L2 be a context-free language, both defined over the same alphabet Σ.

  Explaining straight-line depreciation method

Explain in scholarly detail how to carry out Straight-line Depreciation Method calculations.

  How consultant choose optimal location of main pipeline

Given x & y coordinates of wells, how must professor consultant choose the optimal location of main pipeline (the one which minimizes total length of spurs).

  Describing equivalence relation

Let X = Z × (Z {0}). Define the relation  on X by (x, y)  (z, t) ↔ xt = yz for every (x, y), (z, t) ∈ X. Show that this is an equivalence relation on X.

  Question about artificial intelligence

Artificial intelligence topics include Expert Systems and Genetic Algorithms. Do you think that corporations can really use artificial intelligence to make a good business decision?

  Explaining logical knowledge base represents the world

A logical knowledge base represents the world using a set of sentences with no explicit structure. Analogical representation, on the other hand, has physical structure that corresponds.

  Create incident response policy for development of response

Create the incident response policy which covers the development of incident response team, disaster recovery process and business continuity planning.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd