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.

DS90UB954-Q1: how to set i2c alias value

Part Number: DS90UB954-Q1

Dear Sir,

I got a copy from this forum, please see the following section,

import time
#***TI confidential***
#****Disclaimer: this is for evaluation purposes only. Please contact the image sensor manufacturer for additional information on programming and initialization ***

#reset and initialize sensor from DES using 953

# Set up IDs
UB954 = 0x7A
UB953ID = 0x30
UB953 = 0x18
sensorID = 0x60
sensorAlias = 0xC4

# Set up Port0
board.WriteI2C(UB954, 0x4C, 0x01)

# Set up Back Channel Config (0x58)
board.WriteI2C(UB954,0x58,0x5E)

# Set up SER ID
#board.WriteI2C(UB954,0x5B,UB953ID)
# Set up SER Alias ID
board.WriteI2C(UB954,0x5C,UB953)
# Set up Slave/Camera ID
board.WriteI2C(UB954,0x5D,sensorID)
# Set up Slave/Camera Alias ID
board.WriteI2C(UB954,0x65,sensorAlias)

# Set GPIO2 and GPIO3 to outputs, where GPIO2 = RESET and GPIO3 = PWDN
board.WriteI2C(UB953,0x0E,0xC0)
# Set GPIO2 and GPIO3 to High - bring sensor out of power down mode
board.WriteI2C(UB953,0x0D,0x0C)
time.sleep(0.1)
# Bring GPIO3 low to place sensor in reset
board.WriteI2C(UB953,0x0D,0x08)
time.sleep(1)
# Bring GPIO3 high again to prepare sensor for initialization
board.WriteI2C(UB953,0x0D,0x0C)
print "Sensor Reset"

#Initialize sensor
board.WriteI2C(sensorAlias,0x30, [0x13,0x01])
time.sleep(0.1)

board.WriteI2C(sensorAlias,0x32, [0x8a,0x01])
board.WriteI2C(sensorAlias,0x31, [0x3f,0x80])
board.WriteI2C(sensorAlias,0x31, [0x32,0x24])
board.WriteI2C(sensorAlias,0x30, [0x00,0x03])

..................................

..................................

As for 954, 953 and sensor ID or alias , I am confused.

# Set up IDs
UB954 = 0x7A    
UB953ID = 0x30
UB953 = 0x18
sensorID = 0x60
sensorAlias = 0xC4

The I2C address of 954 is 0x7A(8bit), it is right.

But, as for 953,

0x18 is 7 bit I2C address ,and 0x30 is 8bit I2C address.

why SER_ID and SER_ALIAS_ID are set by 0x30 and 0x18 ?

According to SER_ID and SER_ALIAS_ID definition,  7:1 is I2C address, so , 8bit value (0x30)shall be set for both of SER_ID and SER_ALIAS_ID.

As for sensor, 0x60 , 7bit I2C address, 8bit address is 0xc0, not 0xc4, is it right?

Just like SER_ID and SER_ALIAS_ID, I think 8bit address 0xc0 shall be set for both SLAVEID and SLAVE_ALIAS_ID.

Can anyone explain how to set SER_ID /SER_ALIAS_ID and SLAVEID and SLAVE_ALIAS_ID?

Thanks.

  • David,

    As explained in the 0x5c register description, the transaction to this alias address is remapped to the ID address. So alias is just an alternative address and it is very useful in cases where there are multiple sensor devices with the same id as explained in section 7.5.4 of the DS. You can keep alias and id the same if you don't have multiple devices.

    Thanks,
    Vishy