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

  Two cyborgs walk into your home

Two cyborgs walk into your home, both claiming to be oracles for the graph 3-colorability decision problem. They both always give a yes/no answer in constant time for any instance, and are each self-consistent

  Find companies that specialize in computer forensics

What needs clarified? it's plainly stated use google to find 3 companies that specialize in computer forensics of those 3 companies write 2 or 3 paragraphs comparing what each company does.

  Estimate maximum aggregate i-o transfer rate in system

Estimate the maximum aggregate I/O transfer rate in this system. Hint: Only one device at a time can be serviced on a selector channel.

  Alter computation of prefix function-correctly match string

if ‘_' is wild-card, then pattern ‘foo*bar*nad' can be found in ‘foofoowangbarnad'. Alter computation of prefix function to correctly match strings using KMP.

  Steps to follow to verify local police department-s findings

Your computer investigation firm has been hired to verify the local police department's findings on a current case. What do you need to ask the police investigator for, and what procedures should you follow?

  Explain the management of high-assurance software

The company does not adduce any additional evidence of assurance. How would you explain to the management of this company why their software is in fact not "high-assurance" software?

  . write down each interaction with smartphone

Consider your smartphone as a system and use its calendar to set a calendar event with a reminder for your birthday. Write down each interaction between you and your smartphone as a scenario. Record all the interactions, including any feedback the sm..

  Why are you normally required to bind a service

What steps need to be taken by a network service to be ready to receive TCP/IP connections? Why are you normally required to bind a service to a specific port?

  Dis-assemble each of the following

Dis-assemble each of the following MIPS R2000 object code into source code instructions. Use register names, such as $t2, instead of numbers, such as $20.

  Determine independent variable and dependent variable

The length of the string is shortened by 5cm and the time is measured. Determine the independent variable? Determine the dependent variable? What must the controlled variables be?

  Create logic circuit to decode dtmf-like keypad

Create the logic circuit which will decode a DTMF-like keypad. Keypad comprises of 16 keys, numbered 0 to 9, *, #, A, B, C, and D. Underneath keypad are four horizontal lines and four vertical lines.

  Program that will accept a real number

Create a program that will accept a real number from the user and then display its whole and fractional parts. (For example, if the input is 5.32, the outputs should be the integer value

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