Each PxSEL bit is used to select the pin function - I/O port or peripheral module function.
Bit=0: I/O Function is selected for the pin Bit=1: Peripheral module function is selected for the pin Setting PxSEL=1 does not automatically set the pin direction. Other peripheral module functions may require the PxDIR bits to be configured according to the direction needed for the module function.
(4) Pullup or Pulldown Resistor Enable Registers (PxREN)
PxREN的各位用于使能对应I/O引脚的上拉/下拉电阻,该寄存器需和PxDlR 、PxOUT配合使 用,才能完成上拉/下拉的配置. Bit=0: Pullup/pulldown resistor disabled Bit=1:Pullup/pulldown resistor enabled Table 12-1 summarizes the usage of PxDIR, PxREN, and PxOUT for proper I/O configuration.
第4章 数字I/O模块
1、内容 ① 数字I/O模块概述 ② 数字I/O模块寄存器设置 ③ 端口输入输出电路 ④ 端口功能 ⑤ 寄存器与控制位 ⑥ 数字I/O端口应用 ⑦ 习题 2、要求 ① 了解端口输入输出电路 ② 掌握MSP430单片机数字I/O模块的 特点与配置方法。 ③ 掌握MSP430单片机数字I/O模块按 键、LED接口方法。