Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem The program given below implements a general - purpose delay loop. The clock frequency of the Arduino microcontroller that is running the program is

Problem The program given below implements a general-purpose delay loop. The clock frequency of the Arduino microcontroller that is running the program is f=20 MHz, and the number of clock cycles for each instruction is given. Assume that the value of the variable Repetitions can be any integer number between 1 and 32767.
int Count1=Repetitions; /5 clock Cycles
While (Count1>=0)/15 clock Cycles
{ int A=0; /5 clock Cycles
Int A+=1; /10 clock Cycles
Int A-=1; /10 clock Cycles
Count1= Count1-1; /10 clock Cycles
}
For the following questions write all your calculations on the space provided
i. Which is the clock period?
ii. Which is the Minimum delay that can be implemented by the general purpose delay loop?
iii. Which is the maximum delay that can be implemented by the general purpose delay?
iv. Which value should be the Count1 in order to measure a 2 second delay?
v. If Count1=1000, What will be the delay implemented ?
vi. If the type for the variable Repetitions is changed to byte what would be the value of the maximum delay that can be implemented?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Current Trends In Database Technology Edbt 2004 Workshops Edbt 2004 Workshops Phd Datax Pim P2panddb And Clustweb Heraklion Crete Greece March 2004 Revised Selected Papers Lncs 3268

Authors: Wolfgang Lindner ,Marco Mesiti ,Can Turker ,Yannis Tzitzikas ,Athena Vakali

2005th Edition

3540233059, 978-3540233053

More Books

Students also viewed these Databases questions