where : ibrtses embedded

AVR Tiny26

The manual of the Tiny26 (Rev 1477G-AVR-03/05) is somewhat intransparent and distributes the relevant information over many pages.

the fuses

The programming fuses are
fuse default meaning page
RSTDISBL 1 Reset disable =0, pin becomes PB7, further programming requires parallel mode programmer 108
CKSEL3..0 0001 internal, external, ceramic, RC, crystal 24,27
PLLCK 1 adds an internal 64MHz PLL for use between 4.5 and 5.5V, Systemclock will be 16MHz then 24,30
CKOPT 1 clock amplifier for crystal oscillator or so, depends on the clocksource itself, CKOPT=0 for higher amplitudes 25
SUT1..0 10 startup time selector 26,27,28,29,30
SPIEN 0 enable SPI programming mode 108
JTAGEN 0 enable JTAG programming 254
EESave 1 preserve EEPROM through chip erase 108
BODLEVEL 1 brownout detection on 2.7V = 1, or 4.0V = 0 35,37
BODEN 1 brownout detection enabled = 0, hysteresis will be 50mV 37
Concerning the fuses, 0 means programmed and 1 means unprogrammed.

Clock Options

The tiny26 offers the following clock options. page 24
Device clocking option PLLCK CKSEL3..0
External crystal/ceramic resonator 1 1111-1010
External low frequency crystal 1 1001
External RC 1 1000-0101
Calibrated internal RC 1 0100-0001
External clock 1 0000
PLL Clock 0 0001

default clock source

The device is shipped with CKSEL3..0 = 0001 and SUT1..0 = 10, an internal RC with the longest startup time. page 25.

crystal oscillator

This mode allows for either a crystal or a ceramic resonator. When CKOPT=0, then the Osc output at XTAL2 is being driven rail-rail. When not programmed (=1), then the swing is smaller, the frequency range is limited and the powerrconsumption is lower.
For resonators, the max frequency is 12MHz with CKOPT=1 and CKOPT=0 should not be used for resonators.

Crystal oscillator operating modes, page 25
CKSEL3..1 freq range MHZ recommended caps
101 0.4 - 0.9 for resonators only
110 0.9 - 3.0 12 - 22pF
111 3.0 - 16.0 12 - 22pF
111 16 - 12 - 15pF

Startup times for the crystal oscillator clock selection, page 26
CKOPT CKSEL0 SUT1..0 startup time additional reset delay recommended usage
1 0 00 258 clk 4.1ms ceramic, fast rising power, not frequency stable at startup
1 0 01 258 clk 65ms ceramic, slow rising power, not frequency stable at startup
1 0 10 1k clk - ceramic, BOD enabled, frequency stable at startup
1 0 11 1k clk 4.1ms ceramic, fast rising power, frequency stable at startup
1 1 00 1k clk 65ms ceramic, slow rising power, frequency stable at startup
x 1 01 16k clk - crystal, BOD enabled
x 1 10 16k clk 4.1ms crystal, fast rising power
x 1 11 16k clk 65ms crystal, slow rising power

Low frequency crystal oscillator

This clock option is to use a 32768Hz crystal. Set the CKSEL=1001. Programming the CKOPT=0 enables internal 36pF between XTAL1 and GND and between XTAL2 and GND. Startup times for the low frequency crystal oscillator, page 26
SUT1..0 Startup from powerdown & powersave additionaldelayfrom reset @ Vcc=5V recommended usage
00 1k clk 4.1ms fast rising power or BOD enabled
01 1k clk 65ms slowly rising power
10 32k clk 65ms Stable frequency at startup
11 reserved reserved reserved
option 00 and option 01 should only be used if frequency stability at startup is not important

External RC oscillator

The frequency is roughly 1/(3*R*C), with C at least 22pf between XTAL1 and GND.
The CKOPT fuse enables the internal 36pF cap between XTAL1 and GND.
and thus remove the need for an external capacitor. Frequency selection, page 27
CKSEL3..0 Nominal frequency
0101 <= 0.9 MHz
0110 0.9 - 3.0 MHz
0111 3.0 - 8.0 MHz
1000 8.0 - 12.0 MHz

Startup times for the external RC oscillator, page 27
SUT1..0 Startup from powerdown & powersave additionaldelayfrom reset @ Vcc=5V recommended usage
00 18clk - BOD enabled
01 18clk 4.1ms fast rising power
10 18clk 65ms Slowly rising power
11 6clk 4.1ms fast rising power or BOD enabled
option 11 should not be selected close to the max frequency of the device

Calibrated internal RC oscillator

Set CKOPT=1
Frequency selection, page 28
CKSEL3..0 Nominal frequency
0001 1.0 MHz
0010 2.0 MHz
0011 4.0 MHz
0100 8.0 MHz
The 0001 is factory default.

Startup times for internal calibrated RC oscillator, page 28
SUT1..0 Startup from powerdown & powersave additionaldelayfrom reset @ Vcc=5V recommended usage
00 6clk - BOD enabled
01 6clk 4.1ms fast rising power
10 6clk 65ms Slowly rising power
11 reserved reserved reserved
option 10 is default when shipped.
The calibration value is written to register OSCCAL.

Internal RC Osc calibration value, page 28, 29
OSCCAL value min frequency in percentage from nominal max frequency in percentage from nominal
$00 50 100
$7F 75 150
$FF 100 200

The RC oscillator is intended for 1.0, 2.0, 4.0 or 8.0MHz. Calibrating it to other frequencies is not guaranteed.

external clock

Connect the external oscliiator to XTAL1 while leaving the XTAL2 open.
Set Cksel3..0=0000, CKOPT is 1 or a 36pf cap is enabled between XTAL1 and GND.

Startup times for external clock, page 29
SUT1..0 Startup from powerdown & powersave additionaldelayfrom reset @ Vcc=5V recommended usage
00 6clk - BOD enabled
01 6clk 4.1ms fast rising power
10 6clk 65ms Slowly rising power
11 reserved reserved reserved

High Frequency PLL

Programming the PLLCK=0 enables an internal PLL at 64MHz based on the RC Oscillator. The system clock is divided by 4, and thus is 16MHz. The PLL requires the CKSEL3..1 to be "0001" and the supply has to be between 4.5 and 5.5V for reliable operation. The SUT1..0 fueses determine the startup time. page 30
SUT1..0 Startup from powerdown & powersave additionaldelayfrom reset @ Vcc=5V recommended usage
00 1k CK - BOD enabled
01 1k CK 4.1ms fast rising power
10 1k CK 65ms Slowly rising power
11 16k CK - slowly rising power


Questions ?
Suggestions?
Feedback ?







embedded page
home


last updated 28.June.06 or perhaps later



Copyright (99,2006) Ing.Büro R.Tschaggelar