User’s Manual
C166S V1 SubSystem
Central Processing Unit
User’s Manual
3-85
V 1.6, 2001-08
•
Initialization of Port Pins
Modifications of the direction of port pins (input or output) become effective only after the
instruction following the modifying instruction. As bit instructions (BSET, BCLR) use
internal read-modify-write sequences accessing the whole port, instructions modifying
the port direction should be followed by an instruction that does not access the same port
(see example below).
PORT_INIT_WRONG:
BSET
DP3.13
;change direction of P3.13 to output
BSET
P3.9
;P3.13 is still input,
;rd-mod-wr reads pin P3.13
PORT_INIT_RIGHT:
BSET
DP3.13
;change direction of P3.13 to output
NOP
;any instruction not accessing port 3
BSET
P3.9
;P3.13 is now output,
;rd-mod-wr reads P3.13’s output latch
•
Changing the System Configuration
The instruction following an instruction that changes the system configuration via register
SYSCON (e.g. the mapping of the internal local memory, segmentation, stack size)
cannot use the new resources (e.g. local memory or stack). In these cases, an
instruction that does not access these resources should be inserted. Code accesses to
the new local memory area are only possible after an absolute branch to this area.
Note: As a rule, instructions that change local memory mapping should be executed
from DPRAM or external memory.
•
BUSCON/ADDRSEL
The instruction following an instruction that changes the properties of an external
address area cannot access operands within the new area. In these cases, an instruction
that does not access this address area should be inserted. Code accesses to the new
address area should be made after an absolute branch to this area.
Note: As a rule, instructions that change external bus properties should not be executed
from the external memory area.
Содержание C166S V1 SubSystem
Страница 10: ...User s Manual C166S V1 SubSystem User s Manual I 6 V 1 6 2001 08...
Страница 16: ...User s Manual C166S V1 SubSystem Introduction User s Manual 1 6 V 1 6 2001 08...
Страница 126: ...User s Manual C166S V1 SubSystem Central Processing Unit User s Manual 3 96 V 1 6 2001 08...
Страница 178: ...User s Manual C166S V1 SubSystem Memory Organization User s Manual 4 52 V 1 6 2001 08...
Страница 206: ...User s Manual C166S V1 SubSystem Instruction Set User s Manual 5 28 V 1 6 2001 08...
Страница 306: ...User s Manual C166S V1 SubSystem Detailed Instruction Set User s Manual 6 100 V 1 6 2001 08...
Страница 362: ...User s Manual C166S V1 SubSystem The External Bus Interface User s Manual 8 40 V 1 6 2001 08...
Страница 452: ...User s Manual C166S V1 SubSystem General Purpose Timer Unit User s Manual 12 44 V 1 6 2001 08...
Страница 454: ...User s Manual C166S V1 SubSystem Instruction Index User s Manual 13 2 V 1 6 2001 08...
Страница 459: ......