求大神帮我翻译成中文可好啊啊啊啊
#include <reg51.h>#include <string.h>
#define uchar unsigned char
#define uint unsigned int
uint dat;
uint x;
sbit a=P1^0 ;
sbit b=P1^1 ;
sbit aa=P1^2;
unsigned char PWM=0x7f;
void delay_ms(uint ms)
{
uint i,j;
for(i=0;i<ms;i++)
{
for(j=0;j<100;j++);
}
}
TIME() interrupt 1
{
uint n,m;
TH0=(65535-15000)/256;
TL0=(65535-15000)%256;
n++;
if(n==40)
{
if(x==1)
b=!b;
if(x==2)
a=!a;
n=0;
}
}
void main(void)
{
EA=1;
ET0=1;
TMOD=0X01;
TR0=0;
TH0=(65535-15000)/256;
TL0=(65535-15000)%256;
a=0;
b=0;
P1=0x00;
P2=0xf0;
while(1)
{
dat=(P2&0xf0);
switch(dat)
{
case 0x40:
a=0;
b=1;
TR0=1;x=1;
delay_ms(10);
break;
case 0x10:
a=1;
b=0;x=2;
delay_ms(10);
break;
case 0x80:
a=0;
b=0 ;
x=0;
delay_ms(10);
break;
}
}
}