XC2200 Derivatives
System Units (Vol. 1 of 2)
Central Processing Unit (CPU)
User’s Manual
4-61
V2.1, 2008-08
CPUSV2_X, V2.2
This method has several consequences:
•
The read-modify-write approach may be critical with hardware-affected bits. In these
cases, the hardware may change specific bits while the read-modify-write operation
is in progress; thus, the writeback would overwrite the new bit value generated by the
hardware. The solution is provided by either the implemented hardware protection
(see below) or through special programming (see
•
Bits can be modified only within the internal address areas (internal RAM and SFRs).
External locations cannot be used with bit instructions.
The upper 256 bytes of SFR area, ESFR area, and internal DPRAM are bit-addressable;
so, the register bits located within those respective sections can be manipulated directly
using bit instructions. The other SFRs must be accessed byte/word wise.
Note: All GPRs are bit-addressable independently from the allocation of the register
bank via the Context Pointer (CP). Even GPRs which are allocated to non-bit-
addressable RAM locations provide this feature.
Protected bits
are not changed during the read-modify-write sequence, such as when
hardware sets an interrupt request flag between the read and the write of the read-
modify-write sequence. The hardware protection logic guarantees that only the intended
bit(s) is/are affected by the write-back operation.
Note: If a conflict occurs between a bit manipulation generated by hardware and an
intended software access, the software access has priority and determines the
final value of the respective bit.