beautypg.com

Eeprom control register descriptions, Data eeprom control register – deecr – Rainbow Electronics AT86RF401 User Manual

Page 35

background image

35

AT86RF401

1424D–RKE–09/02

EEPROM Control Register Descriptions

Data EEPROM Control Register – DEECR

• Bits[7:4]

R eserved . T hese b its shoul d be “0 ” when written; otherw ise, resul ts wi ll b e
unpredictable.

• Bit[3]: EEPROM Busy Bit

Initially set to “0”. This bit will be set high during writes to the EEPROM.

• Bit[2]: EEPROM Unlock Bit

Set this bit to “1” before writing the EEPROM. Reset this bit to “0” after the write is com-
plete. This bit should be left in the zero state when the EEPROM is not being used,
which will protect the EEPROM data during power transients.

• Bit[1]: EEPROM Load Bit

To write the EEPROM, use the following procedure:

Note:

Because of noise and power considerations, the EEPROM should not be written while
the transmitter is enabled.

1.

Set the unlock bit.

2.

Write the address of the first byte to the DEEAR.

3.

Set the load bit. This locks the page address in the DEEAR. Keep the unlock bit
set.

4.

Write the desired data to the DEEDR register. This byte is loaded into the
EEPROM and will be written when the load bit is later deasserted.

5.

If it is desired to write another byte in the same page, write the new address to
the DEEAR register, and a new byte to the DEEDR register. Continue until all
bytes that are to be written are loaded into the EEPROM. Bytes may only be
loaded to an address once. There are eight bytes per page.

6.

Deassert the load bit. This starts the write operation. Some time after load is
deasserted, the busy bit will go high. Another read or write operation may not be
started until the busy bit has returned to “0”. Writes take approximately 4 ms to
complete. Again, the unlock bit must still be set when deasserting the load bit.

7.

After all writes are complete, write “0” to the unlock bit.

• Bit[0]: EEPROM Read Bit

To read the EEPROM use the following procedure:

1.

Write the address to the DEEAR.

2.

Set the read bit.

3.

Read the data register. The read bit will reset itself.

4.

If another read needs to be done, repeat steps 1–3 again.

Bit

7

6

5

4

3

2

1

0

$1C

BSY

EEU

EEL

EER

Read/Write

R/W

R/W

R/W

R/W

R

R/W

R/W

R/W

Initial Value 0

0

0

0

0

0

0

0

0