Datasheet

26
MSL2021 [DATASHEET]
42062A–LED–02/2013
12.1 EEPROM and Power-Up Defaults
An on-chip EEPROM holds all the default register values. At power-up the data in the EEPROM is transferred directly to
control registers 0x00 thru 0x51, setting up the device for operation.
Any changes made to registers 0x00 thru 0x69 after power-up are not reflected in the EEPROM and are lost when power
is removed from the device, or when the enable input EN is forced low. If a different power-up condition is desired
program the values into the EEPROM via the serial interface as explained in the next section, or contact the factory to
inquire about ordering a customized power-up setting.
12.2 EEPROM Address and Control/Status Registers
The EEPROM can be visualized as an image of the control registers from 0x00 thru 0x69. Change an EEPROM register
value by writing the new value into the associated control register, and then instructing the device to program that value
into the EEPROM. Two control registers facilitate this process, the EEPROM address register E2ADDR (0x60), and the
EEPROM control register E2CTRL (0x61). Into E2ADDR write the location of the data that is to be programmed into the
EEPROM, and write 0x03 to E2CTRL to command the device to program that data into the EEPROM. Programming the
EEPROM takes a finite amount of time; after sending a command to E2CTRL wait 5ms, then end the write cycle by
writing 0x00 to E2CTRL.
Example: Change the string current feedback voltage MREF to 100mV.
Commands: To register 0x20 (MREF) write 0x32 (the new value for MREF). To register 0x60 (E2ADDR) write 0x20 (the
address of the MREF register). To register 0x61 (E2CTRL) write 0x03 (the command to copy the value to EEPROM).
Wait 5ms. To register 0x61 (E2CTRL) write 0x00, to turn off EEPROM access.
Result: The value 0x32, located in the MREF register, is programmed into the EEPROM and becomes the new power-
up default value for MREF.
Summary:
0x20 32
0x60 20
0x61 03
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 12-2 on page 26 details the functions
available through E2CTRL.
Table 12-2. EEPROM Address Register (E2ADDR, 0x60), 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