ATMEGA8L ATMEL [ATMEL Corporation], ATMEGA8L Datasheet - Page 68

no-image

ATMEGA8L

Manufacturer Part Number
ATMEGA8L
Description
8-bit AVR with 8K Bytes In-System Programmable Flash
Manufacturer
ATMEL [ATMEL Corporation]
Datasheets

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATMEGA8L-6AU
Manufacturer:
ATMEL
Quantity:
675
Part Number:
ATMEGA8L-8AC
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATMEGA8L-8AI
Manufacturer:
MICROCHIP
Quantity:
1 292
Part Number:
ATMEGA8L-8AI
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATMEGA8L-8AI
Manufacturer:
ATMEL
Quantity:
8 000
Part Number:
ATMEGA8L-8AI
Manufacturer:
ALTERA
0
Part Number:
ATMEGA8L-8AJ
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATMEGA8L-8AU
Manufacturer:
ATMEL
Quantity:
4 590
Part Number:
ATMEGA8L-8AU
Manufacturer:
Atmel
Quantity:
7 500
Part Number:
ATMEGA8L-8AU
Manufacturer:
ATMEL
Quantity:
591
Part Number:
ATMEGA8L-8AU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Company:
Part Number:
ATMEGA8L-8AU
Quantity:
7
Company:
Part Number:
ATMEGA8L-8AU
Quantity:
7
Timer/Counter Clock
Sources
Counter Unit
Operation
68
ATmega8(L)
The Timer/Counter can be clocked by an internal or an external clock source. The clock
source is selected by the clock select logic which is controlled by the clock select
(CS02:0) bits located in the Timer/Counter Control Register (TCCR0). For details on
clock sources and prescaler, see “Timer/Counter0 and Timer/Counter1 Prescalers” on
page 72.
The main part of the 8-bit Timer/Counter is the programmable counter unit. Figure 27
shows a block diagram of the counter and its surroundings.
Figure 27. Counter Unit Block Diagram
Signal description (internal signals):
The counter is incremented at each timer clock (clk
external or internal clock source, selected by the clock select bits (CS02:0). When no
clock source is selected (CS02:0 = 0) the timer is stopped. However, the TCNT0 value
can be accessed by the CPU, regardless of whether clk
overrides (has priority over) all counter clear or count operations.
The counting direction is always up (incrementing), and no counter clear is performed.
The counter simply overruns when it passes its maximum 8-bit value (MAX = 0xFF) and
then restarts from the bottom (0x00). In normal operation the Timer/Counter Overflow
Flag (TOV0) will be set in the same timer clock cycle as the TCNT0 becomes zero. The
TOV0 Flag in this case behaves like a ninth bit, except that it is only set, not cleared.
However, combined with the timer overflow interrupt that automatically clears the TOV0
Flag, the timer resolution can be increased by software. A new counter value can be
written anytime.
count
clk
max
Tn
DATA BUS
TCNTn
Increment TCNT0 by 1.
Timer/Counter clock, referred to as clk
Signalize that TCNT0 has reached maximum value.
count
Control Logic
max
TOVn
(Int. Req.)
clk
Tn
T0
T0
). clk
in the following.
T0
is present or not. A CPU write
T0
Clock Select
( From Prescaler )
can be generated from an
Detector
Edge
2486M–AVR–12/03
Tn

Related parts for ATMEGA8L