- 博客(0)
- 资源 (3)
- 收藏
- 关注
proteus 51多机通讯仿真
proteus 51多机通讯仿真
//A=P2.0,B=P2.1
void hand_pc(void)
{
P2&=~0x03; //A=0,B=0,4052选择(X0,Y0)PC端232
SCON=0x50;
state_flag=0; //state_flag=0与PC通讯
}
//A=P2.0,B=P2.1
void hand_mcu(void)
{
P2=(P2&~0x20)|0x01; //A=1,B=0,4052选择(X1,Y1)MCU串口
SCON=0xD0;
state_flag=1; //state_flag=1与MCU多机通讯
}
2011-09-05
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人