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.

DS90UB964-Q1: I2C Read Through DS90UB913 Remote Slave Script

Part Number: DS90UB964-Q1
Other Parts Discussed in Thread: OPT3001, ALP, USB2ANY

Hello Team,

May I know if there is DS90UB964 I2C read through DS90UB913 remote slave script that you can share? 

Thank you.

Regards,

Ting

  • Ting,

    you can refer to snlu177.pdf (UB964 EVM guides, page23) to get one example script to enable remote slave I2C access.

    best regards,

    Steven

  • Hello Jun-qiang,

    Thank you!
    I will give a try.

    Regards,
    Ting
  • Hello Jun-qiang,

    I use 913 and 914 evm with coaxial cable and a I2C as remote salve connected at 913 side.

    I am able to read the remote slave. Thank you.

    But may I confirm with you that by using Script board.ReadI2C we can only read 2-byte?

    Regards,

    Ting

  • Hi Ting, what is the meaning of "we can only read 2-byte"? thanks.

    best regards,
    Steven
  • Thank you for helping!

    Regards,

    Ting

  • Below is the script I use to get 0x7F read out. Please change the filename extension to py.

    
    devID = 0xc0; #USB2ANY connect to 914 DES.
    print "devID =", hex(devID);
    
    board.WriteI2C(devID, 0x03, 0xE9) #enable I2C in general config 0x03.
    board.WriteI2C(devID, 0x1F, 0x01) #set Mode 0x1F to 100MHz 10-bit.
    print "0x06 SER ID =", hex(board.ReadI2C(devID, 0x06)) #DES 0x06 should auto load SER ID.
    board.WriteI2C(devID, 0x07, 0xB0) #set SER Alias 0x07 to same value as SER ID if no duplicated IC device on bus.
    board.WriteI2C(devID, 0x08, 0x88) #set Slave ID 0x08 to remote slave physical ID.
    board.WriteI2C(devID, 0x10, 0x88) #set Slave Alias 0x10 to same value as Slave ID if no duplicated IC device on bus.
    
    print "0x07 SER Alias =", hex(board.ReadI2C(devID, 0x07))
    print "0x08 Slave ID =", hex(board.ReadI2C(devID, 0x08))
    print "0x10 Slave Alias =", hex(board.ReadI2C(devID, 0x10))
    print "remote slave 0x7F =", hex(board.ReadI2C(0x88, 0x7f))
    
    

  • Ting,
    you mean the value of OPT3001's register 0x7F is 0x3001?

    Best regards,
    Steven
  • Hello Jun-qiang,

    Yes, OPT3001's register 0x7F is 0x3001.
    But I think our tool ALP Script can only read and write 1-byte.
    May I know if it is correct?

    Thank you.
    Regards,
    Ting
  • Hi,

    if you are using the USB2ANY then you can read only 1-byte, yes.

    Hamzeh

  • Hello Hamzeh,

    Thank you for confirming it!

    Regards,
    Ting