#include <AT89X52.H>
#define uint unsigned int
uint ps, s ;
void main()
{
s=500;
TMOD=0x01;
TH0=(65536-s)/256;
TL0=(65536-s)%256;
EA=1;
ET0=1;
while (1)
{
if(X1==0)S=90;
f(X1==1)S=500;
};
}
void t0int() interrupt 1
{
TH0=(65536-s)/256;
TL0=(65536-s)%256;
if(ps!=2000)Y0=~Y0;
} |