Hitachi H8/3664 Hardware Manual page 61

Table of Contents

Advertisement

To avoid this problem, store a copy of the PDR5 data in a work area in memory. Perform the bit
manipulation on the data in the work area, then write this data to PDR5.
[A: Prior to executing BSET]
MOV.B
#80,
MOV.B
R0L,
MOV.B
R0L,
P5
Input/output
Input
Pin state
Low
level
PCR5
0
PDR5
1
RAM0
1
[B: BSET instruction executed]
BSET
#0,
[C: After executing BSET]
MOV.B
@RAM0, R0L
MOV.B
R0L,
P5
Input/output
Input
Pin state
Low
level
PCR5
0
PDR5
1
RAM0
1
R0L
The PDR5 value (H'80) is written to a work area in
@RAM0
memory (RAM0) as well as to PDR5.
@PDR5
P5
P5
7
6
Input
Output
High
Low
level
level
0
1
0
0
0
0
@RAM0
The BSET instruction is executed designating the PDR5
work area (RAM0).
The work area (RAM0) value is written to PDR5.
@PDR5
P5
P5
7
6
Input
Output
High
Low
level
level
0
1
0
0
0
0
P5
P5
5
4
Output
Output
Low
Low
level
level
1
1
0
0
0
0
P5
P5
5
4
Output
Output
Low
Low
level
level
1
1
0
0
0
0
P5
P5
3
2
Output
Output
Low
Low
level
level
1
1
0
0
0
0
P5
P5
3
2
Output
Output
Low
Low
level
level
1
1
0
0
0
0
P5
1
0
Output
Low
level
1
0
0
P5
1
0
Output
High
level
1
1
1
45

Advertisement

Table of Contents
loading

Table of Contents