Clock Rate Question

In some code I found on the internet there is the following:

//16MHz/ 1024/ 256
TCCR2B = 1<<CS22 | 1<<CS21;

Assuming that the external crystal is 16MHz, I see from the datasheet that TCCR2B sets the clock divider to 256.
However, I don't know where the 1024 in the comment is coming from.

I've looked at the rest of the code and don't see anything related to it, but I may have missed something.

Is there a register I can poll to see what this value is programmed to be?

In the end, I am trying to verify what the clock is set to. Can I pull it out of the chip to measure it?

Thank you so much

P.S. I am using an OSEPP Uno board

1024 is the prescaler divide factor, 256 is the divide because its an 8-bit counter.

The code doesn't match the comment, someone edited out CS20 and forgot to change the comment?

MarkT:
1024 is the prescaler divide factor, 256 is the divide because its an 8-bit counter.

The code doesn't match the comment, someone edited out CS20 and forgot to change the comment?

It is possible.

Is there a way to output the clock on a digital pin?

Do you mean the clock (16 MHz) or the timer output?

The timer output would be preferred.

You can get the timers to output to certain (pre-configured) digital pins. Near the bottom of this page are examples:

Thanks Nick - great writeup!