Datasheet

24
ATtiny828 [DATASHEET]
8371A–AVR–08/12
5.4.2 EEDR – EEPROM Data Register
z Bits 7:0 – EEDR[7:0]: EEPROM Data
For EEPROM write operations, EEDR contains the data to be written to the EEPROM address given in the EEAR
Register. For EEPROM read operations, EEDR contains the data read out from the EEPROM address given by EEAR.
5.4.3 EECR – EEPROM Control Register
z Bits 7, 6 – Res: Reserved Bits
These bits are reserved and will always read zero.
z Bits 5, 4 – EEPM1 and EEPM0: EEPROM Programming Mode Bits
EEPROM programming mode bits define the action that will be triggered when EEPE is written. Data can be
programmed in a single atomic operation, where the previous value is automatically erased before the new value is
programmed, or Erase and Write can be split in two different operations. The programming times for the different modes
are shown in Table 5.
Table 5. EEPROM Programming Mode Bits and Programming Times
When EEPE is set any write to EEPMn will be ignored.
During reset, the EEPMn bits will be reset to 0b00 unless the EEPROM is busy programming.
z Bit 3 – EERIE: EEPROM Ready Interrupt Enable
Writing this bit to one enables the EEPROM Ready Interrupt. Provided the I-bit in SREG is set, the EEPROM Ready
Interrupt is triggered when non-volatile memory is ready for programming.
Writing this bit to zero disables the EEPROM Ready Interrupt.
Bit 76543210
0x20 (0x40) EEDR7 EEDR6 EEDR5 EEDR4 EEDR3 EEDR2 EEDR1 EEDR0 EEDR
Read/Write R/WR/WR/WR/WR/WR/WR/WR/W
Initial Value 0 0 0 0 0 0 0 0
Bit 76543210
0x1F (0x3F) EEPM1 EEPM0 EERIE EEMPE EEPE EERE EECR
Read/Write R R R/WR/WR/WR/WR/WR/W
Initial Value 0 0 X X 0 0 X 0
EEPM1 EEPM0 Programming Time Operation
0 0 3.4 ms Atomic (erase and write in one operation)
0 1 1.8 ms Erase, only
1 0 1.8 ms Write, only
1 1 Reserved