cc2530单片机点亮LED灯需要哪些条件才能不断闪烁
#include<iocc2530.h>void delay();
void main()
{
P1DIR=P1DIR|(1<<0);
P1SEL=P1SEL&(~(1<<0));
while(1)
{
P1_0=0;
delay(100);
P1_0=1;
}
}
void delay()
{
int x;
for(x=100;x>0;x--);
}
2017-11-23 22:05

2017-11-27 12:14