54
To avoid this problem, store a copy of the PDR3 data in a work area in memory. Perform the bit
manipulation on the data in the work area, then write this data to PDR3.
[A: Prior to executing BSET]
MOV. B
MOV. B
MOV. B
#80
R0L
R0L
,
,
,
R0L
@RAM0
@PDR3
The PDR3 value (H'80) is written to a work area in
memory (RAM0) as well as to PDR3.
P3
7
P3
6
P3
5
P3
4
P3
3
P3
2
P3
1
P3
0
Input/output
Input
Input
Output
Output
Output
Output
Output
Output
Pin state
Low
level
High
level
Low
level
Low
level
Low
level
Low
level
Low
level
Low
level
PCR3
0
0
1
1
1
1
1
1
PDR3
1
0
0
0
0
0
0
0
RAM0
1
0
0
0
0
0
0
0
[B: BSET instruction executed]
BSET
#0
,
@RAM0
The BSET instruction is executed designating the PDR3
work area (RAM0).
[C: After executing BSET]
MOV. B
MOV. B
@RAM0,
R0L,
R0L
@PDR3
The work area (RAM0) value is written to PDR3.
P3
7
P3
6
P3
5
P3
4
P3
3
P3
2
P3
1
P3
0
Input/output
Input
Input
Output
Output
Output
Output
Output
Output
Pin state
Low
level
High
level
Low
level
Low
level
Low
level
Low
level
Low
level
High
level
PCR3
0
0
1
1
1
1
1
1
PDR3
1
0
0
0
0
0
0
1
RAM0
1
0
0
0
0
0
0
1
Содержание H8/3935
Страница 1: ......
Страница 2: ......
Страница 4: ......
Страница 24: ...12 ...
Страница 53: ...41 Notation op Operation field 15 0 8 7 op op Figure 2 10 Block Data Transfer Instruction Code ...
Страница 96: ...84 ...
Страница 142: ...130 ...
Страница 144: ...132 ...
Страница 252: ...240 ...
Страница 326: ...314 ...
Страница 340: ...328 ...
Страница 520: ...508 ...