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.

[参考译文] CCS/MSP430F2252:MSP430F2252软件编码。

Guru**** 668880 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/778983/ccs-msp430f2252-msp430f2252-software-coding

器件型号:MSP430F2252

工具/软件:Code Composer Studio

尊敬的先生/女士:

关于端口2中断。

Q1)端口2.7作为中断:-

在初始化时、  

P2IE |= 0x80;// P2.7中断被启用
P2IES |= 0x80;//从高到低转换
P2IFG &=~0x80;// P2.7 IFG 被清零

在中断时、  

#pragma vector=port2_vector
_interrupt void Port_2 (void)

  FLAG = 1...
  P2IFG &=~0x80;// P2.7 IFG 被清零

但不起作用...请帮助。

谢谢、此致、

Vijay Shinde

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Vijay、

    您是否在主循环中激活了 GIE (全局中断使能)?

    bis_SR_register (GIE);

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Dietmar Walter:

    感谢您提供信息。 它的工作方式...

    谢谢、此致、

    Vijay Shinde