[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] Timer question
From: |
Rainer Faulstich |
Subject: |
[avr-libc-dev] Timer question |
Date: |
Mon, 28 Jul 2003 11:49:31 +0200 |
Hi,
i am a little bit confused about the timer implementation of Atmega128 in
timer128.h of AVRlibc. There are the following defines:
#define TIMER_CLK_STOP 0x00
#define TIMER_CLK_DIV1 0x01
#define TIMER_CLK_DIV8 0x02
#define TIMER_CLK_DIV64 0x03
#define TIMER_CLK_DIV256 0x04
#define TIMER_CLK_DIV1024 0x05
#define TIMER_CLK_T_FALL 0x06
#define TIMER_CLK_T_RISE 0x07
#define TIMER_PRESCALE_MASK 0x07
On the other hand the AVR Manual for Atmega128 shows bit patterns for CS02,
CS01, CS00 of TCCR0 that differ from those.
For example CLK32 = 0x03. I.e. CS02 = 0, CS01 = 1, CS00 = 1.
Can anybody resolve my confusion
Rainer
- [avr-libc-dev] Timer question,
Rainer Faulstich <=