For further programmability, the HD3SS3220 can be controlled using I2C. The HD3SS3220 local I2C interface is available for reading/writing after x clock cycles when the device is powered up. The SCL and SDA terminals are used for I2C clock and I2C data respectively. If I2C is the preferred method of control, the ADDR pin must be set accordingly.
Table 6-5 HD3SS3220 I2C Target Address| ADDR pin | Bit 7 (MSB) | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 (W/R) |
|---|
| H | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 0/1 |
| L | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0/1 |
The following procedure should be followed to
write to HD3SS3220 I2C registers:
- The controller initiates a write
operation by generating a start condition (S), followed by the HD3SS3220 7-bit
address and a zero-value R/W bit to indicate a write cycle.
- The HD3SS3220 device acknowledges the address cycle.
- The controller presents the
sub-address (I2C register within the HD3SS3220 device) to be written,
consisting of one byte of data, MSB-first.
- The HD3SS3220 device acknowledges the sub-address cycle.
- The controller presents the first
byte of data to be written to the I2C register.
- The HD3SS3220 device acknowledges the byte transfer.
- The controller can continue
presenting additional bytes of data to be written, with each byte transfer
completing with an acknowledge from the HD3SS3220 device.
- The controller terminates the
write operation by generating a stop condition (P).
The following procedure should be followed to read
the HD3SS3220 I2C registers:
- The controller initiates a read
operation by generating a start condition (S), followed by the HD3SS3220 7-bit
address and a one-value R/W bit to indicate a read cycle.
- The HD3SS3220 device acknowledges the address cycle.
- The HD3SS3220 device transmits the contents of the memory registers MSB-first
starting at register 00h or last read sub-address+1. If a write to the
I2C register occurred prior to the read, then the HD3SS3220
device starts at the sub-address specified in the write.
- The HD3SS3220 device waits for
either an acknowledge (ACK) or a not-acknowledge (NACK) from the controller
after each byte transfer; the I2C controller acknowledges reception
of each data byte transfer.
- If an ACK is received, the HD3SS3220 device transmits the next byte of
data.
- The controller terminates the
read operation by generating a stop condition (P).
The following procedure should be followed for
setting a starting sub-address for I2C reads:
- The controller initiates a write
operation by generating a start condition (S), followed by the HD3SS3220 7-bit
address and a zero-value R/W bit to indicate a read cycle.
- The HD3SS3220 device acknowledges the address cycle.
- The controller presents the
sub-address (I2C register within the HD3SS3220 device) to be read,
consisting of one byte of data, MSB-first.
- The HD3SS3220 device acknowledges the sub-address cycle.
- The controller terminates the
read operation by generating a stop condition (P).
Note: If no sub-addressing is included for the read
procedure, then the reads start at register offset 00h and continue byte-by-byte
through the registers until the I2C controller terminates the read
operation. If a I2C address write occurred prior to the read, then
the reads start at the sub-address specified by the address write.