attiny25v ATMEL Corporation, attiny25v Datasheet - Page 102

no-image

attiny25v

Manufacturer Part Number
attiny25v
Description
Microcontroller With 2/4/8k Bytes In-system Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
attiny25v-10MU
Manufacturer:
ATMEL
Quantity:
1 650
Part Number:
attiny25v-10MU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
attiny25v-10PU
Manufacturer:
Atmel
Quantity:
29 497
Part Number:
attiny25v-10PU
Manufacturer:
Atmel
Quantity:
5 000
Part Number:
attiny25v-10SU
Manufacturer:
ATMEL
Quantity:
2 110
Part Number:
attiny25v-10SU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
attiny25v-15ST
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
102
ATtiny25/45/85
When OCR1A contains $00 or the top value, as specified in OCR1C register, the output
PB1(OC1A) is held low or high according to the settings of COM1A1/COM1A0. This is shown in
Table
Table 13-2.
In PWM mode, the Timer Overflow Flag - TOV1 is set when the TCNT1 counts to the OCR1C
value and the TCNT1 is reset to $00. The Timer Overflow Interrupt1 is executed when TOV1 is
set provided that Timer Overflow Interrupt and global interrupts are enabled. This also applies to
the Timer Output Compare flags and interrupts.
The PWM frequency can be derived from the timer/counter clock frequency using the following
equation:
The duty cycle of the PWM waveform can be calculated using the following equation:
...where T
Resolution indicates how many bits are required to express the value in the OCR1C register. It
can be calculated using the following equation:
Table 13-3.
PWM Frequency
13-2.
COM1A1
20 kHz
30 kHz
40 kHz
50 kHz
60 kHz
70 kHz
PCK
0
0
1
1
1
1
is the period of the fast peripheral clock (1/25.6 MHz = 39.1 ns).
PWM Outputs OCR1A = $00 or OCR1C
Timer/Counter1 Clock Prescale Select in the Asynchronous Mode
Clock Selection
D
PCK/16
PCK/16
PCK/8
PCK/8
PCK/8
PCK/4
COM1A0
=
1
1
0
0
1
1
(
----------------------------------------------------------------------------
R
OCR1A
f
=
(
OCR1C
=
log
----------------------------------- -
(
OCR1C + 1
2 OCR1C
+
(
1
f
TCK1
)
CS13..CS10
+
×
1
T
0101
0101
0100
0100
0100
0011
)
TCK1
×
T
+
)
OCR1A
OCR1C
OCR1C
OCR1C
TCK1
1
$00
$00
$00
)
T
PCK
OCR1C
199
132
199
159
132
228
Output OC1A
RESOLUTION
2586K–AVR–01/08
H
H
H
L
L
L
7.6
7.1
7.6
7.3
7.1
7.8

Related parts for attiny25v