AVR Quiz @ avrfreaks.net

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi!

I also looked at https://www.avrfreaks.net/index.p... ("AVR Quiz") but started a new thread, because it's so old...

First of all, it's very entertaining to have a quiz on this website.

General question:
Is there somewhere any information, where the correct answers are explained (maybe discussed)?

Specifically, I found the question:
"What is the longest delay you can get between timer overflows with a free running timer in a ATmega?"
I would say, that this depends on the clock source which can be an arbitrary small frequency!
So, I would be insterested how the correct answer was thought...

In the beginning was the Word, and the Word was with God, and the Word was God.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I agree that it is a bad question. The possible answers that they give are:

Quote:
~2048 sec
~134217 sec
~1073741 sec
The longest number of clocks on a typical 16 bit timer is 65536 * 1024 = 67107840. However there might be some atmega that has higher prescaler values (I know some tinys have prescalers up to 16384). Using the value of 67107840, then the cpu frequencies for the values above are:
Quote:
32768Hz
500Hz
62.5Hz
The "correct" value is presumably 134217 sec (found by taking the test twice). That number is 65536 * 2048 / 1000.

Regards,
Steve A.

The Board helps those that help themselves.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Koshchi: Thanks for the calculation.
Yes, you can only guess the "correct" answer.
I did not find any ATmega with a prescaler more than 1024. But I looked only in a few datasheets...
Since the question is about ATmega, I didn't look to the tinys.

A clock value of 500Hz seems a rather untypical value for ATmega designs (I would assume that 90% of all designs use something between 8 and 20MHz).

Does anybody know, who thinks out the questions?
Is it Atmel itfelf? Or some "freaks"?

In the beginning was the Word, and the Word was with God, and the Word was God.