/******************************************Copyright (c)************************************************
**
**
**
**
**
**--------------------------------------------File Info-------------------------------------------------
**
**--------------------------------------------- V1.0.0 -------------------------------------------------
**
** 文件名称:处理器中控协议
** 创建日期: 2018-1-1
** 创 建 人:
** 初始版本: V1.0.0
** 功能描述:处理器中控协议
**
********************************************************************************************************/
/*
_____________________________________________________________________________________________________
||—————————————————————————————————————————————————————————————————————————————————————————————————||
|| 中控数据格式(波特率:19200) ||
||—————————————————————————————————————————————————————————————————————————————————————————————————||
|| D0 | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | D11 | D12 | D13 | D14 | D15 | D16 | D17 ||
||—————————————————————————————————————————————————————————————————————————————————————————————————||
|| 5A | 5A | 5A | 00 | 00 | B3 | 01 | 00 | 00 | 00 | 04 | 00 | N1 | N2 | N3 | N4 | N5 | AA ||
||—————————————————————————————————————————————————————————————————————————————————————————————————||
—————————————————————————————————————————————————————————————————————————————————————————————————————
通讯格式说明:
每个数据包固定长度为:18字节,除了N1,N2,N3,N4,N5数据可变外,其它数值固定不变
N1:用于表示数据类型,定义如下
14:数据包类型为控制通道静音 (N3=N4=00)
24:数据包类型为控制通道音量 (直接输入音量值,None)
34:数据包类型为控制通道音量 (N3=N4=2B,表示音量+1dB; N3=N4=2D,表示音量-1dB)
44:数据包类型为输出通道音源选择 (N3=N4, 字节的低4位每位分别对应一个输入通道Bit3:D Bit2:C Bit1:B Bit0:A)
54:数据包类型为调用命令
64:数据包类型为保存命令
N2:用于选择控制的通道(保存调用,该字节值=00)
00 ~ 03:表示输入A,B,C,D
04 ~ 0B:表示输出1,2,3,4,5,6,7,8 (当N1=54或64时,该位置的值表示为组号,组号范围00~0C)
N3,N4:两字节数据一样,具体内容视N1而定
N5:数据校验位(xor是异或运算)
N5 = 04 (xor) N1 (xor) N2 (xor) N3 (xor) N4
*/
// 处理器中控码
//--------------------------------------------------------------------
// 通道静音/非静音命令
//--------------------------------------------------------------------
// 静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 00 00 00 10 AA // 输入A静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 01 00 00 11 AA // 输入B静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 02 00 00 12 AA // 输入C静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 03 00 00 13 AA // 输入D静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 04 00 00 14 AA // 输出1静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 05 00 00 15 AA // 输出2静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 06 00 00 16 AA // 输出3静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 07 00 00 17 AA // 输出4静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 08 00 00 18 AA // 输出5静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 09 00 00 19 AA // 输出6静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 0A 00 00 1A AA // 输出7静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 0B 00 00 1B AA // 输出8静音
// 非静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 00 01 01 10 AA // 输入A非静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 01 01 01 11 AA // 输入B非静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 02 01 01 12 AA // 输入C非静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 03 01 01 13 AA // 输入D非静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 04 01 01 14 AA // 输出1非静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 05 01 01 15 AA // 输出2非静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 06 01 01 16 AA // 输出3非静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 07 01 01 17 AA // 输出4非静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 08 01 01 18 AA // 输出5非静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 09 01 01 19 AA // 输出6非静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 0A 01 01 1A AA // 输出7非静音
5A 5A 5A 00 00 5A 00 00 00 00 04 00 14 0B 01 01 1B AA // 输出8非静音
//--------------------------------------------------------------------
// 通道+1dB,-1dB命令
//--------------------------------------------------------------------
// +1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 00 2B 2B 30 AA // 输入A +1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 01 2B 2B 31 AA // 输入B +1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 02 2B 2B 32 AA // 输入C +1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 03 2B 2B 33 AA // 输入D +1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 04 2B 2B 34 AA // 输出1 +1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 05 2B 2B 35 AA // 输出2 +1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 06 2B 2B 36 AA // 输出3 +1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 07 2B 2B 37 AA // 输出4 +1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 08 2B 2B 38 AA // 输出5 +1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 09 2B 2B 39 AA // 输出6 +1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 0A 2B 2B 3A AA // 输出7 +1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 0B 2B 2B 3B AA // 输出8 +1dB
// -1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 00 2D 2D 30 AA // 输入A -1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 01 2D 2D 31 AA // 输入B -1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 02 2D 2D 32 AA // 输入C -1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 03 2D 2D 33 AA // 输入D -1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 04 2D 2D 34 AA // 输出1 -1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 05 2D 2D 35 AA // 输出2 -1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 06 2D 2D 36 AA // 输出3 -1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 07 2D 2D 37 AA // 输出4 -1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 08 2D 2D 38 AA // 输出5 -1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 09 2D 2D 39 AA // 输出6 -1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 0A 2D 2D 3A AA // 输出7 -1dB
5A 5A 5A 00 00 5A 00 00 00 00 04 00 34 0B 2D 2D 3B AA // 输出8 -1dB
//--------------------------------------------------------------------
// 通道音源选择
//--------------------------------------------------------------------
// xx数值选择如下:
// xx = 00:不选择音源输入
// xx = 01:选择A输入
// xx = 02:选择B输入
// xx = 03:选择A,B输入
// xx = 04:选择C输入
// xx = 05:选择A,C输入
// xx = 06:选择B,C输入
// xx = 07:选择A,B,C输入
// xx = 08:选择D输入
// xx = 09:选择A,D输入
// xx = 0A:选择B,D输入
// xx = 0B:选择A,B,D输入
// xx = 0C:选择C,D输入
// xx = 0D:选择A,C,D输入
// xx = 0E:选择B,C,D输入
// xx = 0F:选择A,B,C,D输入
5A 5A 5A 00 00 5A 00 00 00 00 04 00 44 04 xx xx 44 AA // 输出1 选择输入
5A 5A 5A 00 00 5A 00 00 00 00 04 00 44 05 xx xx 45 AA // 输出2 选择输入
5A 5A 5A 00 00 5A 00 00 00 00 04 00 44 06 xx xx 46 AA // 输出3 选择输入
5A 5A 5A 00 00 5A 00 00 00 00 04 00 44 07 xx xx 47 AA // 输出4 选择输入
5A 5A 5A 00 00 5A 00 00 00 00 04 00 44 08 xx xx 48 AA // 输出5 选择输入
5A 5A 5A 00 00 5A 00 00 00 00 04 00 44 09 xx xx 49 AA // 输出6 选择输入
5A 5A 5A 00 00 5A 00 00 00 00 04 00 44 0A xx xx 4A AA // 输出7 选择输入
5A 5A 5A 00 00 5A 00 00 00 00 04 00 44 0B xx xx 4B AA // 输出8 选择输入
//--------------------------------------------------------------------
// 数据调用
//--------------------------------------------------------------------
5A 5A 5A 00 00 5A 00 00 00 00 04 00 54 00 00 00 50 AA // 调用0
5A 5A 5A 00 00 5A 00 00 00 00 04 00 54 01 00 00 51 AA // 调用1
5A 5A 5A 00 00 5A 00 00 00 00 04 00 54 02 00 00 52 AA // 调用2
5A 5A 5A 00 00 5A 00 00 00 00 04 00 54 03 00 00 53 AA // 调用3
5A 5A 5A 00 00 5A 00 00 00 00 04 00 54 04 00 00 54 AA // 调用4
5A 5A 5A 00 00 5A 00 00 00 00 04 00 54 05 00 00 55 AA // 调用5
5A 5A 5A 00 00 5A 00 00 00 00 04 00 54 06 00 00 56 AA // 调用6
5A 5A 5A 00 00 5A 00 00 00 00 04 00 54 07 00 00 57 AA // 调用7
5A 5A 5A 00 00 5A 00 00 00 00 04 00 54 08 00 00 58 AA // 调用8
5A 5A 5A 00 00 5A 00 00 00 00 04 00 54 09 00 00 59 AA // 调用9
5A 5A 5A 00 00 5A 00 00 00 00 04 00 54 0A 00 00 5A AA // 调用10
5A 5A 5A 00 00 5A 00 00 00 00 04 00 54 0B 00 00 5B AA // 调用11
5A 5A 5A 00 00 5A 00 00 00 00 04 00 54 0C 00 00 5C AA // 调用12
//--------------------------------------------------------------------
// 数据保存
//--------------------------------------------------------------------
5A 5A 5A 00 00 5A 00 00 00 00 04 00 64 00 00 00 50 AA // 保存1
5A 5A 5A 00 00 5A 00 00 00 00 04 00 64 01 00 00 51 AA // 保存1
5A 5A 5A 00 00 5A 00 00 00 00 04 00 64 02 00 00 52 AA // 保存2
5A 5A 5A 00 00 5A 00 00 00 00 04 00 64 03 00 00 53 AA // 保存3
5A 5A 5A 00 00 5A 00 00 00 00 04 00 64 04 00 00 54 AA // 保存4
5A 5A 5A 00 00 5A 00 00 00 00 04 00 64 05 00 00 55 AA // 保存5
5A 5A 5A 00 00 5A 00 00 00 00 04 00 64 06 00 00 56 AA // 保存6
5A 5A 5A 00 00 5A 00 00 00 00 04 00 64 07 00 00 57 AA // 保存7
5A 5A 5A 00 00 5A 00 00 00 00 04 00 64 08 00 00 58 AA // 保存8
5A 5A 5A 00 00 5A 00 00 00 00 04 00 64 09 00 00 59 AA // 保存9
5A 5A 5A 00 00 5A 00 00 00 00 04 00 64 0A 00 00 5A AA // 保存10
5A 5A 5A 00 00 5A 00 00 00 00 04 00 64 0B 00 00 5B AA // 保存11
5A 5A 5A 00 00 5A 00 00 00 00 04 00 64 0C 00 00 5C AA // 保存12