ADP1048 Analog Devices, ADP1048 Datasheet - Page 39

no-image

ADP1048

Manufacturer Part Number
ADP1048
Description
Digital Power Factor Correction Controller with accurate AC Power Metering
Manufacturer
Analog Devices
Datasheet
Data Sheet
WRITE OPERATION (BYTE WRITE AND BLOCK
WRITE)
Before performing a write to Page 2 through Page 15 of the
main block, the user must first unlock the EEPROM (see the
Unlock EEPROM section).
Write to Page 0 and Page 1
Page 0 and Page 1 of the main block are reserved for storing the
default settings and user settings, respectively. The user cannot
perform a direct write operation to Page 0 or Page 1 using the
EEPROM_DATA_xx commands. If the user writes to Page 0,
Page 1 returns a no acknowledge. To program the register con-
tents of Page 1 of the main block, it is recommended that the
STORE_USER_ALL command be used (Command Code 0x15).
See the Save Register Settings to the User Scratch Pad section.
Write to Page 2 Through Page 15
The data in the EEPROM main block can be programmed
(written to) one byte at a time or in multiple bytes in series using
the EEPROM_DATA_xx commands (Command Code 0xB0 to
Command Code 0xBF). Before executing this command, the
user can program the offset from the page boundary where
the first byte is written using the EEPROM_ADDR_OFFSET
command (Register 0xD3).
If the targeted page has not yet been erased, the user can erase
the page as described in the Main Block Page Erase (Page 2 to
Page 15) section.
In the following example, four bytes are written to Page 9,
starting from the 256
1.
2.
Note that the block write command can write a maximum of
256 bytes for any single transaction.
EEPROM PASSWORD
On power-up, the EEPROM is locked and protected from
accidental writes or erases. Only reads from Page 2 to Page 15
are allowed when the EEPROM is locked. Before any data can
be written (programmed) to the EEPROM, the EEPROM must
be unlocked for write access. After it is unlocked, the EEPROM
is opened for reading, writing, and erasing.
S
S
MASTER TO SLAVE
SLAVE TO MASTER
MASTER TO SLAVE
SLAVE TO MASTER
ADDRESS
Set address offset = 256.
Write four bytes to Page 9.
SLAVE
ADDRESS
SLAVE
DATA BYTE 1
W
A
W
th
byte of that page.
A
0xD3
A
...
0xB9
A
DATA BYTE 4
0x01
A
A
BYTE COUNT =
A
0x00
4
P
A
Rev. 0 | Page 39 of 84
A
P
On power-up, Page 0 and Page 1 are also protected from read
access, and the EEPROM must first be unlocked to read these
pages.
Unlock EEPROM
To unlock the EEPROM, perform two consecutive writes with
the correct password (default = 0xFF) using the EEPROM_
PASSWORD command (Register 0xD5). The EEPROM_
UNLOCKED flag (Bit 6 of Register 0xFE81) is set to indicate
that the EEPROM is unlocked for write access.
Lock EEPROM
To lock the EEPROM, write any byte other than the correct
password using the EEPROM_PASSWORD command
(Register 0xD5). The EEPROM unlock flag is cleared to
indicate that the EEPROM is locked from write access.
Change EEPROM Password
To change the EEPROM password, the EEPROM must first be
unlocked. To change the EEPROM password, first write the
correct password using the EEPROM_PASSWORD command
(Register 0xD5). Immediately write the new password using the
EEPROM_PASSWORD command. The password is now
changed to the new password.
DOWNLOADING EEPROM SETTINGS TO INTERNAL
REGISTERS
Download User Settings to Registers
The user settings are stored in Page 1 of the EEPROM main
block. These settings are downloaded from the EEPROM into
the registers under the following conditions:
Download Factory Settings to Registers
The factory default settings are stored in Page 0 of the EEPROM
main block. The factory settings can be downloaded from the
EEPROM into the internal registers using the RESTORE_
DEFAULT_ALL command (Command Code 0x12).
When this command is executed, the EEPROM password is also
reset to the factory default setting of 0xFF.
On power-up. The user settings are automatically down-
loaded into the internal registers, powering the part up in
a state previously saved by the user.
On execution of the RESTORE_USER_ALL command
(Command Code 0x16). This command allows the user
to force a download of the user settings from the EEPROM
main block, Page 1, into the internal registers.
ADP1047/ADP1048

Related parts for ADP1048