本帖最后由 winrar 于 2011-12-13 15:34 编辑
想问一下STC11F01低压检测终端有没有啊或者是哪位有详细的说明给一份?
程序老是进不了低压终端,真是郁闷。
void Sys_Init(void)
{
//SP = 0x3f;
P1M0 = 0x27;
P1M1 = 0xc0;
P3M0 = 0x80;
P3M1 = 0x18;
POWER = 0;
LED_R = 0;
LED_G = 0;
LED_B = 0;
RF = 0;
//IT1 = 1;
//EX1 = 1;
//EA = 1;
PCON &= 0xdf;
ELVD = 1;
EA = 1;
}
void exint1() interrupt 6
{
unsigned int i;
PCON &= 0xdf;
POWER = 1;
for(i = 0;i < 5000;i++)
_nop_();
POWER = 0;
for(i = 0;i < 5000;i++)
_nop_();
POWER = 1;
for(i = 0;i < 5000;i++)
_nop_();
POWER = 0;
}
POWER = 0; |