Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
AVR / datasheets / attiny_26_26L.pdf
Скачиваний:
46
Добавлен:
20.03.2015
Размер:
2.25 Mб
Скачать

 

 

 

ATtiny26(L)

 

 

 

 

Latching of Fuses

 

 

The fuse values are latched when the device enters programming mode and changes of

 

 

 

the fuse values will have no effect until the part leaves programming mode. This does

 

 

not apply to the EESAVE Fuse which will take effect once it is programmed. The fuses

 

 

are also latched on Power-up in normal mode.

Signature Bytes

Calibration Byte

All Atmel microcontrollers have a three-byte signature code which identifies the device. This code can be read in both serial and parallel mode, also when the device is locked. The three bytes reside in a separate address space.

For the ATtiny26 the signature bytes are:

1.$000: $1E (indicates manufactured by Atmel).

2.$001: $91 (indicates 2KB Flash memory).

3.$002: $09 (indicates ATtiny26 device when $001 is $91).

The ATtiny26 stores four different calibration values for the internal RC Oscillator. These bytes resides in the signature row high byte of the addresses 0x0000, 0x0001, 0x0002, and 0x0003 for 1, 2, 4, and 8 MHz respectively. During Reset, the 1 MHz value is automatically loaded into the OSCCAL Register. If other frequencies are used, the calibration value has to be loaded manually, see “Oscillator Calibration Register – OSCCAL” on page 30 for details.

Page Size

Parallel Programming

Parameters, Pin

Mapping, and

Commands

Signal Names

Table 52. No. of Words in a Page and no. of Pages in the Flash

Flash Size

Page Size

PCWORD

No. of Pages

PCPAGE

PCMSB

 

 

 

 

 

 

1K words (2K bytes)

16 words

PC[3:0]

64

PC[9:4]

9

 

 

 

 

 

 

Table 53. No. of Words in a Page and no. of Pages in the EEPROM

EEPROM Size

Page Size

PCWORD

No. of Pages

PCPAGE

EEAMSB

 

 

 

 

 

 

128 bytes

4 bytes

EEA[1:0]

32

EEA[7:0]

7

 

 

 

 

 

 

This section describes how to parallel program and verify Flash Program memory, EEPROM Data memory, Memory Lock bits, and Fuse bits in the ATtiny26. Pulses are assumed to be at least 250 ns unless otherwise noted.

In this section, some pins of the ATtiny26 are referenced by signal names describing their functionality during parallel programming, see Figure 58 and Table 54. Pins not described in the following table are referenced by pin names.

The XA1/XA0 pins determine the action executed when the XTAL1 pin is given a positive pulse. The bit coding is shown in Table 56.

When pulsing WR or OE, the command loaded determines the action executed. The different Commands are shown in Table 57.

111

1477J–AVR–06/07

Figure 58. Parallel Programming

 

WR

 

 

 

 

 

 

 

 

 

+5V

 

 

 

 

 

 

PB0

VCC

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

XA0

 

 

 

 

 

 

PB1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

+5V

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

XA1/BS2

 

 

 

 

 

PB2

AVCC

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PAGEL/BS1

 

 

 

 

 

 

PB3

 

 

 

 

DATA

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PA7: PA0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PB5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PB6

 

 

 

 

 

 

RDY/BSY

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

+12 V RESET

XTAL1/PB4

GND

Table 54. Pin Name Mapping

 

Signal Name in

 

 

 

 

 

 

Programming Mode

Pin Name

I/O

Function

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PB0

I

Write Pulse (Active low)

 

WR

 

 

 

 

 

 

XA0

PB1

I

XTAL Action Bit 0

 

 

 

 

 

 

XA1/BS2(1)

PB2

I

XTAL Action Bit 1 multiplexed with Byte Select 2

 

 

 

 

 

 

(“0” selects low byte, “1” selects 2’nd high byte)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PAGEL/BS1(1)

 

 

Program Memory and EEPROM data Page Load

 

 

 

 

 

 

PB3

I

multiplexed with Byte Select 1 (“0” selects low

 

 

 

 

 

 

 

 

byte, “1” selects high byte).

 

 

 

 

 

 

 

 

 

 

 

 

 

PB5

I

Output Enable (Active low)

 

OE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: Device is busy programming, 1: Device is ready

 

RDY/BSY

 

PB6

O

 

 

 

 

 

 

for new command

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DATA

PA7:0

I/O

Bidirectional Data bus (Output when

 

is low)

 

OE

 

 

 

 

 

 

 

 

 

 

 

Note: 1. The pin is used for two different control signals. In the description below, normally only one of the signals is referred. E.g., “give BS1 a positive pulse” equals “give PAGEL/BS1 a positive pulse”.

Table 55. Pin Values used to Enter Programming Mode

 

Pin

Symbol

Value

 

 

 

 

 

PAGEL/BS1

Prog_enable[3]

0

 

 

 

 

 

XA1/BS2

Prog_enable[2]

0

 

 

 

 

 

XA0

Prog_enable[1]

0

 

 

 

 

 

 

 

 

Prog_enable[0]

0

 

WR

 

 

 

 

 

112 ATtiny26(L)

1477J–AVR–06/07

ATtiny26(L)

Table 56. XA1 and XA0 Coding(1)

XA1

XA0

Action when XTAL1 is Pulsed

 

 

 

 

0

0

 

Load Flash or EEPROM Address (High or low address byte determined by

 

BS1).

 

 

 

 

 

 

 

0

1

 

Load Data (High or Low data byte for Flash determined by BS1).

 

 

 

 

1

0

 

Load Command

 

 

 

 

1

1

 

No Action, Idle

 

 

 

 

Note:

1.

[XA1, XA0] = 0b11 is “No Action, Idle”. As long as XTAL1 is not pulsed, the Com-

 

 

mand, Address, and Data Registers remain unchanged. Therefore, there are no

 

 

problems using BS2 as described below even though BS2 is multiplexed with XA1.

 

 

BS2 is only asserted when reading the fuses

 

is low) and XTAL1 is not pulsed.

 

 

(OE

Table 57. Command Byte Bit Coding

Command Byte

Command Executed

 

 

1000 0000

Chip Erase

 

 

0100 0000

Write Fuse Bits

 

 

0010 0000

Write Lock Bits

 

 

0001 0000

Write Flash

 

 

0001 0001

Write EEPROM

 

 

0000 1000

Read Signature Bytes and Calibration Byte

 

 

0000 0100

Read Fuse and Lock Bits

 

 

0000 0010

Read Flash

 

 

0000 0011

Read EEPROM

 

 

113

1477J–AVR–06/07

Соседние файлы в папке datasheets