Eeprom Control Register - Atmel AVR AT90S2313 Manual

8-bit avr microcontroller with 2k bytes of in-system programmable flash
Hide thumbs Also See for AVR AT90S2313:
Table of Contents

Advertisement

EEPROM Read/Write
Access
EEPROM Address Register –
EEAR
EEPROM Data Register –
EEDR
EEPROM Control Register –
EECR
AT90S2313
40
The EEPROM access registers are accessible in the I/O space.
The write access time is in the range of 2.5 - 4 ms, depending on the V
self-timing function, however, lets the user software detect when the next byte can be
written. If the user code contains code that writes the EEPROM, some precaution must
be taken. In heavily filtered power supplies, V
up/down. This causes the device for some period of time to run at a voltage lower than
specified as minimum for the clock frequency used. CPU operation under these condi-
tions may cause the Program Counter to perform unintentional jumps and eventually
execute the EEPROM write code. To secure EEPROM integrity, the user is advised to
use an external under-voltage reset circuit in this case.
In order to prevent unintentional EEPROM writes, a specific write procedure must be fol-
lowed. 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.
Bit
7
6
$1E ($3E)
EEAR6
Read/Write
R
R/W
Initial value
0
0
• Bit 7 – Res: Reserved Bit
This bit is a reserved bit in the AT90S2313 and will always read as zero.
• Bit 6..0 – EEAR6..0: EEPROM Address
The EEPROM Address Register (EEAR6..0) specifies the EEPROM address in the 128
bytes EEPROM space. The EEPROM data bytes are addressed linearly between 0 and
127.
Bit
7
6
$1D ($3D)
MSB
Read/Write
R/W
R/W
Initial value
0
0
• Bit 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
6
$1C ($3C)
Read/Write
R
R
Initial value
0
0
• Bit 7..3 – Res: Reserved Bits
These bits are reserved bits in the AT90S2313 and will always read as zero.
is likely to rise or fall slowly on power-
CC
5
4
3
EEAR5
EEAR4
EEAR3
R/W
R/W
R/W
0
0
0
5
4
3
R/W
R/W
R/W
0
0
0
5
4
3
EEMWE
R
R
R
0
0
0
voltages. A
CC
2
1
0
EEAR2
EEAR1
EEAR0
EEAR
R/W
R/W
R/W
0
0
0
2
1
0
LSB
EEDR
R/W
R/W
R/W
0
0
0
2
1
0
EEWE
EERE
R/W
R/W
R/W
0
0
0
0839G–08/01
EECR

Advertisement

Table of Contents
loading

Table of Contents