1390 views|0 replies

3836

Posts

19

Resources
The OP
 

msp430f149 external interrupt problem [Copy link]

The less content written in the external interrupt, the better. The clearing of the buffer and the clearing of the flag can be implemented outside the external interrupt function. In this system, I used pins 6 and 7 of port P1 to implement the switch of the detection door. 0; } } /***********************************/ if((P1IFG&0x80)== 0x80) { for (x = 0xff; x > 0; x--); if((P1IN&0x80)== 0x00)) { P1IFG &= 0x7f; _EINT(); IOinterruptClose(); closedoor = 1; opendoor = 0; } } /***************************/ if((P1IFG&0x40)== 0x40){ _EINT(); IOinterruptClose(); closedoor = 1; opendoor = 0; } } /***************************/ if((P1IFG&0x40)== 0x40){ _EINT(); IOinterruptClose(); closedoor = 1; opendoor = 0; } } /***************************/ 0x40) { for (x = 0xff;

This post is from Microcontroller MCU
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list