Gday Peter
I posted re this problem on 1/3/2004 and again on 6/3/2004 "Accessing Ports"
You cannot swap the symbol reference to a port programatically, but you can reference a port using array techniques.
Melanie did a write up on this after my initial enquiries, but it appears to have disappeared. It didnt work in some circumstances, but would work for what you are doing. Ie simple port access.
Also, with this technique, you can reference between portsCode:chip = porta.1 X = 0 if porta.4 = 0 then let X = 0 if porta.5 = 0 then let X = 1 if porta.6 = 0 then let X = 2 high chip[X]
ie
AndrewCode:MyPort = Porta.0 ... MyPort[X] where X = 0..7 gives PortA X = 8..15 gives PortB etc X = 16..23 gives PortC




Bookmarks