微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI蓝牙设计交流 > CC2541 的IO 上电默认是上拉输入,可以修改吗?

CC2541 的IO 上电默认是上拉输入,可以修改吗?

时间:10-02 整理:3721RD 点击:

CC2541 的是所有引脚复位后的状态是具有上拉电阻的通用I/O输入 这个默认状态可以修改吗?

可以的,请按照数据手册第七章修改:

http://www.ti.com.cn/cn/lit/ug/swru191f/swru191f.pdf

可以的,注意p1.0,p1.1引脚内部没有上拉电阻,需要外接的。

怎么改?

The registers PxSEL, where x is the port number 0–2, are used to configure each pin in a port as either a general-purpose I/O pin or as a peripheral I/O signal. By default, after a reset, all digital input/output pins are configured as general-purpose input pins.

To change the direction of a port pin, the registers PxDIR are used to set each port pin to be either an input or an output. Thus, by setting the appropriate bit within PxDIR to 1, the corresponding pin becomes an output。

When used as an input, the general-purpose I/O port pins can be configured to have a pullup, pulldown or three-state mode of operation. By default, after a reset, inputs are configured as inputs with pullup. To deselect the pullup or pulldown function on an input, the appropriate bit within the PxINP must be set to 1. The I/O port pins P1.0 and P1.1 do not have pullup or pulldown capability. Note that pins configured as peripheral I/O signals do not have pullup or pulldown capability, even if the peripheral function is an input

after a reset, inputs are configured as inputs with pullup. 就是这句话,能不能设置之后,变成after a reset, inputs are configured as inputs with pulldown,或者 output low。

这个不行,初始化以后芯片IO会恢复初始状态,你可以在之后更改IO口的配置

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top