Lecture 6: Timers, Counters, PWM Flashcards

1
Q

Can a timer keep the time even if the processor is off?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the 3 sources that a clock can run off?

A

Quartz clock
Pre scaled clock
External clock

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the max prescaler on Timer 0?

A

1023 - > 10 bit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

On Timer 0, what is the direction of count?

A

Always up

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What happens to Timer 0 when it reaches its max value?

A

it will overrun and then reset, starting from the bottom. We can set an overflow interrupt for code to execute when the timer reaches its max value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

With NO prescaling, what is the timeout period of Timer 0?

A

Range / Clock Frequency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the formula for 1 tick period?

A

1 / clock frequency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In what Register do we set the prescaler for the timers?

A

Timer0: TCCR0
Timer1: TCCR1B
Timer2: TCCR2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In PWM generation, what is the dutycycle formula?

A

Pulsewidth / period

How well did you know this?
1
Not at all
2
3
4
5
Perfectly