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.

DLP4500: Using GUI source code to display patterns

Part Number: DLP4500
Other Parts Discussed in Thread: DLPC350

Hello! I have several questions about using the source code to display patterns stored within my DLP4500's flash.  For my application I'd like to store 3 24-bit images with each image comprising 23 1-bit patterns (I don't want the last black frame).  If the images are called 1, 2, and 3, and the patterns are called a, b, c, ..., w, I'd like to display the patterns as follows and then repeat after the final one: 1a, 1b, 1c, ..., 1v, 1w, 2a, 2b, 2c, ..., 2v, 2w, 3a, 3b, 3c, ..., 3v, 3w.

  1. How do I select the image from which the pattern is displaying? Should I use the command DLPC350_SendImageLut?  
    1. If this is the correct command, should I send 3*23 addresses in the lutEntries argument & 3*23-1 numEntries? 
  2. Would the code (which I've adapted for this application from a different E2E forum answer, https://e2e.ti.com/support/dlp__mems_micro-electro-mechanical_systems/advanced_light_control/f/924/t/548864?Pattern-keeps-repeating-on-Lightcrafter-4500-EVM
#include "hidapi/hidapi.h"
#include "dlpc350_common.h"
#include "dlpc350_usb.h"
#include "dlpc350_api.h"
#include <chrono>
#include <thread>
#include <iostream>


int main(int argc, char *argv[]) {
    DLPC350_USB_Init();
    DLPC350_USB_Open();
    if (!DLPC350_USB_IsConnected()) {
        return -1;
    }

    DLPC350_SetMode(true);
    DLPC350_PatternDisplay(0);
    DLPC350_SetPatternDisplayMode(false);
    DLPC350_ClearPatLut();
    DLPC350_SetPatternTriggerMode(1);
    DLPC350_SetExposure_FramePeriod(900000,900000);

    const int numberOfPatterns = 23;
    const int numberofImages = 3;
    unsigned char imageIndices[numberOfPatterns];
    int countr = 0;
    for (int j = 0; j < numberofImages; j++) {
        for (int i = 0; i < numberOfPatterns; i++) {
          imageIndices[countr] = j;
          if (i == 23){
              DLPC350_AddToPatLut(0, i, 1, 7, false, false, false, false);
            } else {
              DLPC350_AddToPatLut(0, i, 1, 7, false, false, true, false);
            }
          countr ++;
        }
    }

    DLPC350_SendImageLut(imageIndices, countr);
    DLPC350_SendPatLut();
    DLPC350_SetPatternConfig(numberOfPatterns*numberofImages, 1, numberOfPatterns*numberofImages, numberOfPatterns*numberofImages);
    unsigned int status;
    DLPC350_ValidatePatLutData(&status);

    DLPC350_PatternDisplay(2);

}

Thank you!