Hello,
SCIS1 = 0xC0; means to directly write the SCIS1 register with the value 0xC0.
SCIS1 |= 0xC0; is equivalent to the statement -
SCIS1 = SCIS1 | 0xC0;
This means to read the SCIS1 register, then logical OR the value with 0xC0, and then write the result back to the SCIS1 register. Therefore, the bits that are set within the mask value (0xC0) will also become set within SCIS1, but all other bits of SCIS1 will remain unchanged. This is known as a "read-modify-write" process.
This operation would be true if SCIS1 were a standard read-write register. However, it so happens that this particular register is a special hardware register that is read-only. So write or read-modify-write operations are quite meaninless in this case - the status bits will remain unchanged until a hardware event occurs that sets a particular flag, or the special flag clearing procedures are implemented that do not involve writing to the register.
Regards,
Mac
Message Edited by bigmac on 2009-03-30 06:18 PM