LTC6811 communication through I2C

Hello all:

We are trying to interface between LTC6811  and LTC2451 ADC  through I2C on gpio4 and gpio5 of 6811 module. The LTC2451 ADC will act as a temperature sensor so we can measure temperature for our battery modules. In LTC2451 data sheet, the ADC will output a 16-bit value when it detects a read command from the master. My question is, how do I initialize the I2C communication from 6811? From the datasheet, in my understanding, we have to:

1. write to the COMM register using WRCOMM command 

2. start the communication using STCOMM command

3. read the COMM register for data from LTC2451 using RDCOMM command

However I am not sure what I should put in the COMM register in step 1. I assume ICOM0 will be the start signal, D0 will be the address of LTC2451 + read bit, then what about the rest of the COMM register, specifically ICOMn and FCOMn? Can someone give an example of what the registers should look like, if i were to send a read command to the ADC? Thank you very much.

Top Replies

  • 0
    •  Analog Employees 
    on Apr 22, 2019 2:22 PM


    Good Questions!

    The read/write sequence for LTC2451 is mentioned on page 11 of the datasheet, please follow them to replicate the same on the COMM register. 

    ICOM - Can be  START or BLANK or NO_Transmit

    DATA - Can be ADDRESS or DATA to be read/written

    FCOM - Can be ACK or NACK or STOP+ACK or STOP+NACK 

    Please check which type of sequence you wish to implement and fill the COMM register accordingly. 

    For example, implementing "Figure 7. Write, Read, START Conversion" (page 11, datasheet)

    ICOM[0] - START ----- DATA[0] - 7bit ADDRESS + W(0) ----- FCOM[0] - ACK from SLAVE

    ICOM[1] - BLANK ----- DATA[1] - WRITE DATA(8bit)       ----- FCOM[1] - NACK from SLAVE

    ICOM[2] - START ----- DATA[2] - 7bit ADDRESS + R(1)  ----- FCOM[2] - ACK from SLAVE 

    Use WRCOMM to write the above sequence then perform STCOMM to send the COMM register to the I2C bus.

    Then once again re-write the COMM register with the sequence mentioned below. 

    ICOM[0] - BLANK              ----- DATA[0] - 8 HIGH BITS  ----- FCOM[0] - NACK from SLAVE+STOP

    ICOM[1] - NO TRANSMIT ----- DATA[1] - 8 HIGH BITS  ----- FCOM[1] - NACK from SLAVE+STOP

    ICOM[2] - NO TRANSMIT ----- DATA[2] - 8 HIGH BITS  ----- FCOM[2] - NACK from SLAVE+STOP

    The READ data will be replaced in DATA[0], rest of the comm register values are set to dummy values. After performing the RDCOMM command DATA[0] can be read. 

    I hope this example solves your doubt. For values of all bits of COMM register, please go through Table no. 52 on page 63 of datasheet.



  • Thank you for your reply! From what you wrote earlier, why is the FCOM[2] NACK from SLAVE if the slave should be able to acknowledge the read command? Shouldn't it be an ACK from slave?

    And if I need to send the command to start conversion sequence listed in figure 5, is the below correct? the data read is 16 bits so there are 2 blank ICOM registers.

    reg.fields.ICOM0 = 0x6; //start signal
    reg.fields.D0 = slave_address << 1 | 0x1; //1 = read bit
    reg.fields.FCOM0 = 0x7; //slave generates ACK signal
    reg.fields.ICOM1 = 0x0; //blank
    reg.fields.D1 = 0x00; //blank
    reg.fields.FCOM1 = 0x0;  //master generates ACK signal
    reg.fields.ICOM2 = 0x0; //blank
    reg.fields.D2 = 0x00;  //blank
    reg.fields.FCOM2 = 0x9; //master generates NACK following a stop signal

  • 0
    •  Analog Employees 
    on Apr 25, 2019 7:14 AM in reply to nxie13

    As per Figure 7, for the first sequence yes you are correct you need ACK and not NACK. i will update in the previous answer. 

    For implementing Figure 5, to receive the read data you need to fill high bits(0xFF) in the data frame instead of  blank(0x00). 



  • Thank you for your reply Abhishek. I have the above code in my program but I didn't see any signal out of gpio 4 and 5 of DC2259. I also noticed that the COMM register was filled with 1's after I did the RDCOMM command - according to the data sheet:

    "WRCOMM Command: This command is used to write data
    to the COMM register. This command writes 6 bytes of
    data to the COMM register. The PEC needs to be written at
    the end of the data. If the PEC does not match, all data in
    the COMM register is cleared to 1s when CSB goes high."

    Does it mean that there is no i2c signal out of the gpio pins because PEC was not matching? What can we do to solve this issue? Is there any other possible explanation? Please advice and thank you very much for your reply.

  • 0
    •  Analog Employees 
    on Apr 29, 2019 7:29 AM in reply to nxie13

    Yes, it means the PEC is not matching. Please verify your data PEC and command PEC while sending. How are you calculating the PEC?