background image

CVS4 Component Video Switch 

5

CVS4 Component Video Switch

K.I.S.S.™ 

(Continued)

K.I.S.S.™ 

(Continued)

mal parameter used by the command. For instances if the bits ‘AS’ and ‘IJ’ where to be set to 1, 

and the rest of the bits set to zero, the parameter value would be calculated as: 8+1, making the 

parameter value: 9.
The command to directly set those two bits, and reset all the others would be:

XS 9<CR>

Individual bits of a bitmapped parameter can be set or reset without affecting the other bits, by 

prefixing the bitmapped parameter with a ‘+’ to set individual bits, or a ‘-’ to reset individual bits.
For instance in the above example the bitmapped value has been set to ‘9’. If we would now like 

to enable the IR remote, by setting the ‘IRE’ bit, the following command can be issued:

XS +4<CR>

The will set the ‘IR’ bit, and have no affect on the others, and the new “XS” value would be: 13
If we’d like to now disable the IR jack and the IR remote functions and the Front Panel,  by clear-

ing the ‘IRJ’, ‘IRE’ & ‘FP’ bits, we’d use the value “16+4+2”, or 22, and issue the command:

XS -22<CR>

leaving the new “XS” value to be: 1.

Command Checksums and CRC-8 Checkcodes

A checksum or CRC-8 checkcode may be appended to any command, and if given, will be 

calculated by the device and compared with the given value. If a mismatch occurs an error will 

be returned and the command will not be executed. This can be used to help assure reliable op-

eration in noisy environments. Checksums are more commonly used in serial protocols, however 

CRC-8 checkcodes offer a more secure means of insuring error free communications.
A checksum or CRC-8 checkcode is appended to the command by adding a semicolon (‘;’) or 

colon (‘:’) suffix character followed by the checksum or checkcode.
An example of appending a checksum to a command:

LI 2,13;178<CR>

the ‘;’ indicates a checksum follows, the ‘178’ is the checksum of the command string up to and 

including the ‘;’ character.
In a similar fashion a CRC-8 checkcode can be appended to a command:

LI 2,13:213<CR>

The ‘:’ indicates that a CRC-8 checkcode follows, the ‘213’ is the calculated CRC-8 checkcode.
Optional spaces are allowed before the ‘;’ and ‘:’ characters but 

NOT

 after them. The checksum 

must 

immediately

 follow the ‘;’ character, and a CRC-8 checkcode must 

immediately

 follow the ‘:’ 

character, anything else, including whitespace, will cause a syntax error to be returned. Similarly 

the <CR> must 

immediately

 follow the checksum or checkcode parameter or a syntax error will 

be returned.
See: 

“Checksums and CRC-8’s”

 for more information on both, and source code examples of 

calculating both Checksums and CRC-8’s as used by K.I.S.S.™.

Clearing the Command Buffer

All commands are buffered and nothing is executed until the 

<CR>

 character is received. To as-

sure that there are no extraneous characters in the command buffer, before a command string is 

sent, the 

<ESC>

 character can be issued to clear the buffer and reset any checksum or CRC-8 

checkcode calculations.
This is useful when communications with the Zektor device is being initialized and the state of 

the device is unknown. An 

<ESC>

 will clear the command buffer and reset all checksums and 

CRC-8 checkcodes.
For example:

dsLG.%df<ESC>V;145<CR>

will return the Version Query Response string for most Zektor devices. The “

dsLG%df

” 

represents noise that could have been in the buffer before the command string was issued. The 

<ESC>

 clears the buffer allowing the “

V;145<CR>

” to be processed error free.

It is legitimate to prefix all commands with the 

<ESC>

 character to assure the buffer is always 

empty before the command string is received, which may be helpful in a very noisy environment.

The Response Strings

A response will always be returned whenever a 

<CR>

 is received. There are no conditions 

where a “timeout” is a valid response to any query.
There are only three valid responses in the K.I.S.S.™ protocol, anything else should be consid-

