只要进入了 set_PD; 掉电模式 然后就怎末都唤不醒了 跪求缘由
void PinInterrupt_ISR (void) interrupt 7
{
if(PIF == 0x10)
{ //clear interrupt flag
clr_P01 ;
}
else if (PIF == 0x20)
{
set_PD;
}
else if (PIF == 0x80)
{
clr_PD;
}
PIF = 0x00;
}
/******************************************************************************
The main C function. Program execution starts
here after stack initialization.
******************************************************************************/
void main (void)
{
P01_PushPull_Mode;
P14_Input_Mode;
P15_Input_Mode;
P17_Input_Mode;
clr_P1S_4;
clr_P1S_5;
clr_P1S_7;
Enable_INT_Port1;
PICON|=0x80;//该位用以配置管脚中断6和7产生中断的信号类型
PICON|=0x40;//该位用来配置管脚中断4和5产生中断的信号类型0 = 电平触发1 = 边沿触发
PINEN|=0x80;
PIPEN&=~0x80;
PINEN|=0x30;//该位用来使能低电平/下降沿触发中断 1 = 低电平/ 下降沿触发中断
PIPEN&=~0x30;//该位用来使能高电平/上升沿触发中断
set_EPI; // Enable pin interrupt
set_EA; // global enable bit
while(1)
{
set_P01;
}
}
|