In your first example...
Myword Var word
Myword.0=PortA.3
Myword.1=PortB.7
...
Myword.15=PortC.4
...you transfer the contents of the Port Pins into your variable.
Newdata = 1234
Myword = Newdata
Now the above two lines stuffs Myword with the contents of Newdata ie 1234.
If now you want that to appear on the Port Pins, you have to do the reverse of what you originally did... ie...
PortA.3=Myword.0
PortB.7=Myword.1
...
PortC.4=Myword.15
Remember Myword is a RAM variable, not a Port alias.
Bookmarks