Quote Originally Posted by Joe S. View Post
OK, so he is using PortB as inputs, so assuming only 1 leg is triggered at a time then PORTB.0 = 1 then PORTB = 1, PORTB.1 = 1 then PORTB = 2, PORTB.2 = 1 then PORTB = 4 . . . a lookup table could be used to assign whatever point value he wants.
Code:
Index = PortB

Lookup2 Index,[100,200,300,400,500], pin
PORTA, actually.
And more than one pin at a time may be triggered.
There is no such thing as SWITCH (C language)?