sorry for the delay.
compiler: it will definitely not do the read/modify/write as 3 opcodes, that you would see in the assembly listing and the set0.io instruction is actually assembly already.
i agree you would wish that only one bit would be changed, but this not what i observe.
There is a simple test to do:
add a pull-up (or program a pull-up) on one bit on PA or PB (lets take the example here, PB0).
i want to use PB0 as 'open collector' output (actually for i2c ..)
So i do a set0.io PB,#0 - to set the bit to 0
after that, using PBC i can make the pin either '1' (due to the pullup) if i configure it as input, or '0' if i configure it as output in PBC.
then, while the bit is 'input', set ANY other bit in PB, one or zero does not matter.
the data bit '0' stored in the holding register for PB0 will be changed to a one, although no-one does a set1.io PB,#0
So it seems setting ANY bit in PB will 'read back' ALL values as seen from the port, change the one bit in question, and write them all to the port's holding register.
In normal situations (where inputs are inputs always) this would not harm as the value in the holding register is not important. however, in my usecase i depend on the 0 to be there, and as it is magically 'changed' now i need to set it to 0 everytime before i enable the output .. doable but annoying and i think its worth a warning.
By the way - i tried the 'undocumented' 16Mhz feature on the PFC154, works well, but it does not work on the PFC232. The PFC232 will not run with that clock option.
Johannes
Johannes