English
Language : 

CY8C9520 Datasheet, PDF (14/25 Pages) Cypress Semiconductor – 20-, 40-, and 60-Bit I/O Expander with EEPROM
CY8C95xx Preliminary Data Sheet
3. Register Reference
Each ’1’ enables the corresponding feature, ’0’ disables.
Table 3-7. Enable Register
Bit
Function
Default
7
6
5
4
Reserved
Reserved
3
2
1
0
EERO EEE WDE
0
0
0
Writes to this register differ from other registers. The write
sequence to modify the Enable register is as follows:
1. Send device I2C address with bit 0.
2. Send register address 2Dh.
3. Send unlock key - the sequence of three bytes: 43h, 4Dh,
53h; ('C', 'M', 'S' in ASCII bytes).
4. Send new Enable register value.
This write sequence secures the register from accidental
changes. The register can be read without the use of the unlock
key.
By default, EERO and EEPROM (EEE bit) are disabled and WD
line (WDE bit) is set to GPIO (WD disabled).
When performing a burst write operation that crosses this regis-
ter, the data written to this register will be ignored and the
address will increment to 2Eh.
3.2.16 Device ID/Status Register (2Eh)
This register stores device identifiers (2xh/4xh/6xh) and reflects
which settings were loaded during startup, either factory
defaults (FD) or user defaults (UD). By default during startup,
the device will attempt to load the user default block. If it seems
to be corrupted then factory defaults are loaded and the low nib-
ble of this register is set high to inform which set is active. The
high nibble is always equal to 2 for CY8C9520, 4 for
CY8C9540, and 6 for CY8C9560.
This register is read-only.
Table 3-8. Device ID Status Register
Bit
Function
7
8
5
4
Device Family (2, 4,or 6)
3
2
1
Reserved
0
FD/UD
Note that registers are not restored in parallel. Do not assume
any particular order to the restoration process.
Table 3-9. Available Commands
Command
01h
02h
03h
04h
05h
06h
07h
Description
Store device configuration to EEPROM POR defaults
Restore Factory Defaults
Write EEPROM POR defaults
Read EEPROM POR defaults
Write device configuration
Read device configuration
Reconfigure device with stored POR defaults
3.3 Commands Description
3.3.1
Store Config to E2 POR Defaults
Cmd (01h)
The current ports settings (drive modes and output data) and
other configuration registers are saved in the EEPROM by
using the store configuration command (Cmd). These settings
will be automatically loaded after the next device power-up or if
the 07h command is issued.
3.3.2 Restore Factory Defaults Cmd (02h)
This command replaces the saved user configuration with the
factory default configuration. Current settings are unaffected by
this command. New settings will be loaded after the next device
power-up or if the 07h command is issued.
3.3.3 Write E2 POR Defaults Cmd (03h)
This command is used to send new power-up defaults to the
CY8C95xx without changing current settings unless the 07h
command is issued afterwards. This command is followed by
147 data bytes according to Table 3-10. The CRC is calculated
as the XOR of the 146 data bytes (00h-91h). If the CRC check
fails or an incomplete block is sent, then the slave will respond
with a NAK and the data will not be saved to EEPROM.
To define new POR defaults the user must:
3.2.17 Command Register (30h)
This register sends commands to the device, including current
configuration as new POR defaults, restore factory defaults,
define POR defaults, read POR defaults, write device configura-
tion, read device configuration, and reconfigure device with
stored POR defaults. The command set is presented in Table 3-
9.
■ Write command 03h;
■ Write 146 data bytes with new values of registers;
■ Write 1 CRC byte calculated as XOR of previous 146 data
bytes.
Content of the data block is described in Table 3-10.
August 17, 2005
Document No. 38-12036 Rev. *A
14