Hitachi H8/3937 Series Hardware Manual page 66

Table of Contents

Advertisement

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
#80
,
MOV. B
R0L
,
MOV. B
R0L
,
P3
7
Input/output
Input
Pin state
Low
level
PCR3
0
PDR3
1
RAM0
1
[B: BSET instruction executed]
BSET
#0
,
[C: After executing BSET]
MOV. B
@RAM0,
MOV. B
R0L,
P3
7
Input/output
Input
Pin state
Low
level
PCR3
0
PDR3
1
RAM0
1
54
The PDR3 value (H'80) is written to a work area in
R0L
memory (RAM0) as well as to PDR3.
@RAM0
@PDR3
P3
P3
6
5
Input
Output
High
Low
level
level
0
1
0
0
0
0
The BSET instruction is executed designating the PDR3
@RAM0
work area (RAM0).
The work area (RAM0) value is written to PDR3.
R0L
@PDR3
P3
P3
6
5
Input
Output
High
Low
level
level
0
1
0
0
0
0
P3
P3
P3
4
3
Output
Output
Output
Low
Low
Low
level
level
level
1
1
1
0
0
0
0
0
0
P3
P3
P3
4
3
Output
Output
Output
Low
Low
Low
level
level
level
1
1
1
0
0
0
0
0
0
P3
P3
2
1
0
Output
Output
Low
Low
level
level
1
1
0
0
0
0
P3
P3
2
1
0
Output
Output
Low
High
level
level
1
1
0
1
0
1

Advertisement

Table of Contents
loading

Table of Contents