SNVSBU8A May 2021 – November 2021 LP5860
PRODUCTION DATA
The LP5860 supports two communication interfaces: I2C and SPI. If IFS is high, ithe device enters into SPI mode. If IFS is low, the device enters into I2C mode.
INTERFACE TYPE | ENTRY CONDITION |
---|---|
I2C | IFS = Low |
SPI | IFS = High |
The LP5860 is compatible with I2C standard specification. The device supports both fast mode (400-KHz maximum) and fast plus mode (1-MHz maximum).
I2C Data Transactions
The data on SDA line must be stable during the HIGH period of the clock signal (SCL). In other words, state of the data line can only be changed when clock signal is LOW. START and STOP conditions classify the beginning and the end of the data transfer session. A START condition is defined as the SDA signal transitioning from HIGH to LOW while SCL line is HIGH. A STOP condition is defined as the SDA transitioning from LOW to HIGH while SCL is HIGH. The bus leader always generates START and STOP conditions. The bus is considered to be busy after a START condition and free after a STOP condition. During data transmission, the bus leader can generate repeated START conditions. First START and repeated START conditions are functionally equivalent.
Each byte of data has to be followed by an acknowledge bit. The acknowledge related clock pulse is generated by the leader. The leader releases the SDA line (HIGH) during the acknowledge clock pulse. The device pulls down the SDA line during the 9th clock pulse, signifying an acknowledge. The device generates an acknowledge after each byte has been received.
There is one exception to the acknowledge after every byte rule. When the leader is the receiver, it must indicate to the transmitter an end of data by not acknowledging (negative acknowledge) the last byte clocked out of the follower. This negative acknowledge still includes the acknowledge clock pulse (generated by the leader), but the SDA line is not pulled down.
The address and data bits are transmitted MSB first with 8-bits length format in each cycle. Each transmission is started with Address Byte 1, which are divided into 5-bits of the chip address, 2 higher bits of the register address, and 1 read/write bit. The other 8 lower bits of register address are put in Address Byte 2.The device supports both independent mode and broadcast mode. The auto-increment feature allows writing / reading several consecutive registers within one transmission. If not consecutive, a new transmission must be started.
Address Byte1 | Chip Address | Register Address | R/W | |||||
---|---|---|---|---|---|---|---|---|
Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 | |
Independent | 1 | 0 | 0 | ADDR1 | ADDR0 | 9th bit | 8th bit | R: 1 W: 0 |
Broadcast | 1 | 0 | 1 | 0 | 1 | |||
Address Byte2 | Register Address | |||||||
Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 | |
7th bit | 6th bit | 5th bit | 4th bit | 3th bit | 2th bit | 1th bit | 0th bit |
The LP5860 enters into I2C mode if IFS is connected to GND. The ADDR0/1 pin is used to select the unique I2C follower address for each device. The SCL and SDA lines must each have a pullup resistor (4.7 KΩ for 400 KHz, 2 KΩ for 1 MHz) placed somewhere on the line and remain HIGH even when the bus is idle. VIO_EN can either be connected with VIO power supply or GPIO. It’s suggested to put one 1nF cap as closer to VIO_EN pin as possible. Up to four LP5860 follower devices can share the same I2C bus by the different ADDR configurations.
The LP5860 is compatible with SPI serial-bus specification, and it operates as a follower. The maximum frequency supported by LP5860 is 12 MHz.
SPI Data Transactions
MISO output is normally in a high impedance state. When the follower-select pin SS for the device is active (low) the MISO output is pulled low for read only. During write cycle MISO stays in high-impedance state. The follower-select signal SS must be low during the cycle transmission. SS resets the interface when high. Data is clocked in on the rising edge of the SCLK clock signal, while data is clocked out on the falling edge of SCLK.
SPI Data Format
The address and data bits are transmitted MSB first with 8-bits length format in each cycle. Each transmission is started with Address Byte 1, which contains 8 higher bits of the register address. The Address Byte 2 is started with 2 lower bits of the register address and 1 read/write bit. The auto-increment feature allows writing / reading several consecutive registers within one transmission. If not consecutive, a new transmission must be started.
Address Byte1 | Register Address | |||||||
---|---|---|---|---|---|---|---|---|
Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 | |
9th bit | 8th bit | 7th bit | 6th bit | 5th bit | 4th bit | 3th bit | 2th bit | |
Address Byte2 | Register Address | |||||||
Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 | |
1th bit | 0th bit | R: 0 W: 1 | Don't Care |
The device enters into SPI mode if IFS is pulled high to VIO through a pullup resistor(4.7KΩ recommended). VIO_EN can either be connected with VIO power supply or GPIO. It’s suggested to put one 1nF cap as closer to VIO_EN pin as possible. In SPI mode host can address as many devices as there are follower select pins on host.