Renesas Hitachi H8S/2194 Series Hardware Manual page 269

16-bit single-chip microcomputer
Table of Contents

Advertisement

(1) Port Mode Register 1 (PMR1)
7
Bit :
PMR17
Initial value :
0
R/W :
R/W
Port mode register 1 (PMR1) controls switching of each pin function of port 1. The switching is
specified in a unit of bit.
PMR1 is an 8-bit read/write enable register. When reset, PMR1 is initialized to H'00.
Note the following items when the pin functions are switched by PMR1.
(1) If port 1 is set to an ,& input pin and ,54 to ,54 by PMR1, the pin level needs be set to
the high or low level regardless of the active mode and low power consumption mode. The
pin level must not be set to an intermediate level.
(2) When the pin functions of P16/ ,& and P15/ ,54 to P10/ ,54 are switched by PMR1, they
are incorrectly recognized as edge detection according to the state of a pin signal and a
detection signal may be generated. To prevent this, perform the operation in the following
procedure.
(a) Before switching the pin functions, inhibit an interrupt enable flag from being
interrupted.
(b) After having switched the pin functions, clear the relevant interrupt request flag to 0 by a
single instruction.
(Program Example)
:
MOV.B ROL,@IENR ⋅⋅⋅⋅⋅⋅ Interrupt disabled
MOV.B R1L,@PMR1 ⋅⋅⋅⋅⋅⋅ Pin function change
NOP
BCLR m @IRQR
MOV.B R1L,@IENR ⋅⋅⋅⋅⋅⋅ Interrupt enabled
:
Bit 7: P17/TMOW Pin Switching (PMR17)
PMR17 sets whether the P17/TMOW pin is used as a P17 I/O pin or a TMOW pin for the
frequency division clock output.
Bit 7
PMR17
Description
0
The P17/TMOW pin functions as a P17 I/O pin
1
The P17/TMOW pin functions as a TMOW output pin
Rev. 2.0, 11/00, page 242 of 1037
6
5
PMR16
PMR15
0
0
R/W
R/W
⋅⋅⋅⋅⋅⋅ Optional instruction
⋅⋅⋅⋅⋅⋅ Applicable interrupt clear
4
3
PMR14
PMR13
PMR12
0
0
R/W
R/W
2
1
PMR11
PMR10
0
0
R/W
R/W
R/W
(Initial value)
0
0

Advertisement

Table of Contents
loading

Table of Contents