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.

DLP4710: Not able to control DLP4710 using raspberrypi via i2c

Part Number: DLP4710
Other Parts Discussed in Thread: DLPC3436, DLPC3439, DLPC-API

Hello ,

      I am trying to develop controls to the DLP 4710 using raspberrypi via i2c. I figured out that i need to enable gpio pin for the i2c control to be relapsed from cypress for raspberrypi to take over the control but seems like I am not able to achieve this. For i2c connection i am using j11 pins on DLP connected directly to raspberrypi SCL,SDA,GND,VCC=3.3V. How do i develop controls here using raspberrypi via i2c? Please provide me detail and step by step instruction to get this working.

  • Giribabu,

    I posted about a similar topic in a thread recently (linked below):

    https://e2e.ti.com/support/dlp/f/94/p/980581/3622313

    In order to be able to use the Raspberry Pi with the DLP4710, you will need to set the Cypress GPIOs as you mentioned above. The DLP4710 EVM normally uses a Windows-based GUI, so the driver we typically use for the Cypress is also Windows-based.

    As such, you should talk to the Cypress either by using the Windows driver, or a Linux one if it is available. I'm not aware of a Linux Driver for the Cypress chip, so you may need to look at the Cypress website itself for more information.

    I hope this helps.

    Regards,

    Philippe Dollo

  • Hello,

    I received sample codes from TI for raspberrypi telling me that the python code should work when connected to DLP via i2c to raspberrypi. do I still have to develop controls for gpio or just use the code as it is. when I used the code I see errors  for i2c.initialize(),  InitGPIO() and i2c.terminate().

    We are struggling to solve this from past 2 weeks we need a full functional controls steps to read and write via i2c via raspberrypi to DLP asap. Below is the code provided by TI for DLP.

    ti-project_raspberrypi.txt
    ###########################################################################################################################################################################
    # Texas Instruments DLP LightCrafter 230NP EVM Python Support Code - sample00_template.py - Last Updated June 4th, 2020
    # This script is intended to be used with the DLPDLCR230NP EVM on a Raspberry Pi 4 (or compatible)
    # It is recommended to consult the DLPDLCR230NPEVM User's Guide for more detailed information on the operation of this EVM
    # For technical support beyond what is provided in the above documentation, direct inquiries to TI E2E Forums (http://e2e.ti.com/support/dlp)
    # 
    # Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/ 
    # 
    # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 
    # 
    # Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    # 
    # Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation 
    # and/or other materials provided with the distribution.
    # 
    # Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software 
    # without specific prior written permission.
    # 
    # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
    # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
    # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
    # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    #
    ###########################################################################################################################################################################
    import struct
    import time
    
    from enum import Enum
    
    import sys, os.path
    python_dir = (os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
    sys.path.append(python_dir)
    from api.dlpc343x_xpr4 import *
    from api.dlpc343x_xpr4_evm import *
    from linuxi2c import *
    import i2c
    
    class Set(Enum):
        Disabled = 0
        Enabled = 1
    
    def main():
    
            gpio_init_enable = False          # Set to FALSE to disable default initialization of Raspberry Pi GPIO pinouts. TRUE by default.
            i2c_time_delay_enable = False    # Set to FALSE to prevent I2C commands from waiting. May lead to I2C bus hangups with some commands if FALSE.
            i2c_time_delay = 0.8             # Lowering this value will speed up I2C commands. Too small delay may lead to I2C bus hangups with some commands.
            protocoldata = ProtocolData()
    
            def WriteCommand(writebytes, protocoldata):
                '''
                Issues a command over the software I2C bus to the DLPDLCR230NP EVM.
                Set to write to Bus 7 by default
                Some commands, such as Source Select (splash mode) may perform asynchronous access to the EVM's onboard flash memory.
                If such commands are used, it is recommended to provide appropriate command delay to prevent I2C bus hangups.
                '''
                # print ("Write Command writebytes ", [hex(x) for x in writebytes])
                if(i2c_time_delay_enable): 
                    time.sleep(i2c_time_delay)
                i2c.write(writebytes)       
                return
    
            def ReadCommand(readbytecount, writebytes, protocoldata):
                '''
                Issues a read command over the software I2C bus to the DLPDLCR230NP EVM.
                Set to read from Bus 7 by default
                Some commands, such as Source Select (splash mode) may perform asynchronous access to the EVM's onboard flash memory.
                If such commands are used, it is recommended to provide appropriate command delay to prevent I2C bus hangups.
                '''
                # print ("Read Command writebytes ", [hex(x) for x in writebytes])
                if(i2c_time_delay_enable): 
                    time.sleep(i2c_time_delay)
                i2c.write(writebytes) 
                readbytes = i2c.read(readbytecount)
                return readbytes
    
            # ##### ##### Initialization for I2C ##### #####
            # register the Read/Write Command in the Python library
            DLPC343X_XPR4init(ReadCommand, WriteCommand)
            i2c.initialize()
            if(gpio_init_enable): 
                InitGPIO()
            # ##### ##### Command call(s) start here ##### #####  
    
    
    
            # ##### ##### Command call(s) end here ##### #####
            i2c.terminate()
    
    
    if __name__ == "__main__" : main()
    
    
    

  • Giribabu,

    The code you linked is from the Python Support Package for the DLPC3436 controller, which is used with the DLPDLCR230NP EVM (A 0.23" 1080p chipset).

    The EVM you are working with is the DLPDLCR4710 EVM (A 0.47" 1080p chipset) which uses the DLPC3439 controller.

    The code above will not work with the DLP4710 EVM, as it is configured differently and has different I2C commands. You can compare the programmer's guides for the DLPC3439 and DLPC3436 below:

    DLPC3439 Programmer's Guide: https://www.ti.com/lit/pdf/dlpu035

    DLPC3436 Programmer's Guide: https://www.ti.com/lit/pdf/dlpu078 

    If you want to develop code specifically for the DLP4710 EVM, I recommend you start with the DLPC-API library as a base, which is made to work with any of the 343x-based chipsets:

    https://www.ti.com/tool/DLPC-API

    I hope this helps.


    Regards,

    Philippe Dollo