Question: Based on the AVR code given below, answer the questions that follows: // Problem! #define F_CPU 8000000UL #include #include int time_cntr-0 int main() TCCRO-Ox03; TCNTO-Ox00;

 Based on the AVR code given below, answer the questions that

Based on the AVR code given below, answer the questions that follows: // Problem! #define F_CPU 8000000UL #include #include int time_cntr-0 int main() TCCRO-Ox03; TCNTO-Ox00; DDRB-OxFF: while (1) ISR (TIMERO_OVF_vect) TCNTO - 6; if (time_cnt++ == 500) PORTB = PORTB0x10; time_cntr=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) 2. After how many seconds the Timer O interrupt occurs? Explain your answer. [5 points) What is the frequency of waveform generated at Port B pin 4? Show calculations. [10 points) 4. Achieve the same task (by re-writing the program) by using the polling method. [15 points) 3 Based on the AVR code given below, answer the questions that follows: // Problem! #define F_CPU 8000000UL #include #include int time_cntr-0 int main() TCCRO-Ox03; TCNTO-Ox00; DDRB-OxFF: while (1) ISR (TIMERO_OVF_vect) TCNTO - 6; if (time_cnt++ == 500) PORTB = PORTB0x10; time_cntr=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) 2. After how many seconds the Timer O interrupt occurs? Explain your answer. [5 points) What is the frequency of waveform generated at Port B pin 4? Show calculations. [10 points) 4. Achieve the same task (by re-writing the program) by using the polling method. [15 points) 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!