Lookup Tables


Closed Thread
Results 1 to 8 of 8

Thread: Lookup Tables

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    A correction to my not so good example
    Code:
    'Lets say 
    TXI = 0
    GOSUB D_INDEX
    ' Now TXIU will hold the value 2500
    " If Index is zero, Var is set to the first Value."

    Would it be faster and take up less code if I placed the table inside of an eeprom.
    Faster-- No, it takes time to read the EEPROM. Less code-- Probably yes.

    If I am reading a temp of 70.8 is it possible to store that in a 1 byte memory location.
    Not that I can think of.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Storing 1024 WORD values in LOOKUP2 statements would take over 8K words of program space.

    But using the technique described here ... http://www.picbasic.co.uk/forum/show...php?t=3891#LAB
    You can do it with just over 1K.

    Faster, smaller, no external parts.
    DT

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