Port Mode Register (Pmr1) - Renesas Hitachi H8S/2194 Series Hardware Manual

16-bit single-chip microcomputer
Table of Contents

Advertisement

6.2.6

Port Mode Register (PMR1)

Bit :
7
PMR17
Initial value :
0
R/W :
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
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
,54Q
0
P1n/
1
P1n/IRQn pin functions as the
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
BCLR m @IRQR
MOV.B R1L,@IENR ⋅⋅⋅⋅⋅⋅ Interrupt enabled
:
6
5
PMR16
PMR15
0
0
R/W
R/W
,54 pin switching (PMR15 to PMR10)
pin functions as the P1n input/output pin
,54Q
⋅⋅⋅⋅⋅⋅ Optional instruction
⋅⋅⋅⋅⋅⋅ Applicable interrupt clear
4
3
PMR14
PMR13
PMR12
0
0
R/W
R/W
input pin
Rev. 2.0, 11/00, page 105 of 1037
2
1
PMR11
PMR10
0
0
R/W
R/W
R/W
(Initial value)
(N = 5 to 0)
0
0

Advertisement

Table of Contents
loading

Table of Contents