This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DS90UB913/914 I2C

Hi,
My customer has some questions about below application with DS90UB913/914.

1. Is HOST possible to control all devices through I2C?
2. If yes,  should all IDs be independent of each?
3. If yes, how do you set the registers of SER/DES and how do you control SAR-A and DES-A ?
 
Regards,
Toshi

  • Hi Toshi,

    It is possible to control all of the devices via I2C from the Host shown in your block diagram.  There are a couple ways you can accomplish this depending on if you have independent IDs or not and how much you want to load the I2C line.

    Method 1 - Pass All

    If all of the addresses are independent then you could enable I2C Pass All on each of the SERs and DESs.  This is reg 0x03 bit [3] on the 913 and reg 0x21 bit [7] on the 914.  Each SER/DES pair will pass all I2C commands to the other side.  On disadvantage of this method is that if the host sends a message to SER-B it will appear all the way down to the camera potentially loading down the I2C line.

    Method 2 - SlaveID and SlaveAlias

    Another option is to use the the DES SlaveIDs and SlaveAliases.  Using these it is optional to have independent IDs and there is less load on the I2C lines.  The 914 SlaveIDs are registers 0x08-0x0F and the 914 SlaveAliases are registers 0x10-0x17.  If the DES sees a I2C message that matches its Slave Alias ID then it remaps it to its corresponding slave ID and passes the signal on.  If an I2C does not match a slave alias it is not passed on.  Both SlaveID and SlaveAlias have to be filled even if the IDs are independent.  If the IDs are independent the easiest option is for SlaveID and SlaveAlias to be filled with the same address.  The DES will automatically load its paired SER's ID into reg 0x06.  reg 0x07 can be used as an Alias to this ID if you are not using independent IDs.

    For your system with independent IDs you could do the following:
    DES-B registers: 0x08=ADDR-C (Adds the FPGA's address to SlaveID[0])
                               0x09=ADDR-D (DES-A to SlaveID[1])
                               0x0A=ADDR-E (SER-A to SlaveID[2])
                               0x0B=ADDR-F (Camera to SlaveID[3])
                               0x10=ADDR-C (Setting SlaveAlias[0] to the same address since the IDs are independent)
                               0x11=ADDR-D (DES-A to SlaveAlias[1])
                               0x12=ADDR-E (SER-A to SlaveAlias[2])
                               0x13=ADDR-F (Camera to SlaveAlias[3])
    DES-A registers: 0x08=ADDR-F (Camera to SlaveID[0])
                                0x10=ADDR-F(Camera to SlaveAlias[0])

    If you are not using independent IDs it gets a little more complicated.  You would need different and independent SlaveAlias's that would remap the I2C message to the correct address when it reaches the correct location.  

    If ADDR-E = ADDR-B and ADDR-D=ADDR-A and all other IDs are independent you could do the following:

    DES-B registers: 0x08=ADDR-C (Adds the FPGA's address to SlaveID[0])
                               0x09=ADDR-D (DES-A to SlaveID[1])
                               0x0A=TEMP-1 (SER-A's temporary slave ID to SlaveID[2])
                               0x0B=ADDR-F (Camera to SlaveID[3])
                               0x10=ADDR-C (FPGA to SlaveAlias[0])
                               0x11=TEMP-2 (DES-A's temporary ID to SlaveAlias[1])
                               0x12=TEMP-1 (SER-A's temporary ID to SlaveAlias[2])
                               0x13=ADDR-F (Camera to SlaveAlias[3])
    DES-A registers: 0x08=ADDR-F (Camera to SlaveID[0])
                                0x10=ADDR-F(Camera to SlaveAlias[0])
                                0x07=TEMP-1(SER-A's temp ID to SER Alias)

    Where TEMP-1 and TEMP-2 are used by the host as independent IDs to read and write to SER-A and DES-A but the true address is still ADDR-E and ADDR-D.

     

    The above method assumes that the Host is the only I2C Master and that the FPGA only acts as an I2C slave.

    Hope this helps, please let me know if you have any other questions.

    Regards,

    Mike

  •  Hi Mike,

    can the µC read sensor's/camera's register through I2C?

    i have tried with configuration on Regs SLAVE ID[0..7] and SLAVE ALIAS[0..7], but no success. i can read 0xc0 and 0xb2, but if i want to read 0xc8 registers i become the values of 0xb2. there are some values can help:

    DEVICE(0xC0): reg0=0xC0 and reg6=0xB2

    DEVICE(0xB2): reg0=0xB0 and reg6=0xC0

    DEVICE(0xC8): reg0=0xC0 and reg6=0xB0

    DEVICE(0xB0): reg0=0xB0 and reg6=0xC8

    i hoppe you can help me.

    Thank you