
338
9.13.3
Pin Functions
Port G pins also function as external interrupt input pins (
IRQ6 and IRQ7) and bus control signal
output pins (
CS0 to CS3). The pin functions differ between modes 4 to 6 and mode 7. Port G pin
functions are shown in table 9-25.
Table 9-25 Port G Pin Functions
Pin
Pin Functions and Selection Method
PG4/
CS0
The pin function is switched as shown below according to the operating mode and bit
PG4DDR.
Operating mode
Modes 4 to 6
Mode 7
PG4DDR
0101
Pin function
PG4 input
CS0 output
PG4 input
PG4 output
PG3/
CS1
The pin function is switched as shown below according to the operating mode and bit
PG3DDR.
Operating mode
Modes 4 to 6
Mode 7
PG3DDR
0101
Pin function
PG3 input
CS1 output
PG3 input
PG3 output
PG2/
CS2
The pin function is switched as shown below according to the operating mode and bit
PG2DDR.
Operating mode
Modes 4 to 6
Mode 7
PG2DDR
0101
Pin function
PG2 input
CS2 output
PG2 input
PG2 output
PG1/
CS3/
IRQ7
The pin function is switched as shown below according to the operating mode and bit
PG1DDR.
Operating mode
Modes 4 to 6
Mode 7
PG1DDR
0101
Pin function
PG1 input
CS3 output
PG1 input
PG1 output
IRQ7 input*
Note: * When used as an external interrupt input pin, do not use as an I/O pin for
another function.