Based on the AVR code given below, answer the questions that follows: // Problem 1 #define...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Based on the AVR code given below, answer the questions that follows: // Problem 1 #define F_CPU 8000000UL #include <avr/io.h> #include <avr/interrupts.h> int time_entr=0; int main() 1 ISR 1 TCCRO 0x03; TCNTO 0x00; DDRB=0xFF; while (1)); (TIMERO_OVF_vect) TCNTO= 6; if (time_entr++ 500) 1 } PORTB=PORTB^0x10; time_entr = 0; 1. What is the prescalar value and, as a result of this value, what clock signal (specify in Hz) gets applied to Timero? [5 points] [5 points] [10 points] [15 points] 2. After how many seconds the Timer 0 interrupt occurs? Explain your answer. 3. What is the frequency of waveform generated at Port B pin 4? Show calculations. 4. Achieve the same task (by re-writing the program) by using the polling method. Based on the AVR code given below, answer the questions that follows: // Problem 1 #define F_CPU 8000000UL #include <avr/io.h> #include <avr/interrupts.h> int time_entr=0; int main() 1 ISR 1 TCCRO 0x03; TCNTO 0x00; DDRB=0xFF; while (1)); (TIMERO_OVF_vect) TCNTO= 6; if (time_entr++ 500) 1 } PORTB=PORTB^0x10; time_entr = 0; 1. What is the prescalar value and, as a result of this value, what clock signal (specify in Hz) gets applied to Timero? [5 points] [5 points] [10 points] [15 points] 2. After how many seconds the Timer 0 interrupt occurs? Explain your answer. 3. What is the frequency of waveform generated at Port B pin 4? Show calculations. 4. Achieve the same task (by re-writing the program) by using the polling method.
Expert Answer:
Answer rating: 100% (QA)
1 The prescalar value is 1024which means that the clock signal applied to Timer 0 is 8000000 1024 78125 Hz Question 2 Timer 0 will overflow after 255 clock cyclesWith a clock signal of 78125 Hzthis me... View the full answer
Related Book For
Managerial Accounting for Managers
ISBN: 978-0073527130
2nd edition
Authors: Eric Noreen, Peter Brewer, Ray Garrison
Posted Date:
Students also viewed these programming questions
-
Chart of Accounts 1 0 0 Cash 1 0 5 Accounts Receivable ( All ) 1 1 0 Supplies 1 1 5 Furniture and Equipment 2 0 0 Accounts Payable ( All ) 2 0 5 Bank Loan 2 1 0 HST Payable 2 1 5 HST Recoverable 3 0...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
KYC's stock price can go up by 15 percent every year, or down by 10 percent. Both outcomes are equally likely. The risk free rate is 5 percent, and the current stock price of KYC is 100. (a) Price a...
-
Explain the difference between impregnation and infiltration. Give some applications for each?
-
Sunlight reaching the Earth's atmosphere has an intensity of about 1300 W/m2. Estimate how many photons per square meter per second this represents. Take the average wavelength to be 550 nm.
-
Use the Condon-Slater rules to prove the orthonormality of two n-electron Slater determinants of orthonormal spin-orbitals.
-
A fleet of 100 taxis is divided into two groups of 50 cars each to determine whether premium gasoline reduces maintenance costs. Premium unleaded fuel is used in group A, while regular unleaded fuel...
-
Rovet Company uses normal costing. It allocates manufacturing overhead costs using a budgeted rate per machine- hour. The following data are available for 2012: Budgeted manufacturing overhead...
-
(d) (e) While you are browsing the bank's website, you find that DBS quotes an interest rate of 1.6% per annum on a car loan. Incidentally, you are thinking about buying that cheapest possible...
-
Denise Lopez, age 40, is single and has no dependents. She is employed as a legal secretary by Legal Services, Inc. She owns and operates Typing Services located near the campus of Florida Atlantic...
-
Write a command to change the permission (others can read, owner can write and group members can execute only) of all the files and directories within the directory XYZ. Write a command to list all...
-
4. The regular air fare between Boston and San Francisco is 419. An airline using planes on this route observes that they fly with an average of 236 passengers. Market research tells the airlines'...
-
Using the following information: a. The bank statement balance is $2,996. b. The cash account balance is $3,238. c. Outstanding checks amount to $695. d. Deposits in transit are $788. e. The bank...
-
What was Netflix's pro forma ESO obligation on December 31, 2020? Your answer should be in millions of dollars. Question 12 5.55 pts Based on your answers to questions eight through 11, what was the...
-
Johnny's Lunches is considering purchasing a new, energy-efficient grill. The grill will cost $31,000 and will be depreciated straight-line over 10 years to a salvage value of zero. The grill will...
-
The following selected circumstances relate to pending lawsuits for Erismus, Incorporated Erismus's fiscal year ends on December 31. Financial statements are issued in March 2025. Erismus prepares...
-
The Case of the Busted Blockbuster you have been hired by a law firm representing an author who sold movie rights to a novel to a small studio in exchange for a share of the profits. The movie was...
-
What is the back work ratio? What are typical back work ratio values for gas-turbine engines?
-
Lompac Products manufactures a variety of products in its factory. Data for the most recent month's operations appear below: Beginning raw materials inventory ........................ $60,000...
-
Refer to the data for Archer Company in Exercise 3-6. Data From Ex 3-6 Month ............Units Shipped.......... Total Shipping Expense January .....................................
-
The questions in this exercise are based on Toll Brothers, Inc., one of the largest home builders in the United States. To answer the questions, you will need to download Toll Brothers' 2004 annual...
-
Estimate the gravitational force and the acceleration due to gravity on a body of \(1.25 \mathrm{~kg}\) mass on the earth's surface. The radius and mass of the earth are \(6370 \mathrm{~km}\) and...
-
A reactor contains a gas mixture of \(25 \mathrm{~kg} \mathrm{NH}_{3}, 15 \mathrm{~kg} \mathrm{CO}\) and \(10 \mathrm{~kg} \mathrm{C}_{2} \mathrm{H}_{2}\). Calculate the total number of moles of the...
-
Estimate the gravitational force on a body of \(1.5 \mathrm{~kg}\) mass on the earth's surface, given that the radius and mass of the earth are \(6000 \mathrm{~km}\) and \(6 \times 10^{24}...
Study smarter with the SolutionInn App