Hi, I am Lihong.
I am working on displaying multiple pre-stored patterns in sequence using MATLAB.
My skeletal code is based on the following code which is open-sourced in GitHub:
https://github.com/deichrenner/DMDConnect
Using this code, I followed the DLPC900 Programmer's Guide to display, for example, [0, 3, 6, 9]th saved patterns in 3 bits.
I matched the pattern index and bit position as in TI DLP GUI batch builder.
But it does not work; DMD stops functioning until I turn it on again.
Is there anyone who can aid my troubleshooting?
Best,
Lihong
_________________________
My MATLAB code
clc;pack;clear;
d = DMD_LH('debug', 1);
% d.reset()
% Step 1: Set pre-stored pattern mode
d.setMode(1)
%% 1. Continuous normal illumination
clc;
% Step 2: Turn off the previous DMD illumination
d.patternControl(0)
% Step 3: Number of patterns to be illuminated
% d.numOfImages(1,0)
% Step 3: Define patterns
settings=zeros(10,1);
for ii=1:4
idx = 0; % pattern index
exposureTime = 100000; % exposure time in us
clearAfter = 1; % clear pattern after exposure
bitDepth = 3; % desired bit depth (1 corresponds to bitdepth of 1)
leds = 1; % select which color to use
triggerIn = 0; % wait for trigger or cuntinue
darkTime = 105; % dark time after exposure in us
triggerOut = 0; % use trigger2 as output; 0: on, 1: off
settings(1) = ii-1;
settings(2) = exposureTime;
settings(3) = clearAfter;
settings(4) = bitDepth;
settings(5) = leds;
settings(6) = triggerIn;
settings(7) = darkTime;
settings(8) = triggerOut;
[patternidx, bitPosition] = calcImageIdx((ii-1)*3, bitDepth);
settings(9) = patternidx;
settings(10) = bitPosition;
d.definePattern(settings) % I modified definePattern so that I can plug in my preferential variables of DMD display parameters.
end
d.numOfImages(10,0)
d.numOfImages(10,0)
% Step 5: Start illumination
d.patternControl(2)