I am having a very strange problem with the Microchip MCP23S08.
It seems no matter what I do, bit #6, GP6 is ALWAYS an input.
I send 0 to the IODIR register to make all 8 bits to be outputs.
I can output to any output except GP6.

X1 VAR BYTE
MCPWRT = $40
MCPREAD = $41

MCP23S08_IODIR = 0
SHIFTOUT SDO2, SCK2, MSBFIRST, [MCPWRT,MCP23S08_IODIR,0]

if I read back the IODIR register
SHIFTOUT SDO2, SCK2, MSBFIRST, [MCPREAD,MCP23S08_IODIR]
SHIFTIN SDI2, SCK2, MSBPRE, [X1]

X1 always comes back and hex 40 indication GP6 is an input

Help!