CY27EE16Z
Document #: 38-07440 Rev. *B Page 10 of 17
Serial Programming Interface (SPI) Prot ocol
and Timing
The CY27EE16ZE utilizes a 2-serial-wire interface SDAT and
SCLK that operates up to 400 kbits/sec in Read or W rite mode.
The basic Write serial format is as follows:
Start Bit; 7-bit Device Address (DA); R/W Bit; Slave Clock
Acknowledge (ACK); 8-bit Memory Address (MA); ACK; 8-bit
Data; A CK; 8-bi t Data in MA+1 if de sired; ACK; 8-b it Data i n
MA+2; ACK; etc. until STOP Bit. The basic serial format is
illustrated in Figure 4.
Data Valid
Data is vali d when the clock is HIGH, and may only be transi-
tioned when the clock is LOW as illustrated in Figure 5.
Data Frame
Every new data frame is indicated by a start and stop
sequence, as illustrated in Figure 6.
Start Sequence – Start Frame is indicated by SDAT going
LOW when SCLK is HIGH. Every time a start signal is given,
the next 8-bit data must be the device address (7 bits) and a
R/W bit, foll owed by regis ter address (8 b its) and regis ter data
(8 bits).
Stop Sequence – Stop Frame is indicated by SDAT 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 CY27EE16ZE will respond with an
Acknow ledge pulse af ter every 8 bit s. This is ac complis hed by
pulling the SDAT line LOW during the N*9th clock cycle as
illust rated in Figure 7. (N = the number of bytes transmitted).
During Read Mode the acknowledge pulse after the data
packet is sent is generated by the master.
Device Addressing
The first four bits of the device address word for the eight
EEPROM scratchpad blocks are 1000. The 5th, 6th, and 7th
bits are the ad dress bits (A2, A1, A0 resp ectively) for the slices
of 2K EEPROM. The first seven bits of the device address
word for t he cl ock c on fig urati on EEPROM blo ck ar e 11010 00.
The first seven bits of the device address word for the clock
configuration SRAM block are 1101001. The final bit of the
address specifies the operation (HIGH/1 = Read, LOW/0 =
Write)
W rite Operations
Writing Individual Bytes
A valid write operation must have a full 8-bit word address after
the device address word, which is followed by an acknowl-
edgment b it from the EEPROM (ac k = 0/LOW). The next 8 bits
must con tain the dat a word intended for storage. After the data
word is received, the EEPROM responds with another
acknowledge bit (ack = 0/LOW), and the device that is
address in g the EEPROM m ust end the wri te s equ enc e wi th a
stop condition. The EEPROM now enters an internal write
process transferring the data received to nonvolatile memory.
During , and until compl etion of, thi s internal writ e proc ess, t he
EEPROM will not respond to other commands.
Writing Multiple Bytes
The CY27EE16ZE is capable of receiving up to 16 consec-
utive written bytes. In order to write more than one byte at a
time, the device addressing the EEPROM does not end the
write sequence with a stop condition. Instead, the device can
send up to fifteen more bytes of data to be stored. After each
byte, the EEPROM responds with an acknowledge bit, just like
after the first byte. The EEPROM will accept data until the
acknowledge bit is responded to by the stop condition, at
which time it enters the internal write process as described in
the section above. When receiving multiple bytes, the
CY27EE16ZE internally increments the address of the last 4
bits i n t he address w ord. Afte r 1 6 b yt es are w rit ten, th at incre-
menting brings it back to the first word that was written. If more
than 16 bytes are written, the CY27EE16ZE will overwrite the
first bytes written.
Read Operations
Read operations are initiated the same way as Write opera-
tions 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 CY27EE16ZE has an onboard address counter that
retai ns 1 m ore than the add ress o f the las t wor d access . If the
last word written or read was word ‘n,’ then a current address
read opera t io n woul d retu rn the val ue stored in location ‘n+1’.
When the CY27EE16ZE receives the slave address with the
R/W bit set to a ‘1,’ the CY27EE16ZE 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 CY27EE16ZE to stop trans-
mission.
Random Read
Through random read operat ions, the mas ter may ac cess 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 CY27EE16ZE as part of a write
operation. After the word address is sent, the master
generate s a START condition f ollowing the a cknowledge. This
termina tes the w rite op eration be fore any da t a i s sto red 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.’ Th e CY2 7EE16ZE t hen is sues an ac knowl edge a nd
transmits the 8-bit word. The master device does not
acknowledge the transfer, but does generate a STOP
condition which causes the CY27EE16ZE to stop trans-
mission.