Question
USE CODE BLOW: // Replace 0 with the correct value for each unknown cell. double pre_scale_factor_001 = 0; double pre_scale_factor_010 = 0; double pre_scale_factor_011 =
USE CODE BLOW:
// Replace 0 with the correct value for each unknown cell.
double pre_scale_factor_001 = 0;
double pre_scale_factor_010 = 0;
double pre_scale_factor_011 = 0;
double pre_scale_factor_100 = 0;
double pre_scale_factor_101 = 0;
double counter_freq_001 = 0;
double counter_freq_010 = 0;
double counter_freq_011 = 0;
double counter_freq_100 = 0;
double counter_freq_101 = 0;
double overflow_interval_001 = 0;
double overflow_interval_010 = 0;
double overflow_interval_011 = 0;
double overflow_interval_100 = 0;
double overflow_interval_101 = 0;
double overflow_frequency_001 = 0;
double overflow_frequency_010 = 0;
double overflow_frequency_011 = 0;
double overflow_frequency_100 = 0;
double overflow_frequency_101 = 0;
// There is no test driver for this program.
int main() {
for ( ;; ) {
}
return 0;
}
Complete a table which shows the clock pre-scale factors, timer counter increment frequency, timer overflow frequency, and timer overflow period, for a 16 bit timer such as Timer 1 or Timer 3 Topic 9 lecture covered Timer 0 in detail. In the case study Set Up and Read Time From Timer0, a table shows the rate at which the timer counter is updated and overflows for arious values of the clock select pins CS02:0 Beware: as released, a numerical error was present in the lecture notes. The number 7812 should really be 7812.5, our task is to complete a similar table for a 16-bit timer (Timer 1 or Timer 3; the table will be the same in either case), based on an assumed CPU clock speed of 8MHz. An 8-bit counter has 256 distinct values ranging from 0 to 255; a 16-bit timer counter has 65536 distinct values, ranging from 0 to 65535 CSn2:0 Pre-scale 0b000 0 0b001 pre_scale_factor_001 counter_freq_001 overflow_interval_001 overflow_frequency_001 0b010 pre_scale_factor_010 counter_freq_010 overflow_interval_010 overflow_frequency_010 0b011 pre_scale_factor_011 counter_freq_011 overflow_interval_011 overflow_frequency_011 0b100 pre_scale_factor_100 counter_freq 100 overflow_interval_100 overflow_frequency_100 0b101 pre_scale_factor_101 counter_freq_101 overflow_interval_101 overflow_frequency 101 Counter frequency Overflow period Overflow frequency na n'a unknown cell in the table is labelled with a C identifier. Complete the code skeleton below by creating a global variable for each of the unlnown cells in the table. The name of each global variable should be the same as the label appearing in the corresponding cell of the table The type of the global variable should be double The variable must be initialised with the raw numeric value, with no unit suffix. For example o SMHz would be written: 8000000, Se6, 8.0e+6, or some equivalent double-precision floating point value o 125kHz would be written: 125000, 1.25e5, or some equivalent numeric value .The initial value must be accurate to a precision of1x10-7 Complete a table which shows the clock pre-scale factors, timer counter increment frequency, timer overflow frequency, and timer overflow period, for a 16 bit timer such as Timer 1 or Timer 3 Topic 9 lecture covered Timer 0 in detail. In the case study Set Up and Read Time From Timer0, a table shows the rate at which the timer counter is updated and overflows for arious values of the clock select pins CS02:0 Beware: as released, a numerical error was present in the lecture notes. The number 7812 should really be 7812.5, our task is to complete a similar table for a 16-bit timer (Timer 1 or Timer 3; the table will be the same in either case), based on an assumed CPU clock speed of 8MHz. An 8-bit counter has 256 distinct values ranging from 0 to 255; a 16-bit timer counter has 65536 distinct values, ranging from 0 to 65535 CSn2:0 Pre-scale 0b000 0 0b001 pre_scale_factor_001 counter_freq_001 overflow_interval_001 overflow_frequency_001 0b010 pre_scale_factor_010 counter_freq_010 overflow_interval_010 overflow_frequency_010 0b011 pre_scale_factor_011 counter_freq_011 overflow_interval_011 overflow_frequency_011 0b100 pre_scale_factor_100 counter_freq 100 overflow_interval_100 overflow_frequency_100 0b101 pre_scale_factor_101 counter_freq_101 overflow_interval_101 overflow_frequency 101 Counter frequency Overflow period Overflow frequency na n'a unknown cell in the table is labelled with a C identifier. Complete the code skeleton below by creating a global variable for each of the unlnown cells in the table. The name of each global variable should be the same as the label appearing in the corresponding cell of the table The type of the global variable should be double The variable must be initialised with the raw numeric value, with no unit suffix. For example o SMHz would be written: 8000000, Se6, 8.0e+6, or some equivalent double-precision floating point value o 125kHz would be written: 125000, 1.25e5, or some equivalent numeric value .The initial value must be accurate to a precision of1x10-7Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started