#include
sbit pluse=P1^0;
void t0isr() interrupt 1
{
TH0=(65536-500);
TL0=(65536-500);
pluse=~pluse;
}
main()
{
TMOD=0x01;
TH0=(65536-500);
TL0=(65536-500);
TR0=1;
ET0=1;
while(1);
}
#include
sbit pluse=P1^0;
bit flag=0;
void t0isr() interrupt 1
{
flag=~flag;
if(!flag)pluse=~pluse;
}
main()
{
TMOD=0x02;
TH0=6;
TL0=6;
TR0=1;
ET0=1;
while(1);
}