Thanks dave for the answer, tried the code, compiled it without errors but the bit does not change in the pic as in the longer version.

is it possible I need to put some brackets or quotes?
PortA.0([PIN]="1")