Atmel AVR timer/counter examples

Here’s the catch: the timer/counter is capable of operating on a completely hardware level, no software interaction required. A nice explanation is given here (section 2). This page starts with an introduction using a software counter. Which shows how tedious that is, especially counting the clock durations yourself.

Another page at AVRfreaks here deals exclusively with the software implementation, although using the timer/counter registers for counting. This is useless and horribly wrong, that’s not how timers/counters with “output compare” capabilities should be used! The dangerous part is that this article doesn’t even mention the hardware-only implementation.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: