16F1827 table not behaving as expected


Results 1 to 19 of 19

Threaded View

  1. #9


    Did you find this post helpful? Yes | No

    Default Re: 16F1827 table not behaving as expected

    Hi Mark,
    Those error messages are okay.

    If I am reading your code correctly you are not off setting the index value. Each lookup2 table has a possible index address of 0 - 85. In your case you need to offset each table by 64

    Something like this

    If index > 64 then table2
    if index > 128 then table3
    if index > 192 then table4

    Table1: 'No offset

    Lookup2 index[1-64]var
    return

    Table2:

    Index = index -64 'offset
    Lookup2 index[65 -128]var
    return

    Table3:

    Index = index -128 'offset
    Lookup2 index[129-192]var
    return

    Table4:

    Index = index -192 'offset
    Lookup2 index[193-256]var
    return
    Last edited by mark_s; - 2nd April 2011 at 20:15. Reason: bad math

Members who have read this thread : 0

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