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.

Questions to GUI Composer

I want to creat my own GUI and i have some questions!

I what to implement a SPI communication and i want to print the values of my receiveregister in a hexdecimal in a TextBox. How should i do this? Is the a command in GUI to cast the decimal value in a hexadecimal value?

I want to log my result Point from my Graph in a txt file with the time stamps? 

Should i Programm this stuff with Javascript or a there other possibilities?

Thanks for help.  

  • Hi Christian,

    We only support UART protocl through USB and JTag protocol for GUI Composer. How do you communicate to the host PC using SPI?

    Regards,
    Patrick

  • Hi Patrick,

    1) i am using the USB protoco between MCU and the GUI Composer and i have a SPI between my mcu and a FPGA. Now i want to Show the values of the Receive Register on the GUI. But i could Display only the decimal value. Is there a way to cast the decimal value in a hexadecimal value on the GUI-Programming or should i calculat this with JavaScript.

    I hope you are understanding my Problem.

    Another Questions:

    2)Is there a way to get more widgets for the Gui or creat your own widgets? Could you give me a tip?

    3) I want to use a Combobox to Choose what Register i want to read with the spi how could i Programm this? I thinking about to Programm this in Javascript with a if-statment and the a will save the Register address in the variabel of the mcu. Is this possible?

    Thank you for help

     

    Regards,

    Christian

  • Hi Christian,

    Re 1) You can use the pre and post functions to convert decimal to hex, you will need to do this inside of these two functions with javascript.

    Re 2) Yes it is possible, but it is private and not documented. But if you want to provide your own widget, you can follow this example.

    Create a html element in your html page and give it an id 'widgetId'.

    This is the javascript that connects to the html markup:

    var proxy = {
        get: function(property) {return null;},
        set: function(property, value) {
            try {
                var myWidget= document.getElementById('widgetId');
                widget.style.display = 'none';
            } catch (err) {}
        },
        watch: function(property, listener) {},
    };
    $TI.guiComposerServer.registerWidget(proxy, 'widgetId');
    $TI.guiComposerServer.addBinding('widgetId', 'value', 'true', null);

    Re 3) Use the select widget, you should be able to provide both the display labels and the values that is associate with each label. See the widget properties page in the designer.

    Patrick

  • Hello again,

    thank you for your answer. But i have more Problems with the implementation of the widgets and the binding. Is there a document for the binding of any widgets? The ti-wiki documentation is not very usefull.

    I will use a tab Container to use different functions in my code. A variable should changed when i am clicking on one of These Tabs. What should i write in the field "Selected Tab Index"? How could i bind the glaobal variable of my ccs-Source code.

    Chris

     

  • Hi Chris,

    It looks like a bug to me. I have file a defect into our tracking system, here is the CQ# SDSCM00051162.

    Patrick

  • How long will it  approximately take to fix the bug?

  • It will be fix in the next CCS release, sometime next year.

    You can patch your local copy to have the fix if you like. Modify this file, ccsv6/eclipse/plugins/davinci.gc_1_5_latest/WebContent/gc/dijit/TabContainer.js

    comment out the defineSetter and the defineGetter lines in the constructor. and replace the startup function with this function,

    startup:function(){
    var _this = this;
    this.inherited(arguments);
    this._setModelBinding();
    this.watch("selectedChildWidget",function(){
    this._setModelBinding();
    _this._set('index', _this._getIndexAttr());
    });
    },

  • Hi Patrick,

    i having Problems with Display hex on the gui. I have a TextBox and i type a hexadecimal number in it and press enter. The number which is displayed changes in a decimal number.

    For my applicationen i Need to Display the hexnumber after i press enter. How could i Change this?

    I have also textboxes which are only read configuired and i want to Display the hexnumbers from my eprom on the Display. I think that is nearly the same Problem.

    I hope you could give me a tip to Change this.

     

    Regards Christian

  • Christian,

    You can set the variable to be displayed in Hex by setting the Format of the specific binding.
    Please see this wiki page: http://processors.wiki.ti.com/index.php/GUI_Composer/Formatting

  • Hello,

     

    i want to display the variable as a ASCII Sign. How could i do this. Is there a possiblility like the formating in Hex? Thanks for answer.