TINY12 ATMEL [ATMEL Corporation], TINY12 Datasheet - Page 32

no-image

TINY12

Manufacturer Part Number
TINY12
Description
8-bit AVR Microcontroller with 1K Byte Flash
Manufacturer
ATMEL [ATMEL Corporation]
Datasheets

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
TINY12-8SC
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
TINY12L
Manufacturer:
ATMEL
Quantity:
5 510
Part Number:
TINY12L
Manufacturer:
NS
Quantity:
5 510
ATtiny12 Calibrated
Internal RC Oscillator
Oscillator Calibration Register
– OSCCAL
32
ATtiny11/12
Note that if a level triggered or pin change interrupt is used for wake-up from Power-
down Mode, the changed level must be held for a time to wake up the MCU. This makes
the MCU less sensitive to noise. The wake-up period is equal to the clock-counting part
of the reset period (See Table 9). The MCU will wake up from the power-down if the
input has the required level for two watchdog oscillator cycles. If the wake-up period is
shorter than two watchdog oscillator cycles, the MCU will wake up if the input has the
required level for the duration of the wake-up period. If the wake-up condition disap-
pears before the wake-up period has expired, the MCU will wake up from power-down
without executing the corresponding interrupt. The period of the watchdog oscillator is
2.7 µs (nominal) at 3.0V and 25 C. The frequency of the watchdog oscillator is voltage
dependent as shown in the section “ATtiny11 Typical Characteristics” on page 60.
When waking up from Power-down Mode, there is a delay from the wake-up condition
occurs until the wake-up becomes effective. This allows the clock to restart and become
stable after having been stopped. The wake-up period is defined by the same CKSEL
fuses that define the reset time-out period.
In ATtiny12, the calibrated internal oscillator provides a fixed 1.2 MHz (nominal) clock at
5V and 25 C. This clock may be used as the system clock. See the section “Clock
Options” on page 5 for information on how to select this clock as the system clock. This
oscillator can be calibrated by writing the calibration byte to the OSCCAL register. When
this oscillator is used as the chip clock, the Watchdog Oscillator will still be used for the
Watchdog Timer and for the reset time-out. For details on how to use the pre-pro-
grammed calibration value, see the section “Calibration Byte in ATtiny12” on page 47. At
5V and 25
nominal frequency.
• Bits 7..0 - CAL7..0: Oscillator Calibration Value
Writing the calibration byte to this address will trim the internal oscillator to remove pro-
cess variations from the oscillator frequency. When OSCCAL is zero, the lowest
available frequency is chosen. Writing non-zero values to this register will increase the
frequency of the internal oscillator. Writing $FF to the register gives the highest available
frequency. The calibrated oscillator is used to time EEPROM access. If EEPROM is
written, do not calibrate to more than 10% above the nominal frequency. Otherwise, the
EEPROM write may fail. Table 14 shows the range for OSCCAL. Note that the oscillator
is intended for calibration to 1.2 MHz, thus tuning to other values is not guaranteed.
Table 14. Internal RC Oscillator Frequency Range
Bit
$31
Read/Write
Initial Value
OSCCAL Value
o
C, the pre-programmed calibration byte gives a frequency within ± 1% of the
$00
$7F
$FF
CAL7
R/W
7
0
CAL6
R/W
6
0
CAL5
R/W
5
0
Min Frequency
CAL4
R/W
0.6 MHz
0.8 MHz
1.2 MHz
4
0
CAL3
R/W
3
0
CAL2
R/W
2
0
CAL1
R/W
1
0
Max Frequency
1.2 MHz
1.7 MHz
2.5 MHz
CAL0
R/W
0
0
1006D–AVR–07/03
OSCCAL

Related parts for TINY12