My Head Hurts with Tables, Lookup, EXT etc etc


Closed Thread
Results 1 to 2 of 2
  1. #1

    Default My Head Hurts with Tables, Lookup, EXT etc etc

    After some general guidance and ideas here.

    I have a program which uses 255 parameters as an index to a table.

    These parameters need to lead me to an address in a table which is made up of 3 hex bytes and a 3 character string.

    Something like

    0 = $12,$34,$44,"VOL"
    1 = $22,$F4,$40,"AMP"
    2 = $01,$57,$13,"SOC"


    Each of the 255 parameters has a different set of values.

    I would like a big list/table/memory area with all my data in it but i'm very confused about which is best to use. Lookup, Lookup2, EXT, Eeprom :?

    I'm working with a 18F2620 Pic and Pbp 3.01

    Thanks Peter

  2. #2
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: My Head Hurts with Tables, Lookup, EXT etc etc

    Peter, I would use eeprom.

    Just load all your hex values with

    EEPROM 0,[$12,$34,$44,$22,$F4,$40,$01,$57,$13,.............]

    Then to load the value into a byte variable use read instruction.

    READ index * 3 , byte_value

    Cheers


    Al.
    All progress began with an idea

Members who have read this thread : 1

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