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.

DLPC230-Q1: Is there a way to write a simple script that adjusts the dimming without using DLPC230 Control Program?

Part Number: DLPC230-Q1
Other Parts Discussed in Thread: DLP5531-Q1, DLP5530-Q1

Hi all,

When using DLPC230 Control Program, I could change dimming setting. My question is is there a way to write a simple script (like a python file or batch script file) that can adjust the dimming? The purpose is to control the dimming without having to install the program.

Thanks in advance,

June

  • Also, what are the scripts in the Scripts folder? How do I run those and what do they do..?

  • Hi June,

    Yes, it is possible to use any SPI based host controller to read/write registers, including the dimming related registers.

     The following DLPC230-Q1 datasheet sections provide the relevant SPI host requirements:

    • 6.16 Host/Diagnostic Port SPI Interface Timing Requirements
    • 8.3.4 Serial Flash Interface

    I recommend referring to the DLPC230-Q1 programmer's guide for light control applications (Rev. D) for a complete detailed guide on the host controller implementation and the available R/W registers. In your case of adjusting the dimming, you will need to use PWM Control - Write (47h). This command is used to control DLPC230-Q1 PWM duty cycles, which controls LED drive intensity --> brightness. Section 2.2.3 describes the PWM signals.

    If you are referring to the dimming functions of the dimming controller block which uses feedback from the photodiode, there are a different set of registers used. Can you confirm whether you are using DLPC230-Q1 with the DLP5531-Q1 or DLP5530-Q1 DMD? 

    The scripts are API commands exclusively compatible with Control Program. These API commands can often combine several register read/write commands. Here is short script example I use to reduce then increase brightness of LED channel 2 via the PWM control API command:

    # -*- coding: utf-8 -*-
    from dlpc230.commands import *
    import time
    
    ## DISPLAY
    WriteOperatingMode(OperatingMode.Display);
    
    time.sleep(5); # Sleep for 5 seconds
    
    for x in range(383,0,-10):#reduce brightness
        WritePwmControl(0,0,x); #3 to 0A
        time.sleep(0.05); #50ms delay 
        print(x);
        
    for x in range(0,383,10): #increase brightness
        WritePwmControl(0,0,x); #0 to 3A
        time.sleep(0.05); #50ms delay 
        print(x);
    
    ## STANDBY
    WriteOperatingMode(OperatingMode.Standby);

    You can run these Python scripts within Control Program, and the menu bar Help --> Help --> Scripting window explains and defines the input/output parameters of each available API command.