发射编码部分
#include<reg52.h>
#define uchar unsigned char
sbit key0=P0^0;
sbit key1=P0^1;
sbit key2=P0^2;
sbit key3=P0^3;
sbit TX=P3^1;
//led=P2
uchar m;
void v0(); void v1(); void v2(); void v3();
void delay_315();
void Delay_ms(unsigned int ms) //nms延时
{
unsigned int i,j;
for(i=0;i<ms;i++)
for(j=0;j<114;j++);
}
void main()
{
uchar i;
bit dong=0; //开定时器0中断
TMOD=0X01;
TL0 = 0xAE; //??????
TH0 = 0xFB;
EA=1;
ET0=1;