Datavideo SE-2000 Instruction Manual page 30

Digital video switcher
Hide thumbs Also See for SE-2000:
Table of Contents

Advertisement

unsigned short ComPort_Flag;
unsigned short CMD_Length;
unsigned char CMD_Buf[128];
void Cal_Checksum(void)
{
int i;
unsigned char crc_lo,crc_hi;
unsigned char new_crc_lo,new_crc_hi;
unsigned char temp;
crc_lo=CMD_Buf[CMD_Length-2];
crc_hi=CMD_Buf[CMD_Length-1];
for(i=0;i<(CMD_Length-2);i++)
{
temp=crc_lo^CMD_Buf[i];
new_crc_hi=CRC16_TABLE_HI(temp); // Reference to Table 1
new_crc_lo=CRC16_TABLE_LO(temp)^crc_hi; // Reference to Table 2
crc_lo=new_crc_lo;
crc_hi=new_crc_hi;
}
CMD_Buf[CMD_Length-2]=crc_lo;
CMD_Buf[CMD_Length-1]=crc_hi;
}
void MainSource1()
{
// TODO: Add your control notification handler code here
CMD_Length=13;
CMD_Buf[0]=0xE2;
CMD_Buf[1]=0xE4;
CMD_Buf[2]=0x0F;
CMD_Buf[3]=0x00;
CMD_Buf[4]=0xFF;
CMD_Buf[5]=0x01;
CMD_Buf[6]=0xFE;
CMD_Buf[7]=0x40;
CMD_Buf[8]=0x02;
CMD_Buf[9]=0x03; // COM
CMD_Buf[10]=0x00; // ARG
CMD_Buf[11]=0xFF; // CRCL
CMD_Buf[12]=0xFF; // CRCH
Cal_Checksum();
SendCommand();
}
Execute MainSource1() of result :
CMD_Buf[0~12] = E2, E4, 0F, 00, FF, 01, FE, 40, 02, 03, 00, CD, 16
Other example :
Main Source 2 = E2, E4, 0F, 00, FF, 01, FE, 40, 02, 03, 01, 0C, D6
Speed 1 : = E2, E4, 0F, 00, FF, 01, FE, 40, 02, 20, 00, D4, 26
Mix : = E2, E4, 0F, 00, FF, 01, FE, 40, 02, 32, 00, D8, 86
30

Advertisement

Table of Contents
loading

Table of Contents