Announcement

Collapse
No announcement yet.

How to get custom application and serial connection work together

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to get custom application and serial connection work together

    Hello,
    I get one of your product - gen4-uLCD-24DT display.
    Now I want to embed it to one of our project to display some system information build on a Linux SOM.
    The display module is connected to the serial port of the SOM.
    It is take about 30 sec for our system to start up. My target is to display our logo as soon as the display get power and after
    the Linux started I want to control the display through serial line to display some info.
    So I've created the following code in Workshop4:


    Code:
    #platform "Gen4-uLCD-24D"
    #inherit "4DGL_16bitColours.fnc"
    
    func main()
        var img_handle;
        gfx_ScreenMode(PORTRAIT); // change manually if orientation change
        file_Mount();
        img_handle := file_LoadImageControl("Logo.dat", "Logo.gci", 1);
        img_Show(img_handle, 0);
        repeat
        forever                     // this as well
    
    endfunc
    The logo images were prepared using one of Workshop4 utility and uploaded to the SD card.
    then I try to communicate with the display using Serial Commander and it's turned out that it doesn't respond. The simple gfx_Cls cause to timeout error.
    Ok, I've uploaded then the default application (?) using SPE Load button and after that the serial connection became to work.

    What did I wrong? Does it mean that user application and serial connection couldn't work together?
    The default application (SPE?) shows some info that I don't want the users will see but out logo instead.
    How can I do that?
    Last edited by usser; 15th May 2019, 10:33 PM.

  • #2
    Hi,
    Welcome to the forum!

    What did I wrong? Does it mean that user application and serial connection couldn't work together?
    As you may already know, Workshop4 includes four development environments for the user to choose based on application requirements or even user skill.
    The Serial Commander is used for Serial Environment. Are you using ViSi Environment for your project? Then this will not work.
    Both environments can be used on your project still, it will depend on how you want to implement it.

    The default application (SPE?) shows some info that I don't want the users will see but out logo instead.
    If you want to change the splash screen, you can refer to this forum thread: https://forum.4dsystems.com.au/node/38422
    It is for the Goldelox but you can still search the file for your displays in the same folder if you want to change it this way.

    For more information about certain topics, kindly check our application notes located at 4D Systems website

    Best regards,
    Kevin


    Comment


    • #3
      Thanks for the response, Kevin.
      Ok, I've opened "Create a new 4D system project" -> "Gen4-uLCD 24DT" -> "Next" -> "Serial".
      The new text editor opened. I have "Serial commander" in "Tools" and I can communicate with the device but I still don't understand how can I write an application.
      No "Compile", "Upload" or whatever. What the text editor is for?
      So I still don't understand how can I have custom application and serial communication work together.

      Comment


      • #4
        Hello,

        In Serial Environment, the display is set as slave and the programming is done in the host (microcontroller).

        We have different libraries available to help our users communicate through the Serial Environment.
        You can check these libraries on GitHub.

        I will recommend you to look for application notes on topics about 'Serial environment'
        https://www.4dsystems.com.au/appnotes

        Best Regards,
        Kevin
        Last edited by John Kevin; 20th May 2019, 11:35 AM.

        Comment

        Working...
        X