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.

DLPC6401: Dimming DLPC6401 over I2C

Part Number: DLPC6401

Hello, 

I want to dim the DLPC6401 over i2c.

I have a linux computer connected via i2c to the DLPC6401. 

I am using the archlinux package i2c-tools. 

When I run an i2cdetect on my linux computer I see the following: 

root@archlinux ~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 51 52 53 -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

I notice address 0x1a is available, but I do not see addresses 0x34 or 0x35. Address 0x1a is the same as address 0x34 shifted right by one bit. 

I am also able to read and write to the i2c on address 0x1a but it is inconsistent, and unpredictable. What am I missing?

Thanks so much!

chris

  • Hello Christopher,

    Sorry to hear you are having some troubles! Could you please detail your hardware setup in a little more depth? Is this your own custom system? Do you have a direct I2C connection from the computer to port-1 on the DLPC6401? Please let us know and we will see how we can help.

    Thanks,
    Kyle
  • Hi Kyle,

    Thanks for your quick response!

    Yes, I have a connection from my computer to port 1 on the DLPC6401.

    I also have a connection between GND on the linux computer, and GND on the DLPC6401.

    I also have a connection between 3.3v from the linux computer and DLP_ON pin on the DLPC6401.

    In short, the connections linux_pc=>dlpc6401 are:

    sda1=>sda1

    sdc1=>sdc1

    gnd=>gnd

    3v3=>dlp_on

    Here is an example of the unusual (in my opinion) behavior I am seeing, the commands below were sent to the dlpc640:

    # read the value of register 0x00 and get value 0x00 (this is expected)
    root@archlinux ~ $ i2cget -y 1 0x1a 0x00
    0x00
    # set the value of register 0x00 to 0x01 (the reason it is 0x80 is because the 7th bit should be set to 1 for write commands)
    # this operation was a success! It now shows the test pattern!
    root@archlinux ~ $ i2cset -y 1 0x1a 0x80 0x01
    # read the value of register 0x00 ... expected result 0x01 and got 0x00? Why?
    root@archlinux ~ $ i2cget -y 1 0x1a 0x00
    0x00
    # try again, same bad result!
    root@archlinux ~ $ i2cget -y 1 0x1a 0x00
    0x00
    # try again, and success!!
    root@archlinux ~ $ i2cget -y 1 0x1a 0x00
    0x01
    # try again, and same bad result! why?
    root@archlinux ~ $ i2cget -y 1 0x1a 0x00
    0x00

  • Hi Kyle,
    Wanted to follow up on this!
    Do you have any ideas? Do you have any documents showing how to interface to the dlpc6401 from linux?
    Why is it showing the incorrect device address?

    Thank you,
    chris
  • Now I understand why the address is 0x1a and not 0x34 / 0x35. Because convention states that the last bit is the read/write bit.
    www.totalphase.com/.../200349176-7-bit-8-bit-and-10-bit-I2C-Slave-Addressing

    I still do not know why my writes/reads are not always working.

    Ideas?

    Thank you!
    chris
  • Chris,

    As per protocol

    For Write operation

    <device_address-write> <register_address | 0x80>  <register parameters> //bitwise "|" with 0x80 to indicate that is is register write operation

    For Read operation is two step process

    <device_address-write>  <register_address> <register_parameters_if_applicable> //note we are not doing bitwise "|" so this will be interpreted as read register

    <device_address_read>  <read_N+1_bytes>   // if register is expected to return N bytes you must read N+1 bytes because the first byte is status byte 

    Refer to DLPC6401 http://www.ti.com/lit/ug/dlpu012/dlpu012.pdf for documentation.

    Regards,
    Sanjeev