Hi,
You are asking it to use PortA.2 as the clock output during the SHIFTIN
Code:
ShiftIn PORTA.3, PORTA.2, 0, [W\16]
See, PortA.3 is the data input, PortA.2 is the clock output, so it has to change from input to output or the SHIFTIN wouldn't work.

You can't use SHIFTIN to move data from an external device where that device provides the clock. With SHIFTIN the PIC provides the clock the external device.

/Henrik.