ATTINY12 ATMEL Corporation, ATTINY12 Datasheet - Page 38

no-image

ATTINY12

Manufacturer Part Number
ATTINY12
Description
8-bit AVR Microcontroller with 1K Byte Flash
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATTINY12-8PC
Manufacturer:
ATM
Quantity:
27 705
Part Number:
ATTINY12-8PC
Manufacturer:
AD
Quantity:
56
Part Number:
ATTINY12-8PC
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATTINY12-8SC
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATTINY12-8SI
Manufacturer:
ATMEL
Quantity:
1 729
Part Number:
ATTINY12-8SU
Manufacturer:
ATMEL
Quantity:
5
Part Number:
ATTINY128SC
Manufacturer:
ATMEL
Quantity:
7 373
Company:
Part Number:
ATTINY12L-4PC
Quantity:
50
Part Number:
ATTINY12L-4SC
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATTINY12L-4SU
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
ATTINY12V-1SI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
ATtiny12 EEPROM
Read/Write Access
EEPROM Address Register –
EEAR
EEPROM Data Register –
EEDR
EEPROM Control Register –
EECR
38
ATtiny11/12
The EEPROM access registers are accessible in the I/O space.
The write access time is in the range of 3.1 - 6.8 ms, depending on the frequency of the
calibrated RC oscillator. See Table 17 for details. A self-timing function lets the user
software detect when the next byte can be written. A special EEPROM Ready interrupt
can be set to trigger when the EEPROM is ready to accept new data. The minimum volt-
age for writing to the EEPROM is 2.2V.
In order to prevent unintentional EEPROM writes, a two-state write procedure must be
followed. Refer to the description of the EEPROM Control Register for details on this.
When the EEPROM is written, the CPU is halted for two clock cycles before the next
instruction is executed. When the EEPROM is read, the CPU is halted for four clock
cycles before the next instruction is executed.
The EEPROM Address Register – EEAR specifies the EEPROM address in the 64-byte
EEPROM space. The EEPROM data bytes are addressed linearly between 0 and 63.
During reset, the EEAR register is not cleared. Instead, the data in the register is kept.
• Bits 7..0 - EEDR7.0: EEPROM Data
For the EEPROM write operation, the EEDR register contains the data to be written to
the EEPROM in the address given by the EEAR register. For the EEPROM read opera-
tion, the EEDR contains the data read out from the EEPROM at the address given by
EEAR.
• Bit 7..4 - Res: Reserved Bits
These bits are reserved bits in the ATtiny12 and will always read as zero.
• Bit 3 - EERIE: EEPROM Ready Interrupt Enable
When the I-bit in SREG and EERIE are set (one), the EEPROM Ready interrupt is
enabled. When cleared (zero), the interrupt is disabled. The EEPROM Ready interrupt
generates a constant interrupt when EEWE is cleared (zero).
Bit
$1E
Read/Write
Initial Value
Bit
$1D
Read/Write
Initial Value
Bit
$1C
Read/Write
Initial Value
MSB
R/W
R
R
7
0
7
0
7
0
-
-
R/W
R
R
6
0
6
0
6
0
-
-
EEAR5
R/W
R/W
X
R
5
5
0
5
0
-
EEAR4
R/W
R/W
X
R
4
4
0
4
0
-
EEAR3
EERIE
R/W
R/W
R/W
X
3
3
0
3
0
EEMWE
EEAR2
R/W
R/W
R/W
X
2
2
0
2
0
EEAR1
EEWE
R/W
R/W
R/W
X
1
1
0
X
1
EEAR0
EERE
LSB
R/W
R/W
R/W
X
0
0
0
0
0
1006D–AVR–07/03
EECR
EEAR
EEDR

Related parts for ATTINY12