单片机简单程序(stc89c51)中断
#include <reg52.h>#define uchar unsigned char
#define uint unsigned int
sbitbeep=P1^6;
sbit bell=P3^2;
void delay(uchar dly)
{
uchar i,j;
for(i=255;i>0;i--)
for(j=dly;j>0;j--) ;
}
void main()
{
EA=1;
EX0=1;
IT0=0;
bell=0;
while(1)
{
}
} 这对于新手很有用
页:
[1]
