代码搜索结果
找到约 1,839 项符合
Modbus 的代码
modbus.c
#include ".\STC89c5x.H"
//串口通讯设置相关参数
#define IP_VALUE 0x10 //串行中断高优先级
#define TMOD_VALUE 0x21 //T0十六位定时器,T1 波特率发生器
#define SCON_VALUE 0x50 //方式1,10位,能接收
#define PCON_VALUE 0
modbus.c
#include "LZK.H"
/* CRC 高位字节值表 */
unsigned char code CRC_HiTab[] =
{
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
modbus.bas
Attribute VB_Name = "modbus"
Option Explicit
Public ReceiveData() As Byte
Function CRC16(ByRef data() As Byte) As String
Dim ArraySize As Integer
Dim CRC16Lo As Byte, CRC16Hi As Byt