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.

Compiler/DLPNIRNANOEVM: Control of the DMD alone

Part Number: DLPNIRNANOEVM
Other Parts Discussed in Thread: DLPC150

Tool/software: TI C/C++ Compiler

We are trying to control the DMD alone, as we want to send self-generated patterns to the DMD. We were wondering if there is a possible solution for that, as I saw one or two forums talking about similar ideas.

I was also wondering if how could be access the source code provided for the Nano GUI software? Thank you for your help.

  • Hello User,

    Are you looking for the App software source code? This was discussed a bit on a previous thread here:

    https://e2e.ti.com/support/dlp/f/94/t/823029?DLPC150-NIRScan-Nano-APP-source-code

    We will investigate your inquiry to help you further as soon as possible.

    Regards,

    Philippe Dollo

  • No, so basically we want to control the dmd individually using a computer software, so we are asking for the nano GUI source code, if it is available. 

    Philippe Dollo said:

    Hello User,

    Are you looking for the App software source code? This was discussed a bit on a previous thread here:

    https://e2e.ti.com/support/dlp/f/94/t/823029?DLPC150-NIRScan-Nano-APP-source-code

    We will investigate your inquiry to help you further as soon as possible.

    Regards,

    Philippe Dollo

  • Hi Zhang, 


    Please look in the NIRScan Nano product page and download the NIRScan Nano GUI v2.1.0. The GUI source code is included with the same package. Kindly also note to achieve your target (loading self generated pattern to DMD) you may need to change the NIRScan EVM TIVA SW also. This source code project is also available on the same page, with DLP NIRscan Nano Reference Software v2.1.0 package.

  • Thank you for your quick reply. Could I also ask what you mean by 'change the NIRScan EVM TIVA SW'? So I should download 'DLP NIRscan Nano Reference Software v2.1.0' and start from there?

  • Hi Zhang,

    Yes, start with the reference software. Hirak means to say that you will need to make some alterations to the code in order to interact directly with the DMD. The code is usually meant to send commands to a controller, the DLPC150 (https://www.ti.com/product/DLPC150?keyMatch=DLPC150%20&tisearch=Search-EN-everything&usecase=GPN).

    Regards,

    Austin

  • Thank you for the info provided. I will check the solution and will get back to you for any possible follow-up inquiry.

  • Your are welcome.

    regards,

    Vivek

  • Thanks for your previous info. I have downloaded the reference software, and also the TI-RTOS for Tiva microcontrollers.

    After installation, I have access to a 'Sources' folder and some documentations in the NanoGUI folder, and some a 'tivac examples' folder, 'packages', 'resources' folder in the tirto_tivac folder. 

    Do you have any suggestions on where should be a good place to start with for my task? Thanks.

     

  • Hi Haoran,

    Chapter 2 of the User's Manual (https://www.ti.com/lit/ug/dlpu030g/dlpu030g.pdf?ts=1595974301979&ref_url=https%253A%252F%252Fwww.ti.com%252Ftool%252FDLPNIRNANOEVM) will get you started well.

    Feel free to let us know if you have any more questions.

    Regards,

    Austin

  • Thanks for the info. I have successfully downloaded and installed the Nano Reference Software, but have trouble understanding which part I should deal with first with the source code after installation. Chapter 2 seems to be only about installing.

  • Hi Haoran, 

    If you are planning to load your own patterns on the DMD, you need look at the scan workflow, specifically at the pattern generation mechanism. You need to bypass this mechanism, and also add some command to receive pattern data from external frontend instead. Once you are able to do this, the mechanism to load these patterns on to the DMD already exists in the code.

  • Thank you for the information. So I have also downloaded the DLP Spectrum Library: 2.0.3, where I am able to use CCS to access the source codes.

    Based on this, I have several questions.

    1. In the DLP spectrum library 2.0.3, I found several functions that might be helpful for my task, produced self-generated patterns and send it to the DMD.  I noticed there are several functions with the similar names. dlp_spec_scan_genPatterns() function in the dlpspec_scan.c file. I also noticed a dlpspec_scan_col_genPatterns() function in the dlp_spec_scan_col.c file. Could you explain the difference between these two functions, and any relations or connections?

    2. I am also a little confused about the relations between this DLP Spectrum Library and the DLP GUI. If I alter these functions of the source code in the DLP spectrum Library correctly, will it be updated in the GUI file? (Or how do I know that I have successfully altered the source code so that I know it is now linked to the nano EVM GUI)?

    3. In the function dlp_spec_scan_genPatterns in the dlpspec)scan.c file, I noticed there are 3 cases, column type hadamard type, and slew type. What would be the difference between each type, and how do I know which type I would be using if I wanted to generate my only DMD patterns, and send it to the DMD?

    Thank you.

  • Hi Haoran,

    We will look into these questions and get back to you with answers shortly.

    Regards,

    Austin

  • Hi Haoran,

    Thanks for your patience. Kindly find my comments WRT your questions below:

    1. These functions like dlpspec_scan_col_genPatterns() , dlp_spec_scan_genPatterns() etc are called in different circumstances depending on different scan configurations. You will need to more look into the code and understand the code in depth to understand how these functions are used.

    2. Your modifications on the spectrum library on TIVA SW will not automatically be reflected in the GUI. You will need to recompile your modified spectrum library and then add those compiled library with GUI and then recompile the GUI again using QT for these changes to be included in the GUI.

    3. Currently, none of those modes allow user patterns. You have to modify one of those modes to allow your own user patterns. I would suggest to go with column pattern mode, since the workflow is simpler in this case. If you are using fixed patterns, you can code them right into the FW. Else, you will need to implement a custom command to transfer your own custom patterns on to the TIVA in runtime. Also, kindly note the pattern bending mechanism that exists to bend/alter the patterns to nullify optical irregularities in the optical path. Depending on your application, you can choose to disable that too. 

  • Hi Hirak,

    Thank you for your information, it helped a lot. I am planning to use multiple patterns eventually, so I guess coding them right into the FW wouldn't be the best option.

    1. You said about implementing a custom command to transfer my own custom patterns on the TIVA in runtime. Could you give some suggestions on what would be a possible way for that? Would Labview be suitable for this,  could I just call the dll using Labview? 2. Also, if we overcame the problem in question 1 (either by Labview or anything you recommend), I wouldn't need to compile the code each time anymore, right?

    Thank you for your help.

  • Hi Haoran,

    We will look into your queries and get back to you soon.

    Regards,

    Mayank

  • Hi Haoran, 

    I don't think Labview is a good option to test your code in this case. If you have the NIRScan Nano EVM with you you can just create your own FW and download it using the GUI TIVA FW Update option. To send your image through the command USB Command protocol, you can make use of the existing NIRScan GUI Framework. Just modify the GUI code to include your new command and data. This way, the you can also make use of the usb command packet creation mechanism in the GUI and do not have to implement on your own.

  • Thank you for your help, but I think I still have some questions I need to confirm. Sorry for the trouble.

    1. 'you can just create your own FW and download it using the GUI TIVA FW Update option.' Are you referring to the 'TIVA Firmware option' on NIRscnNano GUI v1.1.9? How do I create my own FW? are you just referring to modifying the GUI source code?

    2.Just to confirm, you are suggesting I should work on the NIRScan GUI Framework first, but not the source code from the DLP Spectrum Library, or are they the same thing? Because previously I thought I had to modify the 'gen_column' code in the DLP Spectrum Library.

  • Hi Haoran,

    My colleague will respond more fully to your question, but I will weigh in question 1. 

    Yes, you can alter the source code and upload the firmware via the GUI.

    Regards,

    Austin

  • Hi Haoran,

    1. You can find the FW Source code on the NIRScan Nano page on the TI.com. It is not the same as GUI Source Code. You will need to modify this source, compile it using Code Composer Studio (Compilation procedure is provided on NIRScan Nano User Guide). After compilation, binary FW image will be created. You will need to upload this image using NIRScan Nano GUI TIVA FW Update option to test it on the device.

    Also, while modifying the code, you will need to be careful not to alter the FW such that it will be stuck/hang whenever it boots. If it hangs/gets stuck as soon as the device is powered up, you will not be able to download a new FW onto the device using GUI. In that case you will need a TI XDS110 debugger device to reprogram the correct FW onto the device.

    2. To test your framework, you will need to work on both GUI Source Code (to support sending new commands with your image data) and the NIRScan Nano FW Source code (To support receiving image data with this new command and write it onto the pattern streaming memory) . Also, you may not need to modify the DLP Spectrum Library code, just the FW Code modification should be enough. Basically the FW should skip calling 'gen_column' etc functions to generate patterns, and use the new image data received through commands for streaming onto the DLP Subsystem.

    Lastly, please work with NIRScan Nano FW v2.1.0 and GUI v2.1.0 as these are the latest released versions.