MSP430F249外部中断P1.3口
来源:互联网 发布:cc网络用语什么意思呀 编辑:程序博客网 时间:2024/05/10 01:56
/******************************************************************
**
** File : DExternInterrupt.c | Interrupt |
** Version : 1.0
** Description: Extern Interrupt
** Author : LightWu
** Date : 2013-4-16
**
*******************************************************************/
#include "MSP430X24X.h"
void main(void)
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD; //关狗
P4DIR = BIT0|BIT1|BIT2|BIT3; //设置为输出
P4SEL = 0;
P1IE |= 0x08; // P1.3 interrupt enabled
P1IES |= 0x08; // P1.3 Hi/lo edge
P1IFG &= ~0x08; // P1.3 IFG cleared
__bis_SR_register(LPM4_bits + GIE); // Enter LPM4 w/interrupt
while(1)
{
}
}
// Port 1 interrupt service routine
#pragma vector=PORT1_VECTOR
__interrupt void Port_1(void)
{
P4OUT ^= 0x0F; //电平翻转
P1IFG &= ~0x08; // P1.3 IFG cleared,注意清标志位,否则会一直进入中断
}
**
** File : DExternInterrupt.c | Interrupt |
** Version : 1.0
** Description: Extern Interrupt
** Author : LightWu
** Date : 2013-4-16
**
*******************************************************************/
#include "MSP430X24X.h"
void main(void)
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD; //关狗
P4DIR = BIT0|BIT1|BIT2|BIT3; //设置为输出
P4SEL = 0;
P1IE |= 0x08; // P1.3 interrupt enabled
P1IES |= 0x08; // P1.3 Hi/lo edge
P1IFG &= ~0x08; // P1.3 IFG cleared
__bis_SR_register(LPM4_bits + GIE); // Enter LPM4 w/interrupt
while(1)
{
}
}
// Port 1 interrupt service routine
#pragma vector=PORT1_VECTOR
__interrupt void Port_1(void)
{
P4OUT ^= 0x0F; //电平翻转
P1IFG &= ~0x08; // P1.3 IFG cleared,注意清标志位,否则会一直进入中断
}
- MSP430F249外部中断P1.3口
- 2.1.3 外部中断
- CC2530 P1端口中断配置
- 外部中断
- 外部中断
- 外部中断
- 外部中断
- 外部中断
- 外部中断
- 外部中断
- 外部中断
- 外部中断
- 外部中断
- 外部中断
- 外部中断
- 中断一、外部中断
- 智能车笔记3 外部中断
- 单片机实验3(外部中断)
- PEB
- Bitmap.createBitmap java.lang.IllegalArgumentException: width and height must be > 0 问题解决
- IOS Socket使用大全
- JavaScript 解析xml文件
- PCR
- MSP430F249外部中断P1.3口
- IRP
- 没有找到MSVCR90D.DLL的简单解决方法
- directui库和winnt.h中相冲突
- Linux 和 VI 常用命令记录
- SpringMVC 第三篇【灵活多变的方法映射】
- android 编译libmad
- vs2010 安装mvc3
- 关于JavaScript中~.location.href