DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

CP2120 View Datasheet(PDF) - Silicon Laboratories

Part Name
Description
Manufacturer
CP2120
Silabs
Silicon Laboratories Silabs
CP2120 Datasheet PDF : 24 Pages
First Prev 11 12 13 14 15 16 17 18 19 20 Next Last
CP2120
6.4. I2C Receive Buffer Size
Bytes received from I2C transactions are stored in the 255-byte data buffer. The number of bytes currently stored
inside this buffer is saved in the RXBUFF Internal Register.
Internal Register Definition 6. RXBUFF: Receive Buffer Size Register
R
RXB7
Bit 7
R
RXB6
Bit 6
R
RXB5
Bit 5
R
RXB4
Bit 4
R
RXB3
Bit3
R
RXB2
Bit 2
R
RXB1
Bit 1
R
RXB0
Bit 0
Internal Register Address:
Reset Value:
Bit 7-0:
0x06
0x00
RXB7-0: Receive Buffer Size
Indicates the number of bytes received during the last I2C read transaction.
6.5. I2C Commands
SPI commands initiate all I2C transactions. The CP2120 executes I2C transactions only after every byte of the
command has been successfully received across the SPI bus. Once the CP2120 has completed the I2C
transaction prompted by the command, the INT pin will be pulled low to indicate that command execution has
completed. If an I2C command is issued while an I2C command is in progress, the second I2C command will be
ignored.
6.5.1. Write Bytes to I2C
SPI Master COMMAND
0x00
NUMBER
OF BYTES
SLAVE
ADDRESS +W
DATA
BYTE1
...
DATA
BYTE N
This command transmits data to an I2C slave device. The command begins with the command byte (0x00),
followed by the number of bytes to be transmitted across I2C, which can range from 1 to 255, and the address of
the I2C Slave. The SPI master then sends the data to be transmitted across I2C. Sending more or fewer bytes than
was indicated by the second byte of the command will result in an error condition, and the I2C transaction will not
be initiated.
Once the I2C transaction completes, the CP2120 pulls the INT pin low and sets the internal register according to
the results of the transaction.
6.5.2. Read Bytes from I2C
SPI Master
COMMAND
0x01
NUMBER SLAVE ADDRESS
OF BYTES
+R
This command attempts to retrieve bytes from an I2C Slave device. The command begins with the command byte,
0x01, followed by the number of bytes to read (1 to 255) and the address of the I2C slave device.
Once the I2C transaction completes, the CP2120 pulls the INT pin low and sets I2CSTAT according to the results of
the transaction. The CP2120 saves the number of bytes stored in the buffer in the internal register named
RXBUFF. A Read Buffer command can be issued to retrieve the bytes from the buffer.
Note: If the SPI Master issues a second Read Bytes from I2C command before issuing a Read Buffer command, the
bytes stored in the CP2120's buffer will be overwritten.
Rev. 1.0
17

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]