Hello,
PA and PB can only be writen as a group. Therefore, they all have to be configured as input or they all have to be configured as output. The functions you would use to configure the ports are:
iStatus = DIG_Prt_Config(iDevice, iPort, iMode, iDir);
And the following to read a port:
iStatus = DIG_In_Prt(iDevice, iPort, &iPattern);
Just make sure you do all of your configuration first. I hope that answers your question. Let me know if you have another question.
Ron