ered a communication error, including a timeout while waiting for a response.
Each response is prefixed by a unique character. Determining which of the three responses is 

received can be done simply, by examining only the first character of any response string. 
The three possible prefix characters and their associated responses are

+  

The Acknowledgement Response

!  

The Error Response

=  

The Query Response

The response to a command string will always be an Acknowledgement or an Error Response.
The Acknowledgement is always the string:

+<CR><LF>

Summary of Contents for CVS4

Page 1: ...Z E K T O R Home Theater Switches Digital Video Component Video Multichannel Audio Rev 2 07 25 2006 High Definition Component Video Switch CVS4 Supplement to the CVS4 User Guide...

Page 2: ...ttings 19 Control Settings HDS4 2 Version 20 Extended Control Settings 21 Checksums and CRC 8 s 24 Checksums and CRC 8 Checkcodes Defined 24 Differences between a Checksum and a CRC 8 Checkcode 24 Sou...

Page 3: ...n this case the value defaults to the current setting leaving the value unchanged The K I S S Continued space before the comma is optional Most commands can be queried for their current settings by su...

Page 4: ...wed before the and characters but NOT after them The checksum must immediately follow the character and a CRC 8 checkcode must immediately follow the character anything else including whitespace will...

Page 5: ...R LF Notice that in the first example a checksum was not appended to the LI command When issuing a command the checksum and CRC 8 codes are sent on a command by command basis Anytime a checksum or a C...

Page 6: ...ghout the com munication sequence First the LI CR command was issued by the controller While looking for an Acknowledgement or Error Response string an unsolicited Query Response is received indicatin...

Page 7: ...Checkcode did not match the calculated one The command will be ingnored Error 5 The number of parameters given does not match the number allowed by this command Error 6 To prevent conflicts between th...

Page 8: ...HDS4 2 there is no space after the command in the response string Note 3 For backward compatibility with the HDS4 2 this response string is sent in the Asyn chronous mode when a channel status has ch...

Page 9: ...Where dim Current DIM level setting bright Current BRIGHT level settings The intensities range from 0 Off to 44 Maximum brightness Note For backward compatibility with the HDS4 2 there is no space af...

Page 10: ...earn they are IR Cmd Description 1 Power Toggle 2 Select Input 1 3 Select Input 2 4 Select Input 3 5 Select Input 4 6 Discrete Power On 7 Discrete Power Off 8 Sequence Through Inputs Setting an ircmd...

Page 11: ...ess of any possible setup state it might be in The 0 button code is also device independent It use and value does not change between Zek tor devices like the other codes may and most likely will Query...

Page 12: ...ro keeps the CVS4 from responding to IR codes however the front panel sensor remains operational and any codes received can still be queried for by using the IR command Disabling the IR jack by settin...

Page 13: ...al Value 128 64 32 16 8 4 2 1 Bit Position 7 6 5 4 3 2 1 0 Name CTL LMO IRC IRR BTN LIN SEL PWR Factory Settings 0 0 0 0 0 0 1 1 PWR 1 Power State has changed SEL 1 Selection Input Output Mapping has...

Page 14: ...Checksum and a CRC 8 Checkcode A CRC is capable of finding many more and different types of errors than a checksum can A good description of its capability is described in the above referenced articl...

Page 15: ...detection characteristics So x 8 x 6 x 3 x 2 1 101001101 14D hex Ignore X 8 01001101 4D hex Reverse bit order 10110010 B2 hex define CRC8_POLY 0xB2 polynomial mask define CRC8_INIT 0xFF initial value...

Page 16: ...28 CVS4 Component Video Switch 29 CVS4 Component Video Switch This page left intentionaly nearly blank This page left intentionaly nearly blank...

Page 17: ...Z E K T O R Z E K T O R 12675 Danielson Ct Suite 401 Poway CA 92064 858 748 8250 www zektor com...

Reviews: