Rev. 2.0, 11/00, page 105 of 1037
6.2.6
Port Mode Register (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
PMR17
PMR16
PMR15
PMR14
PMR13
PMR12
PMR11
PMR10
R/W
R/W
R/W
6
Bit :
Initial value :
R/W :
Port Mode Register 1 (PMR1) controls pin function switching-over of port 1. Switching is
specified for each bit.
PMR1 is an 8-bit readable/writable register and is initialized to H'00 by a reset.
Only bits 5 to 0 are explained here. For details, see section 10, I/O Port.
Bits 5 to 0: P15/
,54
,54 to P10/,54
,54 pin switching (PMR15 to PMR10)
These bits are for setting the P1n/
,54Q pin as the input/output pin for P1n or as the ,54Q pin for
external interrupt request input.
Bit n
PMR1n
Description
0
P1n/
,54Q
pin functions as the P1n input/output pin
(Initial value)
1
P1n/IRQn pin functions as the
,54Q
input pin
(N = 5 to 0)
The following is the notes on switching the pin function by PMR1.
(1) When the port is set as the
,& input pin or ,54 to ,54 input pin, the pin level must be
High or Low regardless of active mode or power-down mode. Do not set the pin level at Medium.
(2) Switching the pin function of P16/
,& or P15/,54 to P10/,54 may be mistakenly identified
as edge detection and detection signal may be generated. To prevent this, operate as follows:
(a) Set the interrupt enable/disable flag to disable before switching the pin function.
(b) Clear the applicable interrupt request flag to 0 after switching the pin function and
executing another instruction.
(Program example)
:
MOV.B R0L,@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
:
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...