CHAPTER 13 A/D CONVERTER
Preliminary User’s Manual U17260EJ3V1UD
314
(6) Port mode register 2 (PM2)
When using the ANI0/P20 to ANI7/P27 pins for analog input port, set PM20 to PM27 to 1. The output latches of
P20 to P27 at this time may be 0 or 1.
If PM20 to PM27 are set to 0, they cannot be used as analog input port pins.
PM2 can be set by a 1-bit or 8-bit memory manipulation instruction.
Reset signal generation sets this register to FFH.
Figure 13-10. Format of Port Mode Register 2 (PM2)
PM20
PM21
PM22
PM23
PM24
PM25
PM26
PM27
P2n pin I/O mode selection (n = 0 to 7)
Output mode (output buffer on)
Input mode (output buffer off)
PM2n
0
1
0
1
2
3
4
5
6
7
PM2
Address: FF22H After reset: FFH R/W
Symbol
ANI0/P20 to ANI7/P27 pins are as shown below depending on the settings of ADPC, ADS, and PM2.
Table 13-3. Setting Functions of ANI0/P20 to ANI7/P27 Pins
ADPC
PM2
ADS
ANI0/P20 to ANI7/P27 Pin
Selects ANI.
Analog input (to be converted)
Input mode
Does not select ANI.
Analog input (not to be converted)
Selects ANI.
Analog input selection
Output mode
Does not select ANI.
Setting prohibited
Selects ANI.
Setting prohibited
Input mode
Does not select ANI.
Digital input
Selects ANI.
Setting prohibited
Digital I/O selection
Output mode
Does not select ANI.
Digital output