Effective ways for storing multiple string variables within PBP code?


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,644


    Did you find this post helpful? Yes | No

    Default Re: Effective ways for storing multiple string variables within PBP code?

    chip has to able to read its code space, pic18 needs different treatment


    there is a couple of typo's
    ;lang 2
    da "Jahr einstellen", 0 ;6+ 0
    da "Set Month" ;6+ 1
    da "Set Date", 0 ; 2
    da "Set day of week" ; 3
    da "Set Hour", 0 ; 4
    da "Set Minute", 0 ; 5
    ;lang 3 ;semi colon missing
    da "Definir l'annee" ; 12+ 0 ;extra comma
    da "Set Month" ; 12+ 1
    da "Set Date", 0 ; 2
    da "Set day of week" ; 3
    da "Set Hour", 0 ; 4
    da "Set Minute", 0 ; 5
    Last edited by richard; - 31st December 2021 at 10:46.
    Warning I'm not a teacher

  2. #2
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: Effective ways for storing multiple string variables within PBP code?

    No I'm not using 18F series.
    Regarding that "own code reading"
    how it is named in datasheet, so I can have a look for appropriate models?

  3. #3
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: Effective ways for storing multiple string variables within PBP code?

    You said that if the EEPROM were larger, you could easily store the strings there, then find them with a look-up index. Newer PICs have the ability to write directly to Flash (HEF is one example, but not the limit). The mechanics of it are essentially the same as writing to EEPROM. PBP has no convenient command code for it (that I'm aware of), as it didn't exist when PBP was created. However, look at some of the PIC16F1xxxx chips (or PIC18FxxK40/42). You can treat Flash memory like EEPROM memory. Be aware that with Flash you must first erase an entire page before writing to it. If you intend to change the content periodically, you'll need temporary variables to store the entire page, alter what you wish to change, erase the page, then re-write back to the same addresses with the revised data.

  4. #4
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: Effective ways for storing multiple string variables within PBP code?

    So I'm not asking for any direct-hardware-access methods. I just asked, whenever it is possible, using built-in abilities of PBP, structure all this in more simple to use way? Basically, I can hook a external EEPROM chip to my device, but I was not able to make to work any EEPROM with PBP, I2C or SPI.

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,644


    Did you find this post helpful? Yes | No

    Default Re: Effective ways for storing multiple string variables within PBP code?

    Regarding that "own code reading"
    how it is named in datasheet
    look for "read flash" or "read program flash", there is no consistency i have ever found in how microchip assemble datasheet info

    So I'm not asking for any direct-hardware-access methods. I just asked, whenever it is possible, using built-in abilities of PBP
    and it is , i "fancied up" my code a bit and can change language with one var

    Name:  Screenshot 2021-12-31 210708.jpg
Views: 420
Size:  220.8 KB

    mikes suggestion would be useful to allow a common set of string messages to read into hef in chosen language from a
    pg-flash coded larger multi-lingual data set.

    its all doable
    Warning I'm not a teacher

Similar Threads

  1. How about String Variables?
    By mytekcontrols in forum PBP Wish List
    Replies: 40
    Last Post: - 20th January 2015, 12:53
  2. Replies: 2
    Last Post: - 12th November 2014, 07:57
  3. Replies: 4
    Last Post: - 18th September 2014, 07:59
  4. PBP and storing variables
    By Charlie in forum FAQ - Frequently Asked Questions
    Replies: 1
    Last Post: - 28th January 2012, 11:10
  5. Ways to make code easily reviewable and extendable
    By Ted's in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 23rd August 2008, 00:10

Members who have read this thread : 5

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts