Rev. 1.0, 07/01, page 41 of 372
•
Prior to executing BCLR instruction
MOV.B #3F, R0L
MOV.B R0L, @RAM0
MOV.B R0L, @PCR5
The PCR5 value (H'3F) is written to a work area in
memory (RAM0) as well as to PCR5.
P57 P56 P55 P54 P53 P52 P51 P50
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
PCR5 00111111
PDR5 10000000
RAM0 00111111
•
BCLR instruction executed
BCLR #0, @RAM0
The BCLR instructions executed for the PCR5 work area
(RAM0).
•
After executing BCLR instruction
MOV.B @RAM0, R0L
MOV.B R0L, @PCR5
The work area (RAM0) value is written to PCR5.
P57 P56 P55 P54 P53 P52 P51 P50
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
PCR5 00111110
PDR5 10000000
RAM0 00111110