NEC 78K0 Series User Manual page 314

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0 Series:
Table of Contents

Advertisement

(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.
Address: FF22H
Symbol
7
PM2
PM27
PM2n
0
1
ANI0/P20 to ANI7/P27 pins are as shown below depending on the settings of ADPC, ADS, and PM2.
ADPC
Analog input selection
Digital I/O selection
314
CHAPTER 13 A/D CONVERTER
Figure 13-10. Format of Port Mode Register 2 (PM2)
After reset: FFH
R/W
6
5
PM26
PM25
P2n pin I/O mode selection (n = 0 to 7)
Output mode (output buffer on)
Input mode (output buffer off)
Table 13-3. Setting Functions of ANI0/P20 to ANI7/P27 Pins
PM2
Input mode
Selects ANI.
Does not select ANI.
Output mode
Selects ANI.
Does not select ANI.
Input mode
Selects ANI.
Does not select ANI.
Output mode
Selects ANI.
Does not select ANI.
Preliminary User's Manual U17260EJ3V1UD
4
3
2
PM24
PM23
PM22
ADS
Analog input (to be converted)
Analog input (not to be converted)
Setting prohibited
Setting prohibited
Digital input
Setting prohibited
Digital output
1
0
PM21
PM20
ANI0/P20 to ANI7/P27 Pin

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents