Announcement

Collapse
No announcement yet.

Flash saving Help

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

  • Flash saving Help

    Hi to all.
    I'm starting to use a gen4-uLCD-24DT display for develope a compact application with some I/O using only the LCD (Diablo) w/o Arduino or other logics.
    I'm going to develope the project in ViSi, but I'm in trouble to handle Flash as non volatile storage (as the Arduino EEPROM) for saving some settings.

    Basically, I need to read, write and modify some integer numbers stored in Flash.
    Is there a simple function to do this just as EEPROM.read, EEPROM.write or EEPROM.update in the Arduino world?

  • #2
    Check out the flash bank memory functions.
    flash_WriteBlock and flash_Copy should do exactly what you're looking for.

    Comment


    • #3
      Hi,

      Welcome to the forum

      You will find the flash functions on page 212 of this datasheet https://www.4dsystems.com.au/product...ions_R_2_0.pdf

      You could write to a block using code like this. The buffer could be text or an array of numbers.

      var buffer[100] := "4D Labs Semiconductors";
      var status;
      if (status := flash_WriteBlock(buffer, FLASHBANK_2, 0))
      print("Successfully written to bank");
      endif

      You could then read from flash using

      var byte_val;
      byte_val := flash_GetByte(FLASHBANK_2, 0);

      Best regards

      Paul

      Comment


      • #4

        Thank you for the help.
        I'll try

        Comment

        Working...
        X