This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F247到底有没有PxSEL2寄存器?

Other Parts Discussed in Thread: MSP430F247, MSP430F427

以上是F247管脚图,很显然P2,P3,P5每个都有三个功能

MSP430x2xx Family User's Guide 里也有

但是为什么之前的帖子说没有?

www.deyisupport.com/.../16331.aspx

而且IAR MSP430F247.h 里的确也没有

我都弄晕了,到底有没有PxSEL2寄存器?有的话我的头文件应该怎么修改?

  • 有的,MSP430F427.h文件也函数P2SEL定义。详细如下:

    SFR_8BIT(P1IN); /* Port 1 Input */
    SFR_8BIT(P1OUT); /* Port 1 Output */
    SFR_8BIT(P1DIR); /* Port 1 Direction */
    SFR_8BIT(P1IFG); /* Port 1 Interrupt Flag */
    SFR_8BIT(P1IES); /* Port 1 Interrupt Edge Select */
    SFR_8BIT(P1IE); /* Port 1 Interrupt Enable */
    SFR_8BIT(P1SEL); /* Port 1 Selection */
    SFR_8BIT(P1REN); /* Port 1 Resistor Enable */

    SFR_8BIT(P2IN); /* Port 2 Input */
    SFR_8BIT(P2OUT); /* Port 2 Output */
    SFR_8BIT(P2DIR); /* Port 2 Direction */
    SFR_8BIT(P2IFG); /* Port 2 Interrupt Flag */
    SFR_8BIT(P2IES); /* Port 2 Interrupt Edge Select */
    SFR_8BIT(P2IE); /* Port 2 Interrupt Enable */
    SFR_8BIT(P2SEL); /* Port 2 Selection */
    SFR_8BIT(P2REN); /* Port 2 Resistor Enable */

  • 1. MSP430F247

    2. PxSEL2

    3.你怎么两个都能看反呢

  • Maka 说:

    有的,MSP430F427.h文件也函数P2SEL定义。详细如下:

    SFR_8BIT(P1IN); /* Port 1 Input */
    SFR_8BIT(P1OUT); /* Port 1 Output */
    SFR_8BIT(P1DIR); /* Port 1 Direction */
    SFR_8BIT(P1IFG); /* Port 1 Interrupt Flag */
    SFR_8BIT(P1IES); /* Port 1 Interrupt Edge Select */
    SFR_8BIT(P1IE); /* Port 1 Interrupt Enable */
    SFR_8BIT(P1SEL); /* Port 1 Selection */
    SFR_8BIT(P1REN); /* Port 1 Resistor Enable */

    SFR_8BIT(P2IN); /* Port 2 Input */
    SFR_8BIT(P2OUT); /* Port 2 Output */
    SFR_8BIT(P2DIR); /* Port 2 Direction */
    SFR_8BIT(P2IFG); /* Port 2 Interrupt Flag */
    SFR_8BIT(P2IES); /* Port 2 Interrupt Edge Select */
    SFR_8BIT(P2IE); /* Port 2 Interrupt Enable */
    SFR_8BIT(P2SEL); /* Port 2 Selection */
    SFR_8BIT(P2REN); /* Port 2 Resistor Enable */

    F247

    而且是PxSEL2

    你怎么两个都看反了呢

  •  UG 的说明是包含是整个系列的

    具体有没有 看 各自的 datasheet

  • juring_2016 说:

     UG 的说明是包含是整个系列的

    具体有没有 看 各自的 datasheet

    的确没有,但是我还有一个问题,例如 P5.3/UCB1CLK/UCA1STE,很显然UCB1CLK和UCA1STE不能同时存在,这两个在内部是怎么防止冲突的?

    或者我想让UCA1 和UCB1 同时使用,分时复用这个引脚的两个功能,该怎么做呢?

  • 手册里有说明