Announcement

Collapse
No announcement yet.

Expandable memory?

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

  • MuriloNishiyama
    started a topic Expandable memory?

    Expandable memory?

    I am using a SK-4Duino-24 for a big project.
    My program memory it is already in 95% of usage, and I am not finished yet.
    There is any way to improve the program memory? And the dinamic memory?

  • michael_4D
    replied
    Hello,

    Apologies for the extended delay.

    Have you checked the Big Demo example project under C:\Users\Public\Documents\4D Labs\Picaso Serial\Arduino\Picaso_Serial_4DLib\Examples\BigDemo ?

    In that sample program, this syntax was used

    Code:
    parms[0] = h1 ;                  // prompt string
      parms[1] = h2 ;                  // result string
      parms[2] = 20 ;
      parms[3] = 1 ;                   // 1 = save screen, 0 = don't save screen
      Display.TimeLimit4D = 5000000 ;
     
      i = Display.file_CallFunction(handle, 4, parms) ;
    I hope this helps.

    Best regards,

    Leave a comment:


  • MuriloNishiyama
    replied
    So I tried to use the file_CallFunction. But I think it is bugged

    Code:
    Display.file_CallFunction(handle,ArgCount,Args0,...,Argsn);
    But the only way the Workshop4 IDE compiles that code is using only one argument. When I put ArgCount = 2:

    Code:
    Display.file_CallFunction(handle,2,Arg1,Arg2);
    Generates this error:

    Code:
    Gama:196:46: error: no matching function for call to 'Picaso_Serial_4DLib::file_CallFunction(word&, int, int, int)'
    No matter what number I put in ArgCount, only one argument it's allowed.

    Help??

    Leave a comment:


  • MuriloNishiyama
    replied
    Can you indicate some examples for me? I am having some doubts about the .4fn file format.

    Leave a comment:


  • pauleilio
    replied
    Hi,

    One way that you can offload some parts of the 4Duino code to the Picaso is to make functions .4fn files for the picaso which can contain many grouped commands into one serial call. The Loadfunction and Callfunction are explained on page 119 of the datasheet https://www.4dsystems.com.au/product...nual_R_2_0.pdf

    For example if you wanted to place a char in a specific location and specfy the color of the character the were would be quite a few commands for that action and also serial commands which take time. Using the call function command, all this could be grouped into one function that was loaded at boot time. You could do the same with the above touch commands and customize how you would like to. Widgets could be done in a similar manner where the call function has 2 parameters only to do the task of img_SetWord and Img_Show, one parametr being the widget no the other parameter being the frame.

    I hope this helps

    Best regards

    Paul

    Leave a comment:


  • MuriloNishiyama
    replied
    To maximize the usage of the PICASO chip, you can restructure your code in such a way that the graphics and Touch detecion routines are handled solely by the Picaso chip.
    How can I do that?

    I am using the graphics code that Workshop4 provides, and the Touch detection it's like that:

    Code:
    bState = Display.touch_Get(TOUCH_STATUS);
         n = Display.img_Touched(hndl,-1) ;
          if((bState == TOUCH_PRESSED) || (bState == TOUCH_MOVING))                       
      {
              wX = Display.touch_Get(TOUCH_GETX);
        wY = Display.touch_Get(TOUCH_GETY);
            if(n == iWinbutton13)
    //Etc...
    {

    Leave a comment:


  • michael_4D
    replied
    Hello,

    Perhaps it would be better to restructure your code so it takes up less space.

    You may find these links to be useful:

    How to expand program memory on an arduino?
    https://arduino.stackexchange.com/qu...-on-an-arduino

    What can I do if I run out of Flash memory or SRAM?
    https://arduino.stackexchange.com/qu...memory-or-sram

    To maximize the usage of the PICASO chip, you can restructure your code in such a way that the graphics and Touch detecion routines are handled solely by the Picaso chip.

    I hope this helps.

    Best regards,

    Leave a comment:

Working...
X