Document Number: 001-53145 Rev. *G Page 6 of 16
Device Address
The device I
2
C address is a 7-bit value. The default I
2
C address,
which appears in CyClockWizard is 69H, which can be changed
to any other value while generating configuration using
CyClockWizard. Note that the Field Programmable
(unprogrammed
[2]
) devices has default address as 59H.
Data Valid
Data is valid when the clock is HIGH, and may only be
transitioned when the clock is LOW as illustrated in Figure 5 on
page 7.
Data Frame
Every new data frame is indicated by a start and stop sequence,
as illustrated in Figure 6 on page 8.
START Sequence - Start frame is indicated by SDA going LOW
when SCLK is HIGH. Every time a start signal is given, the next
8-bit data must be the device address (seven bits) and a R/W
bit,
followed by register address (eight bits) and register data (eight
bits).
STOP Sequence - Stop frame is indicated by SDA going HIGH
when SCLK is HIGH. A stop frame frees the bus for writing to
another part on the same bus or writing to another random
register address.
Acknowledge Pulse
During write mode, the CY2XF23 responds with an
Acknowledge (ACK) pulse after every eight bits. This is
accomplished by pulling the SDA line LOW during the N*9
th
clock
cycle as illustrated in Figure 7 on page 8. (N = the number of
bytes transmitted). After the data packet is sent during read
mode, the master generates the acknowledge.
Write Operations
Writing Individual Bytes
A valid write operation must have a full 8-bit register address
after the device address word from the master, which is followed
by an acknowledge bit from the slave (SDA = 0/LOW). The next
eight bits must contain the data word intended for storage. After
the data word is received, the slave responds with another
acknowledge bit (SDA = 0/LOW), and the master must end the
write sequence with a STOP condition.
Writing Multiple Bytes
To write more than one byte at a time, the master does not end
the write sequence with a stop condition. Instead, the master can
send multiple contiguous bytes of data to be stored. After each
byte, the slave responds with an acknowledge bit, just like after
the first byte, and accepts data until the acknowledge bit is
responded to by the STOP condition. When receiving multiple
bytes, the CY2XF23 internally increments the register address.
Read Operations
Read operations are initiated the same way as write operations
except that the R/W bit of the slave address is set to ‘1’ (HIGH).
There are three basic read operations: current address read,
random read, and sequential read.
Current Address Read
The CY2XF23 has an onboard address counter that retains 1
more than the address of the last word access. If the last word
written or read was word ‘n’, then a current address read
operation would return the value stored in location ‘n+1’. When
the CY2XF23 receives the slave address with the R/W bit set to
a ‘1’, the CY2XF23 issues an acknowledge and transmits the
8-bit word. The master device does not acknowledge the
transfer, but does generate a STOP condition, which causes the
CY2XF23 to stop transmission.
Random Read
Through random read operations, the master may access any
memory location. To perform this type of read operation, first the
word address must be set. This is accomplished by sending the
address to the CY2XF23 as part of a write operation. After the
word address is sent, the master generates a START condition
following the acknowledge. This terminates the write operation
before any data is stored in the address, but not before the
internal address pointer is set. Next the master reissues the
control byte with the R/W byte set to ‘1’. The CY2XF23 then
issues an acknowledge and transmits the 8-bit word. The master
device does not acknowledge the transfer, but does generate a
STOP condition which causes the CY2XF23 to stop
transmission.
Sequential Read
Sequential read operations follow the same process as random
reads except that the master issues an acknowledge instead of
a STOP condition after transmission of the first 8-bit data word.
This action results in an incrementing of the internal address
pointer, and subsequently output of the next 8-bit data word. By
continuing to issue acknowledges instead of STOP conditions,
the master may serially read the entire contents of the slave
device memory. When the internal address pointer points to the
FFh register, after the next increment, the pointer will point to the
00h register.
Note
2. Field programmable devices are shipped unprogrammed and must be programmed before being installed on a PCB. An unprogrammed device will output the crystal
frequency of the integrated crystal (25 MHz for commercial and 38.8 MHz for industrial).