DLPD4X00KIT: Problem upload image to DMD and reset using D4100_usb.dll
Part Number: DLPD4X00KIT
I am trying to control the Discovery 4100 from LabView via the D4100_usb.dll. I have a similar problem to one mentioned before.
If I simply use my LabView VIs then I get no control and strange results (e.g. if I write a number to SetPatternSelect I don't read back the same number with GetPatternSelect). However, if I first run the Discovery 4100 Explorer and then my LabView, it works fine.
According to the Explorer, I have the following versions:
Software Version: 2.0
OCX Version 1.2
DLL Version 2.1
USB Driver Version 18.104.22.168
USB Firmware Version 2.0
APPSFPGA Code Version: 13.3.2
Any advice would be greatly appreciated.
Welcome to the DLP section of the TI-E2E forums.
I suspect that running the Explorer creates the handle to the board or that the GUI puts it into the mode that the Patterns can be controlled from the GUI. I believe by default that the system comes up automatically running the patterns.
Are you able to talk via Labview to the EVM at all or is it just the patterns that are behaving strangely?
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Fizix:
Thank you for the quick response. I have not yet tried to upload an image to the FPGA, just trying the basic Set and Get functions.
I found that if I don't use the Explorer, the Get functions return garbage. (I have no way of knowing if the Set functions are working).
GetNumDev works properly. I get 0 if D4100 is unplugged and 1 if it is plugged in.
GetFirmwareRev always returns 512.
If I don't start Explorer, then calls, such as GetDMDType or GetPatternSelect return a different seemingly random number each time I call.
If I start the Explorer, then the functions return reasonable (and consistent) values. Also, then I can set values and read the correct setting back.
Is there some function call I need to make to initialize the system?
In reply to Albrecht Jander:
One other oddity.
When I do GetDMDTYPE after running the Explorer, it returns a 3. According to the documentation, the allowed values are 0,1,or 7.
The Explorer also shows the DMD Type as 0.55 XGA [X].
This was an older DMD type that was supported, but is no longer made or documented. What DMD do you actually have attached?
Hello again Albrecht,
I just realized that I assumed you are using the DLPR410A (i.e. the latest version of the PROM) and the matching kit since the reported software version you listed is 2.0 and the APPSFPGA Code version is 13.3.2.
Is this correct? I am trying to determine what the GUI is doing that the Labview code is not.
Is it just a matter of opening the GUI and then closing it, or does it have to be running in the background?
Also, I looked back over some very old LabView code I had for the earlier version (DLPR410) and noticed that for the function, the DevNum_in is "0" and works without calling the GUI or having opened it at any point first. Now it does require that the D4100_usb.dll file be in the same directory as the Labview vi (or executable).
To be honest, I don't know exactly what I have. I inherited the system from a colleague who has retired.
The markings on the DLP are:
The driver board is marked:
DLP Discovery 4100 with a sticker: T41-2610-0161
Here is some things I tried:
DLP4100 not connected to system.
GetNumDev in LabView returns 0 [good]
Connect DLP4100 and turn on.
GetNumDev in LabView returns 1 [good]
GetFPGARev(0) in LabView returns garbage [bad]
GetPatternSelect(0) in LabView returns garbage [bad]
SetPatternSelect(0,2) returns 1 [good]
then GetPatternSelect(0) returns garbage [bad]
Start "DLP Discovery 4100 Explorer" program, exit immediately without doing anything.
then GetPatternSelect(0) returns 2 [good]
All other functions seem to work as expected.
Turn DLP 4100 board off and back on.
So, it seems like just starting up the Discovery program initializes something on the DLP4100 board.
If I unplug the DLP4100 board from the USB and reconnect (without shutting off power to the board) it still works.
I hope that sheds some light.
I believe you are using the older board, which explains the behavior. The older board had to have a different bit file loaded into the APPS_FPGA before it will talk to the GUI (or API) over USB properly.
This is easy enough to test in the following way:
Once the FPGA has been programmed it should communicate with the GUI (or API) until it is reprogrammed. This loaded version of the USB aware FPGA code does not have built in patterns. Even if you load the newer APPS_FPGA code, it expects the DLPR410A code to be present in the DLPC410.
This should answer your issue.
Please do one more favor and look at the board and see if there are any labels/paint dot markings on the DLPR410 (see the magenta rectangle in this illustration):
Thank you very much. This solves my problem.
Just to summarize for the benefit of others:
PROBLEM: FPGA code stored in PROM on older version of Discovery 4100 board is incompatible with D4100_usb.dll library.
SOLUTION: Use program_FPGA function of the dll to load D4100_GUI_FPGA.bin (found in install dirctory of Discovery Explorere GUI program) in to the FPGA. All dll library calls now appear to function normally.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.