简体   繁体   English

MSP430的GPIO编程?

[英]GPIO programming of MSP430?

I was going through the datasheet of MSP430 series. 我正在浏览MSP430系列的数据表。

My doubt is : 我的疑问是:

There is a register for enabling or disabling the PULL UP and PULL DOWN registers.(PXREN) 有一个用于启用或禁用PULL UP和PULL DOWN寄存器的寄存器。

My question is , if we configure a pin as input and disable the internal pull up and pull down registers using the register PXREN then , what would be the state of the pin at that time , will it get tri stated? 我的问题是,如果我们将一个引脚配置为输入,然后使用寄存器PXREN禁用内部上拉和下拉寄存器,那么那时的引脚状态是什么,它会变成三态吗?

Yes. 是。 When you configure the pin as GPIO input it is high-Z, ie it is tri stated. 当您将引脚配置为GPIO输入时,它为高Z,即为三态。 That's perfect for an input pin, your external hardware will define the level. 对于输入引脚而言,这是完美的选择,您的外部硬件将定义电平。

When you enable the RXEN you get a resistor that is a pull up or down. 启用RXEN后,您将获得一个上拉或下拉电阻。 This depends on the value in the OUT register. 这取决于OUT寄存器中的值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM