
Rev. 2.0, 11/00, page 242 of 1037
(1) Port Mode Register 1 (PMR1)
0
0
1
0
R/W
2
0
R/W
3
0
4
0
R/W
0
R/W
5
0
7
0
R/W
R/W
R/W
R/W
6
PMR14
PMR13
PMR12
PMR11
PMR10
PMR17
PMR16
PMR15
Bit :
Initial value :
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
⋅⋅⋅⋅⋅⋅
Optional instruction
BCLR m @IRQR
⋅⋅⋅⋅⋅⋅
Applicable interrupt clear
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
(Initial value)
1
The P17/TMOW pin functions as a TMOW output pin
Summary of Contents for Hitachi H8S/2191
Page 123: ...Rev 2 0 11 00 page 96 of 1037...
Page 149: ...Rev 2 0 11 00 page 122 of 1037...
Page 197: ...Rev 2 0 11 00 page 170 of 1037...
Page 247: ...Rev 2 0 11 00 page 220 of 1037...
Page 249: ...Rev 2 0 11 00 page 222 of 1037...
Page 347: ...Rev 2 0 11 00 page 320 of 1037...
Page 357: ...Rev 2 0 11 00 page 330 of 1037...
Page 417: ...Rev 2 0 11 00 page 390 of 1037...
Page 431: ...Rev 2 0 11 00 page 404 of 1037...
Page 439: ...Rev 2 0 11 00 page 412 of 1037...
Page 457: ...Rev 2 0 11 00 page 430 of 1037...
Page 525: ...Rev 2 0 11 00 page 498 of 1037...
Page 543: ...Rev 2 0 11 00 page 516 of 1037...
Page 845: ...Rev 2 0 11 00 page 818 of 1037...