
Originally Posted by
Tabsoft
I may be wrong but I don't think this will work.
LOOKDOWN2 Search,{Test}[Value{,Value...}],Var
Lookdown2 compares the value of Search with the values in the list from left to right (index values 0 up to 255) with the "Test" comparison.
So if Search = 5 and Test = "=>" then using your values for the Value in the list, the logic tests should look like this.
(Values: 0, 1, 2, 4, 8, 16, 32, 64, 128)
Test 1: is 5 => 0? : Yes, (0 will be stored in Var)
The testing would stop right here for every value of Search (0-255) for bytes (0-65535) for words.
Maybe I'm wrong?
As I see it, to use Lookdown2 you would still need to enter all the values from 0 to 255 inclusive into the list.
And
Lookdown2 supports up to 85 values in the list or up to 256 when using a PIC18.
No, I don't think that you are wrong. I think there is a minor change that needs to be done to Dave's code,
Code:
lookdown2 index, <= [%00000000,%00000001,%00000010,%00000100,%00001000,%00010000,%00100000,%01000000,%10000000,255],temp
Bookmarks