Software Write Protection of the EEPROM Array

The AT24CSW04X/AT24CSW08X utilizes a software scheme that allows a portion or the entire EEPROM to be inhibited from being written to by modifying the contents of the Write Protection Register (WPR). If desired, the WPR can be set so that it may no longer be modified, thereby making the current protection scheme permanent.

The status of the WPR can be determined by following a random read operation. Changing the state of the WPR is accomplished with a byte write operation with the requirements outlined in this section.

Accessing the WPR requires the use of 1011b (Bh) as the device type identifier in the device address byte (see Table 1). Following the device type identifier are the hardware address bits (A2, A1) for which the values are determined by the ordering code of the device (see Table 3 and Table 4). Finally, bit 0 is the Read/Write Select bit where a logic ‘1’ is used for reading and a logic ‘0’ is used for writing.

Table 1. Device Address Byte Requirements for Accessing the Write Protection Register
Memory Region Device Type Identifier Hardware Address Bits Don’t Care R/W Select
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2(1) Bit 1 Bit 0
Write Protection Register 1 0 1 1 A2 A1 X R/W
Note:
  1. 1.The A1 Address Bit is a “Don’t Care” on the AT24CSW08X when accessing the WPR.
When accessing the Write Protection register, it is required that the A7 and A6 bits of the word address be set to 11b respectively. The remaining bits of the word address byte are “don’t care” bits as shown in Table 2.
Table 2. Word Address Byte Requirements for Accessing the Write Protection Register
  A7 A6 A5 A4 A3 A2 A1 A0
Write Protection Register 1 1 X X X X X X
Following the word address byte are the contents of the 8‑bit Write Protection register. The register format is shown in Table 3 and the WPR bit functions are included in Table 4.
Table 3. Write Protection Register Format
  D7 D6 D5 D4 D3 D2 D1 D0
Read WPR 0 0 0 0 WPRE WPB1 WPB0 WPRL
Write WPR 0 1 0: No Lock 0
1: Set Lock
Table 4. Write-Protect Register Bit Function
Bit Name Type Description
3 WPRE

Write Protection Register Enable

R/W 0 No Software Write Protection is enabled (Factory Default).
1 Write protection is set by the state of the WPB[1:0] bits.
2:1 WPB1 Write-Protect Block Bits R/W 00 Upper ¼ of EEPROM is write protected (Factory Default).
01 Upper ½ of EEPROM is write protected.
WPB0 10 Upper ¾ of EEPROM is write protected.
11 Entire EEPROM is write protected.
0 WPRL Write-Protect Lock Bit R/OTP 0 WPR can be written to; requires D5 = 0 during write (Factory Default).
1 WPR will become permanently locked (requires D5 = 1) during write.