Question: Question 4 ( 1 5 Marks ) a . The unfinished program in Figure 3 is to be used to continuously measure the pulse width
Question Marks
a The unfinished program in Figure is to be used to continuously measure the pulse width of a Hz square wave. The square wave is sent to the input capture pin of the ATMega The program uses a prescaler value that gives the pulse width in microsecond us using a bits bytes data type. The lower byte of the result is displayed on PORTA and the upper byte on PORTB. Assuming XTAL mathrmMHz and the timer is operated in normal mode. Complete the program by filling in the missing information wherever a question sign occurs in Figure
#include
int main
l
unsigned int tlt Period;
DDRD ; Mark
DDRA ; Mark
DDRB ; Mark
TCCRA ; Mark
whilel
l
TCCRB ; Marks
while TIFR& l
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
