Dear all,
I had a home made program to control the LCr that was working well. Then, I updated the DM365 firmware to the 3.31 version. The GUI provided by TI (v1.4) works well but my home made program has some problems. I can't set the pattern sequence. I'm now using the extended pattern definition (which commands are supposed to be 0x04 0x08). Has the "DM365 Command Interface Guide" been correctly updated after the DM365 upgrade? I read in an older post that the extented pattern definition should be defined using the commands 0x04 0x80... Do you have any information about the way to set properly the pattern sequence (commands and bit sequence)?
Thanks for your help
Jeremie
Hi Jeremie,
With v3.31 there is slight change in the pattern definition command setting. The DM365 Command Interface specification will be updated soon. We apologize for inconvenience caused.
Please do the following -
For both Pattern Sequence Setting (0x04 0x00) and Extended Pattern Sequence Setting (0x04 0x08) please ADD one dummy byte (it should be 0x00) add the end of command definition i.e., for command (0x04 0x00) add new byte BYTE #17 = 0x00 and for command (0x04 0x08) add new BYTE #19 = 0x00. Similarly while reading make sure you are reading ONE additional byte.
What is this additional BYTE?
It is meant for internal 'Hardware' pattern generation. You will find more details when the document is updated. For now you can ignore it by adding dummy 0x00.
Regards,
Sanjeev
That's working now, but please note that the Extended Pattern Sequence Setting is 0x04 0x80 (and not 0x04 0x08).
Similar changes have to be done in the provided sample code.
I added this line
LCR_CMD_PKT_PutInt(0x00,1);
after this command in LCR_CMD_SetPatternSeqSetting defined in lcr_cmd.c
LCR_CMD_PKT_PutInt(Setting->LEDSelect,1);
and also LCR_CMD_PKT_GetData(&data,1); after Setting->LEDSelect = data; in the LCR_CMD_GetPatternSeqSetting function
Now the demo code seems to be working for me.
Am I right with this patch ? is there something else to change with the new version of the firmware ?
Can you also provide a sample code for extended pattern sequence mode ?
Best regards,
Cédric
Hi Cedric,
Yes you are right with patch.
With respect to sample code, I think it is very straightforward, you can simply create two functions LCR_CMD_SetExtendedPatternSeqSetting & LCR_CMD_GetExtendedPatternSeqSetting, inside the function you can refer to existing PatternSeqSetting and make the changes. The byte definition described in http://www.ti.com/lit/ug/dlpu007c/dlpu007c.pdf for extended packet.
Let me know if you still face any issue.
Thank you for your fast reply.
I also tested the output trigger mode to check the actual frequency when using this pattern sequence mode and I have an issue here.
It seems that the actual frequency is depending on the number of images in the sequence.
I didn't test all the values but as far as I saw, when there is less (or equal) than 24 frames (1bit/frame) in the sequence, the output trigger is generated at 4kHz (and I assume the frame rate is the same).
for more images, depending on the number of frames, the actual frequency is either 2.597kHz (mostly for pair values) or 55.55Hz.
I precise that the only parameter modified here is the number of images in the sequence. Here is the set of parameter I used :
BitDepth : 1
Number of pattern : from 2 to 96
Inverted pattern : 0
Input Trigger Delay : 0
Input Trigger type : 1
Auto Trigger Period : 250 (us)
Exposure Time : 250 (us)
I also precise the parameters for trigger output mode :
outTrigSetting.Enable = 1;
outTrigSetting.Source = 0;
outTrigSetting.Polarity = 1;
outTrigSetting.Delay = 0;
outTrigSetting.PulseWidth = 5;
In conclusion I have a few questions :
Is it normal that 4kHz cannot be reach for all the numbers of frames in the sequence or did a do something wrong either in the pattern configuration or the trigger config ?
I don't understand the field "outTrigSetting.Source", can you explain what different sources can be chosen here?
With this config, one output trigger event is generated for each new frame, is there a simple way to get a unique event at the beginning of each sequence instead ?
Thank you for your replies.