![Infineon Technologies TC1796 Скачать руководство пользователя страница 546](http://html1.mh-extra.com/html/infineon-technologies/tc1796/tc1796_user-manual_2055437546.webp)
TC1796
System Units (Vol. 1 of 2)
Peripheral Control Processor (PCP)
User’s Manual
11-9
V2.0, 2007-07
PCP, V2.0
11.3.1.5 Register R7
Register R7 is an exception with respect to the other registers in that not all bits within
the register can be written, and the implicit use of the remaining bits virtually excludes
the use of R7 as a GPR. R7 serves purposes similar to those of a Program Status Word
found in traditional processors.
R7 holds the flag bits, a channel enable/disable control bit, and the PRAM Data Pointer
(DPTR). The upper 16 bits of R7 are reserved.
Most instructions of the PCP update the flags (CN1Z, V, C, N, Z) in R7 according to the
result of their operation. See
for details on the flag updates
of the individual instructions. The values of the flag bits in R7 maintain their state until
another instruction that updates their state is executed.
Note: Implicit updates to the flags caused by instruction take precedence over any bits
that are explicitly moved to R7. For example, if a MOV instruction is used to place
0000FF07
H
in R7, then the bit positions for the C (carry), Z (zero) and N (negative)
flags are being written with 1. The MOV instruction, however, implicitly updates the
Z and N flag bits in R7 as a result of its operation. Because the number is not
negative, and not zero, it will update the Z and N flags to 0. As a result, the value
left in R7 after the MOV is complete will be 0000FF04
H
(i.e C = 1, Z = 0, N = 0).
It is recommended that only SET and CLR instructions should be used to explicitly
modify flags in R7.
The Data Pointer, R7.DPTR, is the means of accessing PRAM variables
programmatically. It points to a 64-word PRAM segment that may be addressed by
instructions that can use the PRAM for source or destination operands (xx.P and xx.PI
instructions). The 8 bits of the DPTR are concatenated with a 6-bit offset value (either
specified in the instruction as an immediate value or contained in one of the registers) to
give a 14 bit (word) address. A program is able to update the DPTR value dynamically,
in order to index more than 64 words of PRAM.
Note: Care must be taken when updating R7.DPTR to ensure that other bits within R7
(e.g. R7.CEN) are not inadvertently corrupted.
The channel enable control bit, R7.CEN, allows the enabling or disabling of specific
channel programs. If an interrupt request is received for a channel that is disabled, an
error exit is forced, and an error interrupt to the CPU is activated.
The interrupt enable control bit, R7.IEN, allows the enabling or disabling of channel
interruption on a channel to channel basis. When R7.IEN is 0 the channel will continue
execution regardless of the priority of any new service requests. When R7.IEN is ‘1’ and
conditions allow, the channel will be suspended on receipt of a higher-priority service
request.
Note: See
regarding the use of R7.IEN.