I don't mean to be rude or to offend anyone but do you actually read and/or try any of the solutions you are provided with - for free - here or is the purpose of your post simply to vent your ideas on how you EXPECT expect everytning to work and then continue doing it "your way"?
Several times now you've been shown the correct syntax to access any pin using an offset and it's (for example, using PortA.0 as the "base address") PortA.0[offset] and yet you ask if PORTA+A will work, I'm sorry but I don't get it. And to be perfectly clear, no, PORTA+A will not do what you want.
So in your example:
Code:
FOR A=1 to 20
HIGH PORTA.0[A]
NEXT
I would not use HIGH though but instead PORTA.0[A] = 1 since that will produce smaller and faster code and it will work provided TRIS are cleared for the pins in question.
/Henrik.
Bookmarks