1.3
Example of Protocol Using a Serial EEPROM (XL93LC66)
1.3.1
Read Cycle
SPRU686
On the DI line, data is generated from the EEPROM interface on the SCLK
rising edge and read by the MicroWire interface on the SCLK rising edge.
Set up the interface by writing the following values in setup register 1 (SR1):
CS_EDGE_RD = 1
-
CS_EDGE_WR = 0
-
CSCS_LVL = 1
-
CS_FRQ = 00
-
CS_CHK = 1
-
In this example, only two cycles (read and write) are described.
1) Set the following fields of the control and status register (CSR):
NB_BITS_RD: 0
J
NB_BITS_WR: 0
J
INDEX: 00
J
CS_CMD: 1
J
START: 0
J
2) Load the transmit data register (TDR) with:
1 1 0 A7 A6 A5 A4 A3 A2 A1 A0 x x x x x x: Don't care
J
A7 ... A0: Address of the selected memory register
J
3) Wait for the CSRB bit of the CSR to be reset.
4) Set the following fields of the control and status register (CSR):
NB_BITS_RD: 16 (decimal)
J
NB_BITS_WR: 11 (decimal)
J
INDEX: 00
J
CS_CMD: 1
J
START: 1
J
5) Wait until the CSRB = 0 and RDRB = 1 (status bits of the CSR).
6) Read the content of the receive data register (RDR).
7) To continue reading the data external component, the EEPROM, go to 8.
Else go to 9.
MicroWire Interface
MicroWire Interface
19