#include <REGX51.H>
int0()interrupt 0//中断函数
{
P0=~P0;//led取反
}
main()
{
//一共有5个中断
IT0=1;
EX0=1;
EA=1;
while(1)
{;}//原地等待
}
版权声明:本文为zheng199902原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。
#include <REGX51.H>
int0()interrupt 0//中断函数
{
P0=~P0;//led取反
}
main()
{
//一共有5个中断
IT0=1;
EX0=1;
EA=1;
while(1)
{;}//原地等待
}