- •Features
- •Pin Configuration
- •Description
- •Block Diagram
- •Pin Descriptions
- •AVCC
- •Port A (PA7..PA0)
- •Port B (PB7..PB0)
- •XTAL1
- •XTAL2
- •Resources
- •AVR CPU Core
- •Architectural Overview
- •I/O Direct
- •Data Direct
- •Data Indirect with Displacement
- •Data Indirect
- •Memories
- •SRAM Data Memory
- •EEPROM Data Memory
- •EEPROM Read/Write Access
- •I/O Memory
- •Clock Systems and their Distribution
- •Clock Sources
- •Default Clock Source
- •Crystal Oscillator
- •External RC Oscillator
- •External Clock
- •Power-on Reset
- •External Reset
- •Brown-out Detection
- •Watchdog Reset
- •Idle Mode
- •Power-down Mode
- •Standby Mode
- •Analog to Digital Converter
- •Analog Comparator
- •Brown-out Detector
- •Internal Voltage Reference
- •Watchdog Timer
- •Port Pins
- •I/O Ports
- •Introduction
- •Configuring the Pin
- •Reading the Pin Value
- •Unconnected Pins
- •Alternate Port Functions
- •Alternate Functions of Port A
- •Alternate Functions Of Port B
- •Register Description for I/O Ports
- •Interrupts
- •Interrupt Vectors
- •Interrupt Handling
- •Interrupt Response Time
- •External Interrupt
- •Pin Change Interrupt
- •Timer/Counters
- •Timer/Counter0 Prescaler
- •Timer/Counter1 Prescaler
- •8-bit Timer/Counter0
- •8-bit Timer/Counter1
- •Timer/Counter1 in PWM Mode
- •Watchdog Timer
- •Overview
- •Register Descriptions
- •Functional Descriptions
- •Three-wire Mode
- •SPI Slave Operation Example
- •Two-wire Mode
- •Start Condition Detector
- •Alternative USI Usage
- •4-bit Counter
- •12-bit Timer/Counter
- •Software Interrupt
- •Analog Comparator
- •Analog to Digital Converter
- •Features
- •Operation
- •Changing Channel or Reference Selection
- •ADC Conversion Result
- •ADLAR = 0
- •ADLAR = 1
- •Fuse Bits
- •Latching of Fuses
- •Signature Bytes
- •Calibration Byte
- •Page Size
- •Signal Names
- •Parallel Programming
- •Enter Programming Mode
- •Chip Erase
- •Programming the Flash
- •Programming the EEPROM
- •Reading the Flash
- •Reading the EEPROM
- •Programming the Lock Bits
- •Reading the Signature Bytes
- •Reading the Calibration Byte
- •Serial Downloading
- •Data Polling Flash
- •Data Polling EEPROM
- •Electrical Characteristics
- •Absolute Maximum Ratings*
- •DC Characteristics
- •External Clock Drive Waveforms
- •External Clock Drive
- •ADC Characteristics
- •Active Supply Current
- •Idle Supply Current
- •Power-down Supply Current
- •Standby Supply Current
- •Pin Pull-up
- •Internal Oscillator Speed
- •Register Summary
- •Instruction Set Summary
- •Ordering Information
- •Packaging Information
- •Errata
- •ATtiny26 Rev. B/C/D
- •Table of Contents
System Clock and
Clock Options
Clock Systems and their Distribution
Figure 20 presents the principal clock systems in the AVR and their distribution. All of the clocks need not be active at a given time. In order to reduce power consumption, the clocks to modules not being used can be halted by using different sleep modes, as described in “Power Management and Sleep Modes” on page 38. The clock systems are detailed below.
Figure 20. Clock Distribution
Timer/Counter1 |
General I/O |
ADC |
CPU Core |
RAM |
Flash and |
||
modules |
EEPROM |
||||||
|
|
|
|
|
|||
|
|
|
clkADC |
|
|
|
|
|
|
clkI/O |
AVR Clock |
clkCPU |
|
|
|
|
|
|
Control Unit |
|
|
|
|
|
|
|
|
clkFLASH |
|
|
|
|
|
|
|
Reset Logic |
Watchdog Timer |
||
|
|
|
Source clock |
|
Watchdog clock |
|
|
|
|
|
Clock |
|
Watchdog |
|
|
|
|
|
Multiplexer |
|
Oscillator |
|
|
clkPCK |
clkPLL |
|
|
|
|
|
|
|
PLL |
External RC |
External clock |
Crystal |
Low-Frequency |
Calibrated RC |
|
|
Oscillator |
Oscillator |
Crystal Oscillator |
Oscillator |
|||
|
|
|
CPU Clock – clkCPU |
The CPU clock is routed to parts of the system concerned with operation of the AVR |
|
core. Examples of such modules are the General Purpose Register File, the Status Reg- |
|
ister and the data memory holding the Stack Pointer. Halting the CPU clock inhibits the |
|
core from performing general operations and calculations. |
I/O Clock – clkI/O |
The I/O clock is used by the majority of the I/O modules, like Timer/Counters, and USI. |
|
The I/O clock is also used by the External Interrupt module, but note that some external |
|
interrupts are detected by asynchronous logic, allowing such interrupts to be detected |
|
even if the I/O clock is halted. |
Flash Clock – clkFLASH |
The Flash clock controls operation of the Flash interface. The Flash clock is usually |
|
active simultaneously with the CPU clock. |
ADC Clock – clkADC |
The ADC is provided with a dedicated clock domain. This allows halting the CPU and |
|
I/O clocks in order to reduce noise generated by digital circuitry. This gives more accu- |
|
rate ADC conversion results. |
24 ATtiny26(L)
1477J–AVR–06/07
ATtiny26(L)
Internal PLL for Fast Peripheral Clock Generation – clkPCK
The internal PLL in ATtiny26(L) generates a clock frequency that is 64x multiplied from nominally 1 MHz input. The source of the 1 MHz PLL input clock is the output of the internal RC Oscillator which is automatically divided down to 1 MHz, if needed. See the Figure 21 on page 25. When the PLL reference frequency is the nominal 1 MHz, the fast peripheral clock is 64 MHz. The fast peripheral clock, or a clock prescaled from that, can be selected as the clock source for Timer/Counter1.
The PLL is locked on the RC Oscillator and adjusting the RC Oscillator via OSCCAL Register will adjust the fast peripheral clock at the same time. However, even if the possibly divided RC Oscillator is taken to a higher frequency than 1 MHz, the fast peripheral clock frequency saturates at 70 MHz (worst case) and remains oscillating at the maximum frequency. It should be noted that the PLL in this case is not locked any more with the RC Oscillator clock.
Therefore it is recommended not to take the OSCCAL adjustments to a higher frequency than 1 MHz in order to keep the PLL in the correct operating range. The internal PLL is enabled only when the PLLE bit in the register PLLCSR is set or the PLLCK Fuse is programmed (“0”). The bit PLOCK from the register PLLCSR is set when PLL is locked.
Both internal 1 MHz RC Oscillator and PLL are switched off in Power-down and Standby sleep modes.
Figure 21. PCK Clocking System
PLLE |
|
|
|
|
|
|
PLLCK & |
|
|
|
|
CKSEL |
|
|
|
|
FUSES |
|
|
OSCCAL |
|
|
|
|
|
|
|
Lock |
PLOCK |
|
|
|
Detector |
|
|
1 |
|
|
|
RC OSCILLATOR |
2 |
DIVIDE |
PLL |
PCK |
4 |
TO 1 MHz |
64x |
|
|
|
|
|||
|
8 MHz |
|
|
|
|
|
|
|
DIVIDE |
BY 4
CK
XTAL1
OSCILLATORS
XTAL2
25
1477J–AVR–06/07