功能: 1、作为主机通讯采集两路下位机数据并将此数据通过8255送出(十路水位值) 并计算水头送STC板 2、采集数据为BCD码制,先转换成二进制...
代码说明:
功能: 1、作为主机通讯采集两路下位机数据并将此数据通过8255送出(十路水位值) 并计算水头送STC板 2、采集数据为BCD码制,先转换成二进制,处理后再转换成BCD 3、通讯采用方式3,多机通讯,上位机发地址时TB8=1,其他TB8=0 下位机SM2=1,RB8=1时产生中断后使SM2=0收发数据,结束后SM2=1 在此系统中本机硬件地址要设为0-Features: 1, as the host of two-way communication acquisition of data-bit machine and send this data through 8255 (the road level 10 value) and calculate the head sent to STC board 2, for BCD code data collection system, the first converted into binary, and then deal with the conversion into BCD 3, communication using methods 3, multi-machine communications, address PC made TB8 = 1, other TB8 = 0 under the digital machine SM2 = 1, RB8 = 1 when the failure to make SM2 = 0 to send and receive data, after the end of SM2 = 1 in this system to the local hardware address set to 0
下载说明:请别用迅雷下载,失败请重下,重下不扣分!