sc18is602 NXP Semiconductors, sc18is602 Datasheet - Page 14

no-image

sc18is602

Manufacturer Part Number
sc18is602
Description
Sc18is602/sc18is603 I?c-bus To Spi Bridge
Manufacturer
NXP Semiconductors
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
sc18is602BIPW
Manufacturer:
NXP
Quantity:
2 956
Part Number:
sc18is602BIPW
Manufacturer:
NXP/恩智浦
Quantity:
20 000
Part Number:
sc18is602BIPW,112
Manufacturer:
NXP
Quantity:
463
Part Number:
sc18is602BIPW,128
Manufacturer:
NXP/恩智浦
Quantity:
20 000
NXP Semiconductors
8. I
SC18IS602_603_3
Product data sheet
2
C-bus to SPI communications example
The following example describes a typical sequence of events required to read the
contents of an SPI-based EEPROM. This example assumes that the SC18IS602/603 is
configured to respond to address 50h. A START condition is shown as ‘ST’, while a STOP
condition is ‘SP’. The data is presented in hexadecimal format.
1. The first message is used to configure the SPI port for mode and frequency.
2. An SPI EEPROM first requires that a Write Enable command be sent before data can
3. Clear the interrupt. This is not required if using a polling method rather than interrupts.
4. Write the 8 data bytes. The first byte (Function ID) tells the SC18IS602/603 which
5. When an interrupt occurs, do a Clear Interrupt or wait until the SC18IS602/603
6. Read the 8 bytes from the EEPROM. Note that we are writing a command, even
7. The interrupt can be cleared, if needed.
8. Read back the data buffer. Note that we will actually need to read back 11 data bytes
be written.
Slave Select output to use. This example uses SS2 (shown as 04h). The first byte
sent to the EEPROM is normally 02h for the EEPROM write command. The next one
or two bytes represent the subaddress in the EEPROM. In this example, a two-byte
subaddress is used. Bytes 00 and 30 would cause the EEPROM to write to
subaddress 0030h. The next eight bytes are the eight data bytes that will be written to
subaddresses 0030h through 0037h.
responds to its I
though we are going to perform a read from the SPI port. The Function ID is again
04h, indicating that we are going to use SS2. The EEPROM requires that you send a
03h for a read, followed by the subaddress you would like to read. We are going to
read back the same data previously written, so this means that the subaddress should
be 0030h. We would like to read back 8 bytes so we can send eight bytes of FFh to
tell the SC18IS602/603 to send eight more bytes on MOSI. While it is sending these
eight data bytes, it is also reading the MISO pin and saving the data in the buffer.
since the first three bytes sent on the SPI port were the read code (03h) and the two
subaddress bytes.
You can see that on the I
SPI bus. The first byte is the SC18IS60x address, followed by three dummy data
bytes. These dummy data bytes correspond to the three bytes sent to the EEPROM
before it actually places data on the bus (command 03h, subaddress 0030h).
ST,50,F0,02,SP
ST,50,04,06,SP
ST,50,F1,SP
ST,50,04,02,00,30,01,02,03,04,05,06,07,08,SP
ST,50,F1,SP
ST,50,04,03,00,30,FF,FF,FF,FF,FF,FF,FF,FF,SP
ST,50,F1,SP
ST,50,00,00,00,01,02,03,04,05,06,07,08,SP
2
C-bus address.
Rev. 03 — 13 August 2007
SPI frequency 115 kHz using Mode 0
EEPROM write enable using SS2, assuming the Write Enable is 06h
Clear interrupt
Clear interrupt
Clear interrupt
2
C-bus the first four bytes do not contain the data from the
Write 8 bytes using SS2
Read 8 bytes using SS2
Read the data buffer
SC18IS602/603
I
2
C-bus to SPI bridge
© NXP B.V. 2007. All rights reserved.
14 of 25

Related parts for sc18is602