Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Based on the AVR code given below, answer the questions that follows: // Problem 1 #define F_CPU 8000000UL #include #include int time_cntr=0; int main() {

image text in transcribed

Based on the AVR code given below, answer the questions that follows: // Problem 1 #define F_CPU 8000000UL #include #include int time_cntr=0; int main() { TCCRO=0x03; TCNTO=0x00; DDRB = 0xFF; while (1): } ISR (TIMERO_OVF_vect) TCNTO = 6; if (time_cnt++ == 500) { PORTB = PORTB^0x10; time_cntr=0; 3 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 0 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 1 #define F_CPU 8000000UL #include #include int time_cntr=0; int main() { TCCRO=0x03; TCNTO=0x00; DDRB = 0xFF; while (1): } ISR (TIMERO_OVF_vect) TCNTO = 6; if (time_cnt++ == 500) { PORTB = PORTB^0x10; time_cntr=0; 3 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 0 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

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_2

Step: 3

blur-text-image_3

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

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions

Question

Explain consumer behaviour.

Answered: 1 week ago

Question

Explain the factors influencing consumer behaviour.

Answered: 1 week ago

Question

13-6 How will MIS help my career?

Answered: 1 week ago

Question

13-4 What are alternative methods for building information systems?

Answered: 1 week ago