Datasheet

Section 8 I/O Ports
Rev. 2.00 Aug. 20, 2008 Page 227 of 1198
REJ09B0403-0200
8.1.7 Port 7
Port 7 is an 8-bit input port. Port 7 pins can also function as the A/D converter analog input pins.
Port 7 has the following register.
Port 7 input data register (P7PIN)
(1) Port 7 Input Data Register (P7PIN)
P7PIN indicates the states of the port 7 pins.
Bit Bit Name Initial Value R/W Description
7 P77PIN Undefined* R
6 P76PIN Undefined* R
5 P75PIN Undefined* R
4 P74PIN Undefined* R
3 P73PIN Undefined* R
2 P72PIN Undefined* R
1 P71PIN Undefined* R
0 P70PIN Undefined* R
When this register is read, the pin states are read.
Since this register is allocated to the same address as
PBDDR, writing to this register writes data to PBDDR
and the port B setting is changed.
Note: * The initial values are determined in accordance with the pin states of P77 to P70.
(2) Pin Functions
Each pin of port 7 can also be used as the analog input pins of the A/D converter (AN0 to AN7).
P77/AN7
The pin function is switched as shown below according to the CH2 to CH0 bits in ADCSR of
the A/D converter. Do not set these bits to other values than those shown in the following
table.
CH2 to CH0 B'111 Other than B'111
Pin function AN7 input pin P77 input pin