How to read from single LOOKUP table into different variables?


Results 1 to 9 of 9

Threaded View

  1. #1
    Join Date
    Feb 2013
    Posts
    1,078

    Default How to read from single LOOKUP table into different variables?

    I'm making my own "library" for ST7920 display, which allows to display 18x4 lines of custom charset, in dimensions of 16x2 LCD display.
    Since there is no string variable support in PBP, I want to find a simple way to display different text labels with ease.
    For this, I want to use LOOKUP statement, something like this:

    LOOKUP A,["Hello!"],B

    Where "Hello" will be a string with length of 18 characters (full width of display) and there will be 4 of such strings (one per line)
    18*4=72 bytes, and as manual says, up to 255 bytes can be used, so this is OK. But there is another issue.
    Due to nature of ST7920, display update is done via "words" - 2 byte sequences, so I have to read data with lookup into 2 standalone variables.
    It would be great, if it was possible to do

    LOOKUP A,["Hello!"],B,C

    to get B and C loaded with appropriate values, but as I know, such statement is not supported.

    This means, that I have either to have that "hello" lookup table in code twice, and read even chars from one and odd - from another OR
    I have to introduce an intermediate array (which is again introduces memory limitation issues) and fill it with data and then send to display

    Any ideas?

    I don't want to use internal or external eeprom for storing text strings, because I want them to be editable right into code via keyboard, not via updating external firmware.
    Last edited by CuriousOne; - 10th October 2021 at 16:53.

Similar Threads

  1. How do you create a lookup table?
    By AlexanderWinnig in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th November 2010, 14:37
  2. Lookup table syntax.....
    By TerdRatchett in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th May 2009, 04:45
  3. Lookup table or Math?
    By ronjodu in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 2nd May 2008, 17:55
  4. Lookup Table
    By yasser hassani in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 11th March 2008, 10:38
  5. PIC 18F452 Table Pointer/ Table Read
    By sougata in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 14th March 2006, 03:07

Members who have read this thread : 2

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