#include
#define uchar unsigned char
uchar cnt,pwm=50;
sbit key=P1^0;
sbit motor=P1^4;
void t0isr() interrupt 1
{
cnt++;
cnt%=101;
if(cnt
}
main()
{
TMOD=0x02;
TH0=156;
TL0=156;
TR0=1;
ET0=1;
EA=1;
while(1)
{
if(key==0)
{
while(key==0);
pwm+=5;
if(pwm>100)pwm=1;
}
}
}