bit indexing
inx var byte [in pbp a bit index cannot exceed 255]
PORTB.0[inx]
if inx = 5 then it references portb.5
if inx = 7 then it references portb.7
bit indexing
inx var byte [in pbp a bit index cannot exceed 255]
PORTB.0[inx]
if inx = 5 then it references portb.5
if inx = 7 then it references portb.7
Warning I'm not a teacher
Won't do what you want. use_pin will be be assigned the value of PortB.5 (1 or 0), you can't change aliases at runtime.Code:If index = 1 then use_pin = portB.5
Do it the way Richard shows.
/Henrik.
Bookmarks