Renesas SH7781 用户手册

下载
页码 1692
28.   General Purpose I/O Ports (GPIO) 
Rev.1.00  Jan. 10, 2008  Page 1451 of 1658 
REJ09B0261-0100 
 
28.3.3
 
Peripheral Module Function 
The procedures for setting the peripheral module function are described below. 
1.   Select the peripheral module by using the peripheral module select register 1 (P1MSELR) and 
peripheral module select register 2 (P2MSELR). 
2.   When an input or input/output pin is used, it is necessary to set the pull-up MOS for each pin 
by using the port pull-up control registers (PEPUPR, PHPUPR, PJPUPR, PKPUPR. PLPUPR, 
PMPUPR, and PNPUPR). Write B'0 (when the pull-up MOS is off ) or B'1 (when the pull-up 
MOS is on) to the corresponding bit. When an output port is used, the pull-up MOS is off 
regardless of the settings of the port pull-up control registers. 
3.   Write B'00 to the corresponding two bits in the port control registers (PACR to PRCR).