Hi,
Since it's on a bus external to the PIC itself you are NOT going to do things like GPB.2 = 1 to "get at" the output directly since the actual data needs to be transfered to the external chip using SHIFTOUT or the MSSP module or whatever. I suspect you know that but wanted to get it squared away just in case.

Since the port expander is on the SPI bus you're sending it one or more bytes. I'm guessing that one (or more) of those bytes reflects the desired state of the outputs on the expander. (Had you said which chip you're using I could've been more specific).

So if you have a byte called ChipOne then you can alias each bit as usual ChipOne.0 = 1 but then you obviously need to transfer ChipOne to chip one. If you had a timer interrupt sending the byte to the expander x timer per second then doing ChipOne.4 = 1 might be fast/transparent enough - I don't know.

/Henrik.