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.

DLPLCR4500EVM: How to start automatically in pattern sequence mode with Video port input

Part Number: DLPLCR4500EVM
Other Parts Discussed in Thread: DLPC350

Hi,

I'd like to use the LightCrafter 4500 EVM to stream 8bits pattern while being pixel accurate. As far as I understood the user guides and datasheets, it is impossible to bypass the image processing in Video mode so I'm trying to use the pattern sequence mode. Everything is working as expected the only issue is that the sequence is not automatically starting after powering up the EVM. Sending a "play" command through USB is necessary. I'd like to have the sequence starting automatically without sending a "start" command, but this seems to be a "known limitation" as explain in this thread regarding the same issue:"How to start sequence automatically after boot"

So my question is :

As I don't want to connect the EVM with USB, would it be possible to use GPIO on the board to send the starting command via I2C once the device is properly initialized ? With such a solution I would only have to connect some GPIO to the I2C connector.

  • Hi Josselin,
    With Video Port input the first requirement is that the source must be detected and reconfigured, for this DLPC350 controller runs through source detection and configuration function this function executed in Video Mode ONLY; previously we supported this feature in Pattern Sequence mode but source detection functionality takes several 100s of ms before re-lock when the source frames dropped, which is not desirable.

    Regarding your question:
    yes, of course, you should be able to send command via I2C; just familiarize yourself with the I2C read/write protocol which is described in the DLPC350 programmer's guide.

    Regards,
    Sanjeev
  • Hi Sanjeev,
    Thank you for your aswer. If I understood correctly, you are advising me to configure the DLPC350 to start in Video mode so that detection and reconfiguration of the source is properly executed then switch to pattern sequence mode with video input using usb or I2C command right ?

    I already started to look into the I2C protocol, and If I'm not mistaken I should send the following commands to switch in Pattern sequence mode:
    0x69 0x01 -> pattern mode
    0x6F 0x00 -> video input
    0x75 0x00 0x01 0x01 0x00 -> 1 pattern will be repeated
    0x70 0x00 -> Trig mode 0
    0x66 0x208d 0x208d -> 8334 µs frame rate and exposure
    -> here I'm not sure how to set-up the sequence (I want my pattern to be the 8bit green channel of video input)
    0x7D 0x00 -> Validate - read and check flags
    0x65 0x02 -> Start

    I am still wondering If I can use GPIOs of the DLPC350 to send these commands. For example programming a GPIO (+GPIO clock) to produce the command sequence described above and directly connect this to I2C0 input, so that DLPC350 will "configure itself". Does it make sense ? Or should I use an external device to send the commands (I2C or USB) ?

    Regards,
    Josselin
  • Josselin,

    Regarding GPIO you meant like I2C bit-banging? You can try but it will be really very slow, best option to use I2C or USB, for I2C please note, I2C_PORT1 is the slave port, I2C_PORT0 is configured as master and it will be used by DLPC350 to communicate with peripherals.

    Please note for the register write operation you must set msb bit = '1'; the command sequence can be as follows -

    # Write: Set Display Mode to pattern display
    W 0x34 0x69|0x80 0x01

    # Write: Stop Sequence display if it is running
    W 0x34 0x65|0x80 0x00

    # Write: Set Pattern display mode source to RGB
    W 0x34 0x6F|0x80 0x00

    # Write: Set number of patterns 1-patterns, repeat, trigger_out_2 after 3, DON'T CARE
    W 0x34 0x75|0x80 0x00 0x01 0x00 0x00

    # Write: Set pattern trigger mode - 0
    W 0x34 0x70|0x80 0x00

    # Write: Exposure time <lsb first>
    W 0x34 0x66|0x80 0x80 0x2D 0x00 0x00 0x80 0x2D 0x00 0x00

    # Write: Setup Pat LUT
    W 0x34 0x77|0x80 0x02

    # Write: Pat LUT offset
    W 0x34 0x76|0x80 0x00

    # Write: Fill Pat LUT data, refer table 2-68 in programmer's guide
    W 0x34 0x78|0x80 0x01 0x78 0x04

    # Write: close mailbox
    W 0x34 0x77|0x80 0x00

    # Write: Validate LUT
    W 0x34 0x7D|0x80 0x00

    #add delay for validation completion or poll for status

    # Write: Start pattern sequence
    W 0x34 0x65|0x80 0x02

    Regards,

    Sanjeev

  • Hi Sanjeev,

    Thanks again for taking the time to look into my issue.
    Regarding the GPIO, I was indeed considering bit banging even if it will be slow, I take note that this is clearly not the best option. Thank for the precision concerning I2C_PORT0/1 being master/slave, I was indeed trying to use I2C_PORT0 as a slave input...

    Thank you also for the command sequence. I will give it a try and let you know but I think that, for now, I have sufficient information to work.

    Best regards,

    Josselin