27.12.2012 Views

Atmel AT89C51ID2 Data Sheet - Keil

Atmel AT89C51ID2 Data Sheet - Keil

Atmel AT89C51ID2 Data Sheet - Keil

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Read <strong>Data</strong> The following procedure is used to read the data stored in the EEPROM memory:<br />

114 <strong>AT89C51ID2</strong><br />

Check EEBUSY flag<br />

If the user application interrupts routines use XRAM memory space: Save and<br />

disable interrupts.<br />

Load DPTR with the address to read<br />

Set bit EEE of EECON register<br />

Execute a MOVX A, @DPTR<br />

Clear bit EEE of EECON register<br />

Restore interrupts.<br />

Figure 45. Recommended EEPROM <strong>Data</strong> Read Sequence<br />

EEPROM <strong>Data</strong> Read<br />

Sequence<br />

EEBusy<br />

Cleared?<br />

Save & Disable IT<br />

EA= 0<br />

EEPROM <strong>Data</strong> Mapping<br />

EECON = 02h (EEE=1)<br />

<strong>Data</strong> Read<br />

DPTR= Address<br />

ACC= <strong>Data</strong><br />

Exec: MOVX A, @DPTR<br />

Last Byte<br />

to Read?<br />

EEPROM <strong>Data</strong> Mapping<br />

EECON = 00h (EEE = 0<br />

Restore IT<br />

4289A–8051–09/03

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!