proteus51多机通讯仿真//A=P2.0,B=P2.1voidhand_pc(void){P2&=~0x03;//A=0,B=0,4052选择(X0,Y0)PC端232SCON=0x50;state_flag=0;//state_flag=0与PC通讯}//A=P2.0,B=P2.1voidhand_mcu(void){P2=(P2&~0x20)|0x01;//A=1,B=0,4052选择(X1,Y1)MCU串口SCON=0xD0;state_flag=1;//state_flag=1与MCU多机通讯}