Hitachi H8/3637 Hardware Manual page 62

H8/3637 series
Table of Contents

Advertisement

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

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8/3635H8/3636

Table of Contents