UPD78F0838 Renesas Electronics Corporation., UPD78F0838 Datasheet - Page 361

no-image

UPD78F0838

Manufacturer Part Number
UPD78F0838
Description
8-bit Single-chip Microcontrollers
Manufacturer
Renesas Electronics Corporation.
Datasheet
(6) Port mode register 2 (PM2)
When using the P20/ANI0 to P27/ANI7 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.
P20/ANI0 to P27/ANI7 pins are as shown below depending on the settings of ADPC, ADS, PM2.
Address: FF22H
Symbol
PM2
Analog input selection
Digital I/O selection
ADPC
PM27
PM2n
7
0
1
After reset: FFH
Table 11-3. Setting Functions of P20/ANI0 to P27/ANI7 Pins
Output mode (Output buffer on)
Input mode (Output buffer off)
Figure 11-10. Format of Port mode register 2 (PM2)
Input mode
Output mode
Input mode
Output mode
PM26
6
PM2
Preliminary User’s Manual U19748EJ1V0UD
R/W
CHAPTER 11 A/D CONVERTER
PM25
5
P2n pin I/O mode selection (n = 0 to 7)
Selects ANI.
Does not select ANI.
Selects ANI.
Does not select ANI.
PM24
4
ADS
PM23
3
Analog input (to be converted)
Analog input (not to be converted)
Setting prohibited
Digital input
Digital output
PM22
2
P20/ANI0 to P27/ANI7 Pins
PM21
1
PM20
0
359

Related parts for UPD78F0838