Menu

String space

Help
jackjames
2020-10-24
2020-10-24
  • jackjames

    jackjames - 2020-10-24

    I'm writing a program where the messages to the user are different, so I make extensive use of strings.
    The micro used is a PIC16F18857.
    This error is generated during compilation, I would like to understand how strings are stored to understand the cause of the error.
    Thank you.

     
  • Anobium

    Anobium - 2020-10-24

    Your selected chip has a page size of 2048. And, you have exceeded the page size. So, adapt your code to remove the error, or, you could use PROGWRITE and write a little string handler to write and read the strings.

     
  • jackjames

    jackjames - 2020-10-24

    Thank you so much for your prompt reply.
    In fact, given the difficulty, I am writing a routine and a program to use the eeprom located in the DS3231 to store and load 128 messages of max 256 bytes each.
    Now I'm writing the program that creates the binary file with the messages to be inserted in the eeprom and a listing with the index and the message text.
    It could also be done with a variable-length message but with a fixed-length message it makes life easier ...

     
  • Anobium

    Anobium - 2020-10-24

    I wrote a string lookup with index to the string years ago.

    So you could call like StringRecall( 1 ). Where the index recalled the string.


    I would recommend SRAM. A lot faster.

     
  • jackjames

    jackjames - 2020-10-24

    Thanks

     
  • Chris Roper

    Chris Roper - 2020-10-24

    Or NVRAM for the best of both.
    It appears as SRAM in run time but backs up to its own EEPROM if it detects a power failure.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.