CHAPTER 4 PORT FUNCTIONS
User’s Manual U17854EJ9V0UD
107
4.2.3 Port 2
Port 2 is an 8-bit I/O port with an output latch. Port 2 can be set to the input mode or output mode in 1-bit units
using port mode register 2 (PM2).
This port can also be used for A/D converter analog input.
To use P20/ANI0 to P27/ANI7 as digital input pins, set them in the digital I/O mode by using the A/D port
configuration register (ADPC) and in the input mode by using PM2. Use these pins starting from the lower bit.
To use P20/ANI0 to P27/ANI7 as digital output pins, set them in the digital I/O mode by using ADPC and in the
output mode by using PM2.
To use P20/ANI0 to P27/ANI7 as analog input pins, set them in the analog input mode by using the A/D port
configuration register (ADPC) and in the input mode by using PM2. Use these pins starting from the upper bit.
Table 4-4. Setting Functions of P20/ANI0 to P27/ANI7 Pins
ADPC
PM2
ADS
P20/ANI0 to P27/ANI7 Pins
Input mode
Digital input
Digital I/O selection
Output mode
Digital output
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
All P20/ANI0 to P27/ANI7 are set in the digital input mode when the reset signal is generated.
Figure 4-12 shows a block diagram of port 2.
Caution
See 2.2.12 AVREF for the voltage to be applied to the AVREF pin when using port 2 as a digital I/O.
相关PDF资料
UPD78F1156AGC-GAD-AX MCU 16BIT 78K0R/KX3 80-LQFP
UPD78F1168AGF-GAS-AX MCU 16BIT 78K0R/KX3 100-LQFP
UPD78F1178AGF-GAT-AX MCU 16BIT 78K0R/KX3 128-LQFP
UPD78F1188AGJ-GAE-AX MCU 16BIT 78K0R/KX3 144-LQFP
UPD78F1235GK-GAJ-AX MCU 16BIT 78K0R/LX3 64-LQFP
UPD78F4225YGC-8BT-A MCU 16BIT 128K FLASH
UPD78F9202MA-CAC-A MCU 8BIT 4KB FLASH 128B RAM
UPD78F9212CS-CAB-A MCU 8BIT 4KB FLASH 16PIN
相关代理商/技术参数
UPD78F1146AGA-HAB-AX 功能描述:MCU 16BIT 78K0R/KX3 64-TQFP RoHS:是 类别:集成电路 (IC) >> 嵌入式 - 微控制器, 系列:78K0R/Kx3 标准包装:250 系列:80C 核心处理器:8051 芯体尺寸:8-位 速度:16MHz 连通性:EBI/EMI,I²C,UART/USART 外围设备:POR,PWM,WDT 输入/输出数:40 程序存储器容量:- 程序存储器类型:ROMless EEPROM 大小:- RAM 容量:256 x 8 电压 - 电源 (Vcc/Vdd):4.5 V ~ 5.5 V 数据转换器:A/D 8x10b 振荡器型:内部 工作温度:-40°C ~ 85°C 封装/外壳:68-LCC(J 形引线) 包装:带卷 (TR)
UPD78F1146AGB(R)-GAH-AX 制造商:Renesas Electronics Corporation 功能描述:
UPD78F1146AGB-GAH-AX 功能描述:MCU 16BIT 78K0R/KX3 64-LQFP RoHS:是 类别:集成电路 (IC) >> 嵌入式 - 微控制器, 系列:78K0R/Kx3 标准包装:250 系列:80C 核心处理器:8051 芯体尺寸:8-位 速度:16MHz 连通性:EBI/EMI,I²C,UART/USART 外围设备:POR,PWM,WDT 输入/输出数:40 程序存储器容量:- 程序存储器类型:ROMless EEPROM 大小:- RAM 容量:256 x 8 电压 - 电源 (Vcc/Vdd):4.5 V ~ 5.5 V 数据转换器:A/D 8x10b 振荡器型:内部 工作温度:-40°C ~ 85°C 封装/外壳:68-LCC(J 形引线) 包装:带卷 (TR)
UPD78F1146AGK-GAJ-AX 功能描述:MCU 16BIT 78K0R/KX3 64-LQFP RoHS:是 类别:集成电路 (IC) >> 嵌入式 - 微控制器, 系列:78K0R/Kx3 标准包装:250 系列:80C 核心处理器:8051 芯体尺寸:8-位 速度:16MHz 连通性:EBI/EMI,I²C,UART/USART 外围设备:POR,PWM,WDT 输入/输出数:40 程序存储器容量:- 程序存储器类型:ROMless EEPROM 大小:- RAM 容量:256 x 8 电压 - 电源 (Vcc/Vdd):4.5 V ~ 5.5 V 数据转换器:A/D 8x10b 振荡器型:内部 工作温度:-40°C ~ 85°C 封装/外壳:68-LCC(J 形引线) 包装:带卷 (TR)
UPD78F1146GB-GAH-AX 制造商:Renesas Electronics Corporation 功能描述:
UPD78F1146GB-GAH-ES3.1-AX 制造商:Renesas Electronics Corporation 功能描述:
UPD78F1146GK-GAJ-AX 制造商:NEC Electronics Corporation 功能描述:16BIT MCU 256K FLASH 12K RAM SMD 制造商:NEC Electronics Corporation 功能描述:16BIT MCU, 256K FLASH, 12K RAM, SMD
UPD78F1146GK-GAJ-ES2.1-AX 制造商:Renesas Electronics Corporation 功能描述: