CY8C9520A
CY8C9540A
CY8C9560A
Document Number: 38-12036 Rev. *I Page 10 of 32
Figure 6. Memory Reading and Writing
Figure 7. Port Reading and Writing in Multi-Port Device
S A6 A5 A3 A2 A1 A0 1 AA4 data(Addr) A data(Addr+1)
ACK from
Slave
S A6 A5 A3 A2 A1 A0 0 A High(Addr) A Low(Addr)A4 A N P
No ACK
from Master
Stop
A ...
ACK from
Master
ACK from
Master
ACK from
Slave
ACK from
Slave
ACK from
Slave
R/W
Start
Slave Address
R/W
Memory Address
Reading from EEPROM
data 1S A6 A5 A3 A2 A1 A0 0 A High(Addr) A Low(Addr)A4 A
ACK from
Slave
ACK from
Slave
ACK from
Slave
Start
R/W
Writing to EEPROM
A data 2 A P
If current address crosses
64-byte block boundary,
then device performs real
writing to EEPROM
Stop
A ...
Up to the End of Address Space
Memory AddressSlave Address
S 0 A data from GPort1 ...
Start
Slave Address
R/W
Register Address = 1
Reading from GPort 1
0 0 0 0 0 0 0 1 A SA6 A5 A3 A2 A1 A0A4 A6 A5 A3 A2 A1 A0A4 1 A A data from GPort 2 A N P
No ACK
from Master
Stop
ACK from
Slave
ACK from
Slave
ACK from
Master
R/W
At this moment, device
performs reading from GPort 1
Reading from GPort 2
S 0 A data from GPort1 ...
Start
R/W
Register Address = 09h
Writing from GPort 1
0 0 0 0 1 0 0 1 AA6 A5 A3 A2 A1 A0A4 A A
ACK from
Slave
ACK from
Slave
ACK from
Slave
At this moment, device
performs output to GPort 1
data from GPort 2 data from GPort 3
Output to GPort 2
Output to GPort 3
A
ACK from
Slave
P
Stop
Slave Address
CY8C9520A
CY8C9540A
CY8C9560A
Document Number: 38-12036 Rev. *I Page 11 of 32
Register Mapping Table
The register address is auto-incrementing. If the master device
writes or reads data to or from one register and then continues
data transfer in the same I
2
C transaction, sequential bytes are
written or read to or from the following registers. For example, if
the first byte is sent to the Output Port 1 register, then the next
bytes are written to Output Port 2, Output Port 3, Output Port 4
etc. The first byte of each write transaction is treated as the
register address.
To read data from a seires of registers, the master device must
write the starting register address byte then perform a start and
series of read transactions. If no address was sent, reads start
from address 0.
To read a specific register address, the master device must write
the register address byte, then perform a start and read trans-
action.
See Figure 7 on page 10.
The device’s register mapping is listed in Table 6.
Register Descriptions
The registers for the CY8C95xx are described in the sections
that follow. Note that the PWM registers are located at addresses
28h to 2Bh.
Input Port Registers (00h–07h)
These registers represent actual logical levels on the pins and
are used for I/O port reading operations. They are read only. The
Inversion registers changes the state of reads to these ports.
Output Port Registers (08h–0Fh)
These registers are used for writing data to GPIO ports. By
default, all ports are in the pull up mode allowing
quasi-bidirectional I/O. To allow input operations without
reconfiguration, these registers have to store ’1’s.
Output register data also affects pin states when PWMs are
enabled. See Table 7 on page 12 for details.
See Figure 7 on page 10 illustrates port read/write procedures.
The Inversion registers have no effect on these ports.
Table 6. The Device Register Address Map
Address Register
Default
Register Value
00h Input Port 0 None
01h Input Port 1 None
02h Input Port 2 None
03h Input Port 3 None
04h Input Port 4 None
05h Input Port 5 None
06h Input Port 6 None
07h Input Port 7 None
08h Output Port 0 FFh
09h Output Port 1 FFh
0Ah Output Port 2 FFh
0Bh Output Port 3 FFh
0Ch Output Port 4 FFh
0Dh Output Port 5 FFh
0Eh Output Port 6 FFh
0Fh Output Port 7 FFh
10h Interrupt Status Port 0 00h
11h Interrupt Status Port 1 00h
12h Interrupt Status Port 2 00h
13h Interrupt Status Port 3 00h
14h Interrupt Status Port 4 00h
15h Interrupt Status Port 5 00h
16h Interrupt Status Port 6 00h
17h Interrupt Status Port 7 00h
18h Port Select 00h
19h Interrupt Mask FFh
1Ah Select PWM for Port Output 00h
1Bh Inversion 00h
1Ch Pin Direction - Input/Output 00h
1Dh Drive Mode - Pull Up FFh
1Eh Drive Mode - Pull Down 00h
1Fh Drive Mode - Open Drain
High
00h
20h Drive Mode - Open Drain
Low
00h
21h Drive Mode - Strong 00h
22h Drive Mode - Slow Strong 00h
23h Drive Mode - High-Z 00h
24h Reserved None
25h Reserved None
26h Reserved None
27h Reserved None
28h PWM Select 00h
29h Config PWM 00h
2Ah Period PWM FFh
2Bh Pulse Width PWM 80h
2Ch Programmable Divider FFh
2Dh Enable WDE, EEE, EERO 00h
2Eh Device ID/Status 20h/40h/60h
2Fh Watchdog 00h
30h Command 00h
Table 6. The Device Register Address Map (continued)
Address Register
Default
Register Value
CY8C9520A
CY8C9540A
CY8C9560A
Document Number: 38-12036 Rev. *I Page 12 of 32
Int. Status Port Registers (10h–17h)
Each ’1’ bit in these registers signals that there was a change in
the corresponding input line since the last read of that Interrupt
Status register. Each Interrupt (Int.) Status register is cleared
only after a read of that register.
If a PWM is assigned to a pin, then all state changes of the PWM
sets the corresponding bit in the Interrupt Status register. If the
pin's interrupt mask is cleared and the PWM is set to the slowest
possible rate allowed (driven by the programmable clock source
with divide register 2Dh set to FFh), then the INT line also drives
on the PWM state change.
Port Select Register (18h)
This register configures the GPort. Write a value of 0–7 to this
register to select the port to program with registers 19h–23h.
Interrupt Mask Port Register (19h)
The Interrupt Mask register enables or disables activation of the
INT line when GPIO input levels are changed. Each ’1’ in the
Interrupt Mask register masks (disables) interrupts generated
from the corresponding input line of the GPort selected by the
Port Select register (18h).
Select PWM Register (1Ah)
This register allows each port to act as a PWM output. By default,
all ports are configured as GPIO lines. Each ’1’ in this register
connects the corresponding pin of the GPort selected by the Port
Select register (18h) to the PWM output. Output register data
also affects the pin state when a PWM is enabled. See Table 7.
Note that a pin used as PWM output must be configured to the
appropriate drive mode. See Table 9 for more information.
Table 7 describes the logic of the Output and Select PWM
registers.
Inversion Register (1Bh)
This register can invert the logic of the input ports. Each ’1’
written to this register inverts the logic of the corresponding bit in
the Input register of the GPort selected by the Port Select register
(18h).
The Input registers' logic is presented in Table 8. These registers
have no effect on outputs or PWMs.
Port Direction Register (1Ch)
Each bit in a port is configurable as either an input or an output.
To perform this configuration, the Port Direction register (1Ch) is
used for the GPort selected by the Port Select register (18h). If
a bit in this register is set (written with '1'), the corresponding port
pin is enabled as an input. If a bit in this register is cleared (written
with '0'), the corresponding port pin is enabled as an output.
Drive Mode Registers (1Dh–23h)
Each port's data pins can be set separately to one of seven
available modes: pull up or down, open drain high/low, strong
drive fast/slow, or high-impedance input. To perform this
configuration, the seven drive mode registers are used for the
GPort selected by the Port Select register (18h). Each ’1’ written
to this register changes the corresponding line drive mode.
Registers 1Dh through 23h have last register priority meaning
that the bit set to high in which the last register was written
overrides those that came before. Reading these registers
reflects the actual setting, not what was originally written.
PWM Select Register (28h)
This register is configures the PWM. Write a value of 00h-0Fh to
this register to select the PWM to program with registers
29h-2Bh.
Table 7. Output and Select PWM Registers Logic
Output Select PWM Pin State
000
101
010
1 1 Current PWM
Table 8. Inversion Register Logic
Pin State Invert Input
000
101
011
110
Table 9. Drive Mode Register Settings
Reg. Pin State Description
1Dh Resistive Pull Up Resistive High, Strong Low
(default)
1Eh Resistive Pull Down Strong High, Resistive Low
1Fh Open Drain High Slow Strong High, High Z Low
20h Open Drain Low Slow Strong Low, High Z High
21h Strong Drive Strong High, Strong Low, Fast
Output Mode
22h Slow Strong Drive Strong High, Strong Low,
Slow Output Mode
23h High Impedance High Z

CY8C9560A-24AXIT

Mfr. #:
Manufacturer:
Cypress Semiconductor
Description:
Interface - I/O Expanders 60BIT IO EXPANDER W/EEPROM 27Kb
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union