Datasheet
19
Atmel MSL2010 [DATASHEET]
42072A–AVR–05/2013
Wait 5ms
0x61 00
E2CTRL provides additional functions beyond simply programming a register’s value into the EEPROM. Data may be
transferred in either direction, from the registers to the EEPROM, or from the EEPROM to the registers. Register data
may be transferred into or out of the EEPROM in groups of eight, a page at a time. The page address boundaries are
predefined, and E2ADDR must be loaded with the address of the first byte of the page that is to be copied. Page
addresses begin at 0x00 and increment by eight, with the second page beginning at 0x08, the third at 0x10, etc. To
program a full page of data into the EEPROM, write the address of the page’s first byte to E2ADDR, and write 0x04 to
E2CTRL. Wait 5ms, and then end the write cycle by writing 0x00 to E2CTRL. When finished accessing the EEPROM
always write 0x00 to E2CTRL to block inadvertent EEPROM read/writes. Table 13-2 on page 19 details the functions
available through E2CTRL.
Table 13-2. EEPROM Address Register (E2ADDR, 0x60), defaults highlighted.
Table 13-3. EEPROM Status Register (E2CTRL, 0x61), defaults highlighted.
Register Address
Register data
D7 D6 D5 D4 D3 D2 D1 D0
E2ADDR 0x60 - E2ADDR[6:0]
DEFAULT 00000000
EEPROM Minimum Address 0x00
-0000000
EEPROM Maximum Address 0x51
-1010001
Register Address
Register data
D7 D6 D5 D4 D3 D2 D1 D0
E2CTRL 0x61 - - - - - RWCTRL[2:0]
DEFAULT 00000000
EEPROM Read / Write Disabled xxxxx000
Read 1 Byte from EEPROM x x x x x 0 0 1
Read 8 Bytes from EEPROM x x x x x 0 1 0
Write 1 Byte to EEPROM x x x x x 0 1 1
Write 8 Bytes to EEPROM x x x x x 1 0 0
Unused
x x x x x 1 0 1
x x x x x 1 1 x